Anaplan script is failing while executing remotely

Highlighted
New Contributor

Anaplan script is failing while executing remotely

Hi,

 

I am trying to execute Anaplan script remotely but its failing with below error.

 


Absolute path to JAVA 8 executable not provided. Will attempt to figure out path from JAVA_HOME or Windows registry...
JAVA_HOME is not defined, will attempt to fetch value from registry...
Checking Windows Registry for Java Version...
Checking Windows Registry for JAVA_HOME...
JAVA_HOME is C:\Program Files\Java\jdk1.8.0_201
Found Java executable from JAVA_HOME , at C:\Program Files\Java\jdk1.8.0_201\bin\java.exe...
Current Java version = 1.8
Current Java version is valid for Anaplan Connect.
Running Anaplan Connect...
Using Class-Path: \\Server name\directory$\anaplanconnect\anaplan-connect-1.4.3.jar
2020-02-13 15:17:39 DEBUG [c.a.client.Program :1725 ] 14928 |-- ================================================================\
======
2020-02-13 15:17:39 DEBUG [c.a.client.Program :1726 ] 14928 |-- Anaplan Connect 1.4.3
2020-02-13 15:17:39 DEBUG [c.a.client.Program :1727 ] 14928 |-- Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)/ (25.201-\
b09)/
2020-02-13 15:17:39 DEBUG [c.a.client.Program :1729 ] 14928 |-- (Windows Server 2008 R2amd64)/6.1
2020-02-13 15:17:39 DEBUG [c.a.client.Program :1730 ] 14928 |-- ================================================================\
======
2020-02-13 15:17:39 INFO [c.a.client.Service :83 ] 14928 |-- Initializing Service...
2020-02-13 15:17:39 INFO [a.BasicAuthenticator:26 ] 14928 |-- Authenticating via Basic...
2020-02-13 15:17:39 INFO [t.AnaplanApiProvider:117 ] 14928 |-- Setting up proxy...
2020-02-13 15:17:41 INFO [.t.r.FeignApiRetryer:49 ] 14928 |-- Retrying API request: Attempt (1)
2020-02-13 15:17:41 DEBUG [.t.r.FeignApiRetryer:50 ] 14928 |-- Request details: Unexpected response code for CONNECT: 403 execu\
ting POST https://auth.anaplan.com/token/authenticate
2020-02-13 15:17:44 INFO [.t.r.FeignApiRetryer:49 ] 14928 |-- Retrying API request: Attempt (2)
2020-02-13 15:17:44 DEBUG [.t.r.FeignApiRetryer:50 ] 14928 |-- Request details: Unexpected response code for CONNECT: 403 execu\
ting POST https://auth.anaplan.com/token/authenticate
2020-02-13 15:17:49 INFO [.t.r.FeignApiRetryer:49 ] 14928 |-- Retrying API request: Attempt (3)
2020-02-13 15:17:49 DEBUG [.t.r.FeignApiRetryer:50 ] 14928 |-- Request details: Unexpected response code for CONNECT: 403 execu\
ting POST https://auth.anaplan.com/token/authenticate
2020-02-13 15:17:55 ERROR [c.a.client.Program :654 ] 14928 |-- Anaplan API: Basic Authentication failed! (Retryable: Unexpected\
response code for CONNECT: 403 executing POST https://auth.anaplan.com/token/authenticate (IO: Unexpected response code for CONNEC\
T: 403))

 

Can someone help me to resolve this issue and execute the script successfully?

8 REPLIES 8
Highlighted
Master Anaplanner/Community Boss

Re: Anaplan script is failing while executing remotely

Hi Sunil,

Looks like you have to configure the JAVA_HOME variable.
Check the instructions here:
https://javatutorial.net/set-java-home-windows-10

Regards,
Anirudh
Highlighted
New Contributor

Re: Anaplan script is failing while executing remotely

Hi Anirudh,

 

Thanks for your help on this.

 

I have updated the required Java paths and ran the script.But unfortunately script has failed with same error.

 

Regards

Sunil

Highlighted
Frequent Contributor

Re: Anaplan script is failing while executing remotely

Hi,

 

check the firewall/proxy for "https://api.anaplan.com/" and "https://auth.anaplan.com", in both laptops.

does it works if you run it locally? 

 

Regards

Highlighted
New Contributor

Re: Anaplan script is failing while executing remotely

Hi,

 

Thanks for your response.

 

Yes, I am able to execute the script successfully when I am executing locally.

 

Regards

Sunil

Highlighted
Frequent Contributor

Re: Anaplan script is failing while executing remotely

Hi,

 

how are you calling the bat? you should use a tool like psexec for a remotely execution. 

 

Regards

Highlighted
Community Boss

Re: Anaplan script is failing while executing remotely

It looks like you're connecting via a proxy (is -v or -via set?). Some proxies require  authentication using separate credentials that can be supplied using the -vu/-viauser options. Find out who operates the proxy and seek guidance from them.

Highlighted
Master Anaplanner/Community Boss

Re: Anaplan script is failing while executing remotely

@Sunilkumar 

 

you are getting response 403 

 

have you checked your log in credentials ? 

 

Highlighted
Certified Master Anaplanner

Re: Anaplan script is failing while executing remotely

Hi @karank 

I am getting a similar error when trying to execute from a remote system.


C:\Anaplan\anaplan-connect\AnaplanClient.bat -keystore "C:\Anaplan\Certificates\Finance_Anaplan_Support\Finance_Anaplan_Support.jks" -keystorepass "Finance" -keystorealias "Finance_Anaplan_Support" -service "https://api.anaplan.com" -auth "https://auth.anaplan.com" -workspace "8a81b0106d9daa42016e5ff07c3c6380" -model "E77FDDEF10EB4576B41D05CE5F9D5838" -file "AT.csv" -jdbcproperties "C:\Anaplan\anaplan-connect\JDBC Properties\Audit_Trail.prop" -process "Update Audit Trial (Vertica)" -execute -output "C:\Anaplan\Jobs\Audit Trail Import\"
Absolute path to JAVA 8 or Java 11 or OpenJDK8 executable not provided. Will attempt to figure out path from JAVA_HOME or Windows registry...
JAVA_HOME is not defined, will attempt to fetch value from registry...
Checking Windows Registry for Java Version...
Checking Windows Registry for JAVA_HOME...
JAVA_HOME is C:\Program Files\Java\jdk1.8.0_171
Found Java executable from JAVA_HOME "", at C:\Program Files\Java\jdk1.8.0_171\bin\java.exe...
Current Java version = 1.8
Current Java version is valid for Anaplan Connect.
Running Anaplan Connect...
Using Class-Path: C:\Anaplan\anaplan-connect\anaplan-connect-1.4.4-jar-with-dependencies.jar
2020-08-04 04:51:01 INFO 391176 |-- Initializing Service...
2020-08-04 04:51:01 INFO 391176 |-- Authenticating via Certificate...
2020-08-04 04:51:02 INFO 391176 |-- Retrying API request: Attempt (1)
2020-08-04 04:51:06 INFO 391176 |-- Retrying API request: Attempt (2)
2020-08-04 04:51:11 INFO 391176 |-- Retrying API request: Attempt (3)
2020-08-04 04:51:18 ERROR 391176 |-- Anaplan API: Certificate Authentication failed! (Retryable: Received fatal alert: access_denied executing POST https://auth.anaplan.com/token/authenticate (SSL handshake: Received fatal alert: access_denied))
Press any key to continue . . .

 

The same code works perfectly in my system.