I’m having trouble connecting to Spirent TestCenter (STC) using both Java and Tcl scripts. Here are the steps I’ve taken and the errors I’m encountering:
Using Java:
I tried running a Java script with the following command:
shell
java.exe "-Dstc.dir=C:/Program Files/Spirent Communications/Spirent TestCenter 5.16/Spirent TestCenter Application" main.java
The script fails with the following exception:
Exception: java.lang.RuntimeException: in init: Cannot create request.
SAL is not connected to a Test Session or a Server Manager. The
failure occurs specifically when the stc.Init() function is called.
Using Tcl:
I attempted to run a Tcl script with the following command:
shell
tclsh xxx.tcl
The script sources the Spirent TestCenter library:
source {C:Program FilesSpirent CommunicationsSpirent TestCenter 5.16Spirent TestCenter ApplicationSpirentTestCenter.tcl}
The error message I receive is:
This error is likely due to an invalid STC_SERVER_ADDRESS,
STC_SESSION_NAME, or STC_SESSION_ADDRESS environment variable value,
or a mismatched STC client version. STC_SERVER_ADDRESS = 192.168.2.102
STC_SESSION_NAME = NEW_TEST_SESSION STC_SESSION_ADDRESS =
192.168.2.102 Current STC client version: 5.16.0166.0000 Spirent: 15:46:46.564 ERROR – in init: Cannot create request. SAL is not
connected to a Test Session or a Server Manager.
Questions:
Could there be an issue with my environment variable settings?
How can I verify and correct the environment variables?
What other steps should I take to troubleshoot this connection issue?
3