Facing Timeout error while running a process using Anaplan connect batch script

Hi,

I am trying to run a process through Anaplan connect but it throws timeout error while executing the process, though correct details for Workspace ID and Model ID are set in the batch file.

When tried to execute the same process through REST API using the Postman platform it works fine.

The error says that model is not found, though the model is online and UNLOCKED state.

The error looks something like this -

Please suggest if there any workarounds to fix this issue.

Thanks in advance!

Answers

  • What is the structure of your command in Anaplan Connect? Are you authenticating your script in the exact same way as in Postman?

  • Hi @Vaitesh,

    How big is your model? Maybe it's just taking time to open it for Anaplan (models close after 30 mins of inactivity) - is the problem occurring when you are using the model in browser in the same time?

  • Hey @ryan_kohn - yes, I am using Basic Auth in both the environments.

  • Hey @M.Kierepka - The model was pretty smaller one, to be used for demo purpose and it was being actively accessed via Chrome browser.

    Currently, the suggestion from my teammates is to include the parameter max retry count in the batch script. Will try it out and update here.

  • Hi @Vaitesh ,

    Then let's take a step back - are you sure your firewall is not blocking you from connecting to Anaplan API? Can you check it by opening command line and trying commands like "ping api.anaplan.com" and "tracert api.anaplan.com"? It shouldn't take long to reach it, "ping" command output should look like this:

    Pinging api.anaplan.com.cdn.cloudflare.net [104.17.51.182] with 32 bytes of data:
    Reply from 104.17.51.182: bytes=32 time=8ms TTL=57
    Reply from 104.17.51.182: bytes=32 time=17ms TTL=57
    Reply from 104.17.51.182: bytes=32 time=8ms TTL=57
    Reply from 104.17.51.182: bytes=32 time=132ms TTL=57
    
    Ping statistics for 104.17.51.182:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 8ms, Maximum = 132ms, Average = 41ms
    

    And then "tracert" should yield something like this (I anonymized my path using "123.123.123.123", and for you it can take more hops, but eventually you should reach the target):

    Tracing route to api.anaplan.com.cdn.cloudflare.net [104.17.51.182]
    over a maximum of 30 hops:
    
      1    24 ms     1 ms     3 ms  123.123.123.123
      2     7 ms     9 ms     8 ms  123.123.123.123
      3    17 ms     8 ms     9 ms  123.123.123.123
      4    11 ms     9 ms     9 ms  123.123.123.123
      5    19 ms    12 ms    14 ms  123.123.123.123
      6    30 ms     8 ms     8 ms  123.123.123.123
      7   106 ms    23 ms    17 ms  123.123.123.123
      8   178 ms    12 ms     7 ms  104.17.51.182
    
    Trace complete.
    
  • HI @M.Kierepka - Please find the below screenshots with the response for ping and tracert command.

    (hiding the hops for anonymity)


    Thanks for your response :)

  • Hi @Vaitesh,

    Ok, so it looks like you are able to reach APIs, but somehow you get timeout if you try to get the details. Can you add an argument "-ct 60" to your script (somewhere at the beginning, before "-x" or "-execute" command)? It will increase socket timeout limit to 60 seconds (it's max for Anaplan Connect). Another thing I'd do is to ensure that you have exactly the same details in your script as you have in Postman, because if Postman works, Anaplan Connect should too (Anaplan Connect is just a Java implementation of Anaplan APIs).

    If that does not help, I'd advise contacting Anaplan Support, as this doesn't look like something we on Community can help with.

  • @Vaitesh Some additional questions for you:

    1. What is the structure of your Anaplan Connect command? Can you post a screenshot or paste the section of code?
    2. How are you setting the parameters in the script?
    3. Are you able to get results from other Anaplan Connect calls?