Anaplan Connect import error 12476

LouiseBourgonjon
Contributor

Anaplan Connect import error 12476

Hi,

 

I am currently having issues with my script using Anaplan connect and I hope someone could help me with this.

The error I receive is: 

ERROR 12476 |--   Imports not found: Imports not found for Model-ID=8954E749858F4CEEB35EBD5BFB54595B

(Feign: status 401 reading AnaplanAPI#getImports(String,String,int); content:{"status":{"code":401,"message":"Not Authenticated."}})E:\GMS_Anaplan\anaplan-connect-1-4-2>”

 

I already  checked the “obvious” things: model id matches, import action name and file name are correct.

Would you be able to advise me on:

  1. Did the script actually passed the authentication phase? In the run logs that is the log just before the error code on the import (see attached)
  2. Do you see a mistake in the script? (see below)
  3. Could this error be related to the file option default file? currently I have set this to "Everyone'.

Thank you for your help!

 

 

Script:

 

REM @Echo off
rem For details of how to configure this script see doc\Anaplan Connect User Guide.doc
REM ###########################
set CertPath="E:\GMS_Anaplan\anaplan-connect-1-4-2\certs\AnaplanGMSCertPublickey.pem"
set PrivateKey="E:\GMS_Anaplan\anaplan-connect-1-4-2\certs\AnaplanGMSCertPrivatekey.pem:"
set WorkspaceId="8a81b09e603d355d016149ba8d6e67ce"
set ModelId="8954E749858F4CEEB35EBD5BFB54595B"
set JAVA_HOME=E:\GMS_Anaplan\jre1.8.0_144
set ServiceUrl="https://api.anaplan.com"
set AuthUrl="https://auth.anaplan.com"
set Chunksize=40
set FileName = "MOS_Actuals_BU_Rate.csv"
set FilePath ="E:\GMS_Anaplan\UploadtoAnaplan\MOS_Actuals_BU_Rate.csv"
set DumpName ="E:\GMS_Anaplan\UploadtoAnaplanMOS_Actuals_BU_Rate_Error.txt"
rem set Operation=-certificate "E:\GMS_Anaplan\anaplan-connect-1-4-2\DevCerts\KZDWORAEPMD04.corp.zoetis.com.cer" -export "Export_APO_AOP New" -execute -get "E:\ANAplan_APO\APO_Data\AOP\Export_APO_AOP.txt"
rem *** End of settings - Do not edit below this line ***
set Operation=-debug -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -file %FileName% -put %FilePath% -import "2. Upload HFM Actuals at Budget Rate from file" -execute -output %DumpName%
set Credentials=-certificate %CertPath% -pkey %PrivateKey%
setlocal enableextensions enabledelayedexpansion || exit /b 1
cd %~dp0
REM set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%
set Command=.\AnaplanClient.bat %Credentials% -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -chunksize %Chunksize% -file %FileName% -put %FilePath% -import "2. Upload HFM Actuals at Budget Rate from file" -execute -output %DumpName%

@Echo %Command%
cmd /c %Command%

1 ACCEPTED SOLUTION

Accepted Solutions
LouiseBourgonjon
Contributor

Re: Anaplan Connect import error 12476

we were able to solve the issue.

The root cause for the issue is that the service account which is associated to the certificate was not activated yet. After receiving the activation email and setting a password, the script ran successfully!

 

@DaanishSoomar  thank you for your contribution to finding solutions for this issue!

View solution in original post

17 REPLIES 17
abhay.kanik
Regular Contributor

Re: Anaplan Connect import error 12476

Hi @LouiseBourgonjon 

 your script has not passed authentication but script looks all good, check if your network has whitelisted api.anaplan.com and auth.anaplan.com. Also, The option which you selected 'everyone' is also correct, I recommend checking that the user role have permission to the action you are trying to run.

Thanks

Abhay

LouiseBourgonjon
Contributor

Re: Anaplan Connect import error 12476

Hi Abhay,

 

Thank you for your input.

We are already using a similar script with urls to connect to another anaplan workspace, so the urls are whitelisted.

I also checked the permissions and user access rights, but it seems that the service account we use in the connection has all access rights needed. However, the checkbox "Workspace admin" is not checked for the service user. Is that necessary?

DaanishSoomar
Certified Master Anaplanner

Re: Anaplan Connect import error 12476

Yes in an ideal setup, the Service account should be marked as a non-SSO workspace admin. @LouiseBourgonjon 

LouiseBourgonjon
Contributor

Re: Anaplan Connect import error 12476

Hi @DaanishSoomar ,

 

I changed the service account to be a workspace admin, non-SSO was already ok.

However, we still get the same error...

LouiseBourgonjon
Contributor

Re: Anaplan Connect import error 12476

could it be linked to the fact that I market the import as production data? (I don't think so ...?)

LouiseBourgonjon_0-1620749072957.png

 

DaanishSoomar
Certified Master Anaplanner

Re: Anaplan Connect import error 12476

No please see my response underneath on lower thread. @LouiseBourgonjon  this will be unrelated to Production Data.

ben_speight
Super Contributor

Re: Anaplan Connect import error 12476

You're right @DaanishSoomar, I'd forgotten that.

To get a 401 status the most likely cause is a problem with the certificate but its hard to tell what could be wrong from here.

ben_speight
Super Contributor

Re: Anaplan Connect import error 12476

Looks like you have a trailing colon at the end of your private key path?

LouiseBourgonjon
Contributor

Re: Anaplan Connect import error 12476

Hi Ben,

 

We need to add that trailing colon otherwise we run into another error: 

E:\GMS_Anaplan\anaplan-connect-1-4-2>cmd /c .\AnaplanClient.bat -certificate "E:\GMS_Anaplan\anaplan-connect-1-4-2\certs

\AnaplanGMSCertPublickey.pem" -pkey "E:\GMS_Anaplan\anaplan-connect-1-4-2\certs\AnaplanGMSCertPrivatekey.pem" -service "

https://api.anaplan.com" -auth https://auth.anaplan.com -workspace "8a81b09e603d355d016149ba8d6e67ce" -model "8954E749

858F4CEEB35EBD5BFB54595B" -chunksize 40 -file  -put  -import "2. Upload HFM Actuals at Budget Rate from file" -execute -

output

Absolute path to JAVA 8 or Java 11 or OpenJDK8 executable not provided. Will attempt to figure out path from JAVA_HOME o

r Windows registry...

Found Java executable from JAVA_HOME "E:\GMS_Anaplan\jre1.8.0_144", at E:\GMS_Anaplan\jre1.8.0_144\bin\java.exe...

Current Java version = 1.8

Current Java version is valid for Anaplan Connect.

Running Anaplan Connect...

Using Class-Path: E:\GMS_Anaplan\anaplan-connect-1-4-2\anaplan-connect-1.4.2-jar-with-dependencies.jar

2021-05-11 10:10:10 ERROR 10072 |--   Anaplan API: Could not initialise service credentials (Runtime: The specified priv

ateKey path 'E' is invalid)

E:\GMS_Anaplan\anaplan-connect-1-4-2>