cancel
Showing results for 
Search instead for 
Did you mean: 

XMC script stops -> "Error: session exceeded timeout: 30 secs"

XMC script stops -> "Error: session exceeded timeout: 30 secs"

StephanH
Valued Contributor III

Hello,

I am running a XMC script to receive the output of show config/sh run against different devices:

XOS, VSP, EOS (B-Series, S-Series, ...).

 

    cli_result = emc_cli.send("sh config")
    wfile(devname,cli_result.getOutput())

 

It works fine except if I started the script with the S-Series. Whit S-Series I receive a 

"Error: session exceeded timeout: 30 secs"

In difference to the other devices a “show conf” on CLI lasts more the 30 seconds (approximatly 55 seconds). I think thats the problem here.

I tried to cover that with a change to:

    cli_result = emc_cli.send("sh config, True, 80")
    wfile(devname,cli_result.getOutput())

 

In my opinion this should lead the script to wait for 80 secondes for a response of the send commend.

But there is no difference. I receive the same error. The hole script timeout is larger than the 120 seconds and should not be a problem here.

My questions. 

  1. Is it correct that a emc_cli.send("sh config, True, 80") leads the script to wait for 80 secondes for an answer?

  2. Any ideas how to solve the problem?

Best regards

Stephan

Regards Stephan
1 ACCEPTED SOLUTION

Stephane_Grosj1
Extreme Employee

Hi,

I just found that Scripting forum!

 

If this is still a topic, I *think* the timeout you are setting (80) is for the CLI command, but there’s also a Script Timeout in XMC. You may need to tweak it also…

There’s a key in the emc_vars dictionary for that (scriptTimeout).

You can also add a session timeout in the code, like so:

 

# update the session timeout in seconds

emc_cli.setSessionTimeout(60)

View solution in original post

4 REPLIES 4

StephanH
Valued Contributor III

Hello Stephane,

yes it's still a topic but in another application. I will try your hints.

My inital problem with S-Serie was caused by the small "buffer" in workflows. Therefore I can't read the hole config.

Thank you very much.

Stephan

Regards Stephan

Stephane_Grosj1
Extreme Employee

Hi,

I just found that Scripting forum!

 

If this is still a topic, I *think* the timeout you are setting (80) is for the CLI command, but there’s also a Script Timeout in XMC. You may need to tweak it also…

There’s a key in the emc_vars dictionary for that (scriptTimeout).

You can also add a session timeout in the code, like so:

 

# update the session timeout in seconds

emc_cli.setSessionTimeout(60)

StephanH
Valued Contributor III

Hello Ludovico,

thank you for your answer. 

  • CLI paging is disabled (with “set length 0”) and tested.
  • The access (user/pw) works fine to.
  • If I do a “show vlan” it works as expected.

This is why I think there is a relation with time needed for the “show Config” output.

Best regards

Stephan

 

Regards Stephan

Ludovico_Steven
Extreme Employee

Make sure that XMC can login correctly (without requiring user/password) to the S-Series; right click the device and run Terminal against it.

Another thing to consider is disabling more paging on the device, before you dump the config. XMC has a CLIrules.xml file to work out how to handle a more prompt per device type, but maybe it is getting mixed up on your S-series ? Best is to disable more paging on the device upfront, before executing and show commands.

GTM-P2G8KFN