Using Saleae 2.4.x Over SSH

Hi,

Firstly, have to say, the new Saleae 2 software is incredible - a huge step forward over v1 - everything about it is top-notch.

Unfortunately, we are seeing an issue with it working over SSH and wondering if anyone had any thoughts on how to fix.

When we initialize outside of an SSH environment we see the following trace with no errors:-

2022-12-01 21:02:36 [ INFO] sub ChannelConnectivity.IDLE (manager.py:272)
2022-12-01 21:02:36 [ INFO] sub ChannelConnectivity.CONNECTING (manager.py:272)
2022-12-01 21:02:38 [ INFO] sub ChannelConnectivity.TRANSIENT_FAILURE (manager.py:272)
2022-12-01 21:02:39 [ INFO] sub ChannelConnectivity.READY (manager.py:272)
2022-12-01 21:02:42 [ INFO] Saleae Device DAE26701F8790674 found. (powervstime_smoke_test.py:169)

Running over SSH we see the following issue:-

2022-12-01 20:59:32 [ INFO] sub ChannelConnectivity.IDLE (manager.py:272)
2022-12-01 20:59:32 [ INFO] sub ChannelConnectivity.CONNECTING (manager.py:272)
2022-12-01 20:59:34 [ INFO] sub ChannelConnectivity.TRANSIENT_FAILURE (manager.py:272)
ERROR [100%]

Essentially, we can’t start the application.

Please note, I’m by no means an SSH expert so please forgive me if I’m using the wrong terms etc.

Thanks,

David

@davidpcl1977 I’m glad to hear our new Logic 2 software has been a positive experience for you! Sorry for the issues over SSH. Also, my apologies for the late reply. This is a fairly tricky issue for which I don’t have an immediate recommendation for, and our software team (currently 3 developers) are currently backed up with other priority tasks.

Unfortunately, we don’t have any detailed documentation on how to get our software working reliably over a remote environment (we really should).

Could you share more information about your remote environment in the meantime?

Also, sometime last year, we had another user report issues over SSH, which was ultimately solved. You can find the discussion below. Can you confirm if you might be running into a similar issue?

Hi Tim,

Thanks for getting back to me.

I probably don’t need to go into too much detail regarding our setup, as you can cause this to fall over fairly easily.

If from a cmd prompt, you open an SSH session i.e. “SSH user@localhost” (in our case user is our Windows login), then attempt to launch logic.exe either from the Python API, or even as a subprocess it will error.

Here’s an example of a full trace if you then from the command line try and launch from Python.

>>> import saleae
>>> from saleae import automation
>>> saleae_manager = saleae.automation.Manager.launch()
INFO:saleae.automation.manager:sub ChannelConnectivity.IDLE
INFO:saleae.automation.manager:sub ChannelConnectivity.CONNECTING
INFO:saleae.automation.manager:sub ChannelConnectivity.TRANSIENT_FAILURE
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\lib\site-packages\saleae\automation\manager.py", line 389, in launch
    grpc_channel_arguments=grpc_channel_arguments)
  File "C:\lib\site-packages\saleae\automation\manager.py", line 310, in __init__
    raise exc from None
  File "C:\lib\site-packages\saleae\automation\manager.py", line 290, in __init__
    app_info = self.get_app_info()
  File "C:\lib\site-packages\saleae\automation\manager.py", line 417, in get_app_info
    reply: saleae_pb2.GetAppInfoReply = self.stub.GetAppInfo(saleae_pb2.GetAppInfoRequest())
  File "C:\lib\site-packages\grpc\_channel.py", line 946, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "C:\lib\site-packages\grpc\_channel.py", line 849, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10430: WSA Error"
        debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10430: WSA Error {created_time:"2022-12-07T11:30
:59.261815879+00:00", grpc_status:14}"
>
>>>

Hi Tim,

I attempted to respond but my message disappeared, so I’ll try again.

I can open an SSH session from the cmd line i.e. “ssh user@localhost” then attempt to launch from Python via the command line.

>>> import saleae
>>> from saleae import automation
>>> saleae_manager = saleae.automation.Manager.launch()
INFO:saleae.automation.manager:sub ChannelConnectivity.IDLE
INFO:saleae.automation.manager:sub ChannelConnectivity.CONNECTING
INFO:saleae.automation.manager:sub ChannelConnectivity.TRANSIENT_FAILURE
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\lib\site-packages\saleae\automation\manager.py", line 389, in launch
    grpc_channel_arguments=grpc_channel_arguments)
  File "C:\lib\site-packages\saleae\automation\manager.py", line 310, in __init__
    raise exc from None
  File "C:\lib\site-packages\saleae\automation\manager.py", line 290, in __init__
    app_info = self.get_app_info()
  File "C:\lib\site-packages\saleae\automation\manager.py", line 417, in get_app_info
    reply: saleae_pb2.GetAppInfoReply = self.stub.GetAppInfo(saleae_pb2.GetAppInfoRequest())
  File "C:\lib\site-packages\grpc\_channel.py", line 946, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "C:\lib\site-packages\grpc\_channel.py", line 849, in _end_unary_response_blocking
    raise _InactiveRpcError(state)
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNAVAILABLE
        details = "failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10430: WSA Error"
        debug_error_string = "UNKNOWN:failed to connect to all addresses; last error: UNAVAILABLE: ipv4:127.0.0.1:10430: WSA Error {created_time:"2022-12-07T11:30
:59.261815879+00:00", grpc_status:14}"
>
>>>

@davidpcl1977 Thanks for the added details. I found your missing reply. It looks like our auto spam filter mistakingly filtered your message. We’ll look into this for you.

Hi @davidpcl1977 ,

I assume you are using the built-in Windows 10 SSH Server. Unfortunately, by default it runs as a service and does not have access to running GUI applications from the desktop. It does look like Logic.exe will run, but it’s unclear where it is failing - this is something we will look into.

One option for now is to use psexec or schtasks to run Logic.exe on the user desktop, and then use saleae.automation.Manager.connect() to connect to the running application. Here is a relevant StackOverflow post: user interface - Starting GUI programs via OpenSSH on Windows? - Stack Overflow. I was able to successfully use this method locally.

Please let us know if that won’t work for your use-case,

Ryan

1 Like

Hi @timreyes ,

I’ll give what you have suggested a try.

Thanks,

David

Hi @timreyes ,

i am facing the same issue

@gokulrock01 Could you provide more details about your environment and OS? We have seen failures particularly when running within a service that doesn’t have access to creating a window / running GUI applications.

Additionally, can you also confirm that “Enable Automation Server” is enabled from within the software?
https://saleae.github.io/logic2-automation/getting_started.html