Anaplan Connect Error on certificate usage

Hi,

 

I am facing the below message in command prompt (highlighted in blue) while trying to run a batch script with certificate and private key.

Certificate and private key is already placed in "E:\anaplan-connect-release-3.0.0\Certificate 2022"

 

(-a|-action) (<id>|<name>): select an action by id/name

(-P|-processes): list available processes in selected model

(-pr|-process) <id/name>: select a process by id/name

(-xl|-locale) <locale> Specify locale (eg en_US) to perform server operation

(-xc|-connectorproperty) [(<source>|<type>)/]property:(value|?):

    specify import data source connection property

(-xm|-mappingproperty) [(<import id>|<import name>)/]dimension:(value|?):

    specify prompt-at-runtime import mapping value(-x[:all]|-execute[:all]): Run the selected import/export/action/process/listItems/views  - [:all] option for list items include all details

 

Action Information:

-------------------

(-o|-output) <local path>: Retrieve dump file(s) for completed import/process

-emd: Describe layout of an export (metadata)

 

JDBC:

-----

-loadclass <class name>: This parameter is not required since AC 1.4.4.

    It will be removed in next version of AC.

-jdbcproperties: Path to JDBC properties file.

 

Actionless Imports and Exports:

-------------------------------

-putItems:(csv|json|jdbc) <local path>: Add items in file in <local path> to list defined by parameter "-list"

-updateItems:(csv|json|jdbc) <local path>: Update items in file in <local path> in list defined by parameter "-list"

-upsertItems:(csv|json|jdbc) <local path>: Upsert (add + update) items in file in <local path> in list defined by parameter "-list"

-deleteItems:(csv|json|jdbc) <local path>: Delete items in file in <local path> from list defined by parameter "-list"

(-im|-itemmappingproperty) <local path>: Path to file mapping file for putItems/updateItems/upsertItems/deleteItems actions

-output:(csv|json) <local path>: Write potential errors to file in <local path> in given format

Press any key to continue . . .

 

Below is the script i am using.

@Echo off

rem For Windows OS : This example explains the usage of basic Authentication with Anaplan Connect.
rem It also loads a source text file and runs an Anaplan import into a module.
rem For details of how to configure this script visit https://help.anaplan.com/anapedia/Content/Downloads/DL_Downloads.html

 

set certificate_path=”E:\anaplan-connect-release-3.0.0\Certificate 2022\”
set private_key="E:\anaplan-connect-release-3.0.0\Certificate 2022\”

set log="E:\anaplan-connect-release-3.0.0\Log\Log_check.Log"
set Errormsg="E:\anaplan-connect-release-3.0.0\Error\"
set WorkspaceId="xxxxx"
set ModelId="xxxxx "
set ServiceUrl="https://api.anaplan.com"
set AuthUrl="https://auth.anaplan.com"
set Chunksize=1
set ProxyUrl="xxxxx "

set Operation=-debug -via %ProxyUrl% -httptimeout 60 -service %ServiceUrl% -auth %AuthUrl% -workspace %WorkspaceId% -model %ModelId% -process "Script Taste - Process" -execute -process "Script Test - Process" -execute -Output %Errormsg%

echo %Script Test - Process%>%log%


rem *** End of settings - Do not edit below this line ***


setlocal enableextensions enabledelayedexpansion || exit /b 1
cd %~dp0
set Credentials=-c %certificate_path% -pkey %private_key%
set Command=.\AnaplanClient.bat %Credentials% %Operation%
@Echo %Command%
cmd /c %Command%

pause

 

Answers

  • @CommunityMember126473  

    'Certificate 2022' is a folder/directory? Try putting the certificate file in the main folder itself, rather than keeping in a folder nest.

     

    Thanks

    Aditya Shubham

  • Seems like your certificate path and key path are incomplete.

     

    Try adding file name to the path, so it looks like "E:\anaplan-connect-release-3.0.0\Certificate 2022\certificate.pem". Same for the key file "E:\anaplan-connect-release-3.0.0\Certificate 2022\key.pem"

  • Hi,

     

    I have gone with this approach as well.

     "E:\anaplan-connect-release-3.0.0\Certificate 2022\certificate.pem"

    and same with key but still facing issues.

     

    Reached to Anaplan support, it seems to be certificate/key use (may be corrupted key during extraction).

     

    Thanks,

    Prashant