Hi Daniel,
Thanks for taking the time to add that script, looks really useful. Have a question for you though, when running that script I'm getting a timeout error:
User: domain\martin.flammia
10.10.10.10 10.10.10.10 2015-04-27 at 09:58:28 BST
*** Error at line - 10 ***
Error: Command execution on server timed out. The command may still be running on device. Refresh results to see execution log.
If this is valid command and you would like to re-run, increase your request timeout.
My first thought was that its just timing out waiting for a command to complete. Line 10 is the command:
show tech all detail logto file
But when I run a ls internal-memory on the switch the file never appears. Running that command directly on the switch seems to work fine.
Below is the message reported by Netsight with verbose script logging on:
2015-04-27 09:58:28,187 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.beans.impl.DeviceCommunicatorUtil] getCommunicatorScript - 10.10.10.10: Using cache
2015-04-27 09:58:28,203 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.scriptInterpreter.ExecuteCLICommand] timeout for cli [CLI show tech all detail logto file] 58 seconds.
2015-04-27 09:58:28,203 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.session.DeviceSessionFactory] Creating session|CLI|10.10.10.10|
2015-04-27 09:58:28,203 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.session.cli.DeviceSshSession] Setting the timeOut for session Connection, inside the DeviceSshSession
2015-04-27 09:58:29,140 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:58:29,234 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.session.cli.DeviceCliSession] 10.10.10.10|Processing Command|show tech all detail logto file|
2015-04-27 09:58:29,234 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.session.cli.DeviceSshSession] 10.10.10.10|Send command and wait for a prompt|show tech all detail logto file|
2015-04-27 09:58:33,257 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.StatisticsMonitor] Setting stats for Script Executed to Current Rate = 0/min Max Rate: 1/min Total: 3
2015-04-27 09:58:33,632 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:58:37,953 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:58:42,332 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:58:46,691 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:58:50,988 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:58:55,285 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:58:59,566 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:59:03,863 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:59:08,175 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:59:12,456 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:59:16,769 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:59:21,081 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:59:25,394 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.ExpiringScriptCache] Expiring Script Cache:size=4] Found: 19
2015-04-27 09:59:28,003 DEBUG [com.extremenetworks.epicenter.server.scripting.common.ScriptingApi] ScriptTask Completed Successfully
2015-04-27 09:59:29,363 DEBUG [com.extremenetworks.epicenter.server.deviceCommunicator.beans.impl.DeviceCommunicatorManagerBean] Error||Exception
tcl.lang.TclException: Error: Command execution on server timed out. The command may still be running on device. Refresh results to see execution log.
If this is valid command and you would like to re-run, increase your request timeout.
at com.extremenetworks.epicenter.server.deviceCommunicator.scriptInterpreter.RunScriptTask.execute(RunScriptTask.java:170)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at com.extremenetworks.epicenter.server.deviceCommunicator.beans.impl.DeviceCommunicatorManagerBean.startChainCommand(DeviceCommunicatorManagerBean.java:2800)
at com.extremenetworks.epicenter.server.deviceCommunicator.beans.impl.DeviceCommunicatorManagerBean.handleRequest(DeviceCommunicatorManagerBean.java:2054)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.extremenetworks.epicenter.server.common.beans.impl.AbstractManager.handleRequest(AbstractManager.java:348)
at com.extremenetworks.epicenter.server.common.beans.impl.RequestExecutor.executePureSyncRequest(RequestExecutor.java:424)
at com.extremenetworks.epicenter.server.common.beans.impl.RequestExecutor.executeSyncRequest(RequestExecutor.java:194)
at com.extremenetworks.epicenter.server.scripting.tasks.BatchAssemblyTask.execute(BatchAssemblyTask.java:247)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at com.extremenetworks.epicenter.server.scripting.beans.impl.ScriptingManagerBean.startRunScriptChain(ScriptingManagerBean.java:1164)
at com.extremenetworks.epicenter.server.scripting.beans.impl.ScriptingManagerBean.handleRequest(ScriptingManagerBean.java:559)
at com.extremenetworks.epicenter.server.scripting.beans.impl.ScriptingManagerBean.handleRequest(ScriptingManagerBean.java:134)
at com.extremenetworks.epicenter.server.scripting.beans.impl.ScriptingManagerMDB.handleRequest(ScriptingManagerMDB.java:95)
at com.extremenetworks.epicenter.server.common.beans.impl.AbstractMDB.doHandleMessage(AbstractMDB.java:130)
at com.extremenetworks.epicenter.server.common.beans.impl.AbstractMDB.handleMessage(AbstractMDB.java:101)
at com.extremenetworks.epicenter.server.scripting.beans.impl.ScriptingManagerMDB.onMessage(ScriptingManagerMDB.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1287)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:745)
2015-04-27 09:59:29,363 INFO [com.extremenetworks.epicenter.server.scripting.common.ScriptingUtil] RunScript request: 19 | script id: 32 | size: 1 | took 61 secs.
2015-04-27 09:59:29,363 DEBUG [com.extremenetworks.epicenter.server.scripting.beans.impl.DbObjectCache] ScriptBean cache hit for key: 32
2015-04-27 09:59:29,363 DEBUG [com.extremenetworks.epicenter.server.scripting.common.ScriptingUtil]