question

ralex avatar image
ralex asked mpiecuch answered

Failed connection to chassis using python api on linux

Please see attached log, on windows same script is works perfect. any suggestings? thanks!.

BTW, same on windows machine works perfect.

$ python

Python 2.7.2 (default, Mar 3 2015, 14:47:31) [GCC 4.6.3] on linux3 Type "help", "copyright", "credits" or "license" for more information.

>>> from StcPython import StcPython

>>> stc = StcPython()

>>> print stc.get('system1', 'version') 4.42.3866.0000

>>> stc.connect("10.5.209.199")

13:54:12.044 ERROR - in connect: unable to create unknown command "connecttochassisCommand" Traceback (most recent call last): File "<stdin>", line 1, in <module> File "StcPython.py", line 48, in connect return self.stcInt.salConnect(svec) RuntimeError: in connect: unable to create unknown command "connecttochassisCommand"

>>>

Spirent TestCenter (STC)apiLinuxpython
1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mpiecuch avatar image mpiecuch commented ·

I am getting the same error with the TCL API. I'd like to also note that I am using the 64-bit version of the client on fedora linux:

% stc::connect 10.0.1.21

18:26:02.801 ERROR - in connect: unable to create unknown command "connecttochassisCommand"

RuntimeError in connect: unable to create unknown command "connecttochassisCommand"

0 Likes 0 ·
ralex avatar image
ralex answered ralex commented

Hey! You should use the Spirent_TestCenter_Auto_Linux_4.50.gz with 32 bit only. And with limitation of python 2.7. That's the way it can work. Spirent high-tech :\

The 64bit linux client is for spirent test-lab...

2 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ralex avatar image ralex commented ·

*put attention, i'm working with python, you're looking to work with tcl, but probably the same.. use 32bit machine

0 Likes 0 ·
mpiecuch avatar image mpiecuch commented ·

Ok, the 32-bit version of TCL seems to work. Thanks for the help.

0 Likes 0 ·
stebhla avatar image
stebhla answered

Have you called the package "package require SpirentTestCenter" before calling stc::connect?

Also you need client to be 32 bit version along with 32 bit tcl or python to successfully run the STC API

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mpiecuch avatar image mpiecuch commented ·

Yes, I set up all of the TCL libraries as specified in the API/Tcl/readme.txt and did the package require. So, I am using the "Spirent_TestCenter_Auto_Linux64Client_4.50.tar" 64-bit client downloaded off the Spirent support web site. Does this version not work?

0 Likes 0 ·
stebhla avatar image
stebhla answered ralex commented

Working for me on Linux and windows

1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ralex avatar image ralex commented ·

do you want to share or describe your setup/script/used software?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.