Unable to connect to device from Visual Code extension

Today, for some reason I can’t connect to my Verdin module anymore from Toradex Extension v1.4.0 in Visual Studio Code 1.65.2

The error I’m getting is:

INFO:root:REST -> /api/devices/07219448/images
INFO:root:SSH - Creating tunnel to 07219448
2022-08-26 16:13:04,549| ERROR   | Could not open connection to gateway
ERROR:sshtunnel.SSHTunnelForwarder:Could not open connection to gateway
ERROR:root:Error: 539 SSH tunnel error. SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Exception: SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Could not establish session to SSH gateway
INFO:root:REST <- /api/devices/07219448/images - 539

image

If I click on the shell icon in the extension, I do get an SSH connection so network is okay I think. Also from a standard terminal in Ubuntu, I can connect to the device using SSH. Starting my C++ application doesn’t work because of the error above. The device isn’t found then.

I’m reluctant to update Visual Studio Code and the extension because I’ve had several issues with newer versions in the past. This combination was working reliable until yesterday.

What can I do to test?

If

Hi @mvandenabeele,

Have you tried to remove the device and connect it to the extension again? This is the first workaround you could test. Please give it a try and give us a feedback :smiley:

Also, the extension is now on version 1.5.1 there were some bug fixes that have been conducted in the meantime. We don’t expect them to break your current work if you go to the main extension version and not with the early access.

Best regards,

Hi @gclaudino.tx

I have removed and added my device a dozen times, but no luck. This morning, I updated Visual Studio Code to v1.70.2 and Torizon extension to 1.5.1 but the terminal output is the same:

2022-08-29 06:49:51,263| ERROR   | Could not open connection to gateway
ERROR:sshtunnel.SSHTunnelForwarder:Could not open connection to gateway
ERROR:root:Error: 539 SSH tunnel error. SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Exception: SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Could not establish session to SSH gateway
INFO:root:REST <- /api/devices/07219448/images - 539
INFO:root:REST -> /api/devices/07219448/images
INFO:root:SSH - Creating tunnel to 07219448
2022-08-29 06:50:09,062| ERROR   | Could not open connection to gateway
ERROR:sshtunnel.SSHTunnelForwarder:Could not open connection to gateway
ERROR:root:Error: 539 SSH tunnel error. SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Exception: SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Could not establish session to SSH gateway
INFO:root:REST <- /api/devices/07219448/images - 539
INFO:root:REST -> /api/devices/07219448/images
INFO:root:SSH - Creating tunnel to 07219448
2022-08-29 06:50:26,878| ERROR   | Could not open connection to gateway
ERROR:sshtunnel.SSHTunnelForwarder:Could not open connection to gateway
ERROR:root:Error: 539 SSH tunnel error. SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Exception: SSH tunnel error: Could not establish session to SSH gateway
ERROR:root:Could not establish session to SSH gateway
INFO:root:REST <- /api/devices/07219448/images - 539

In the output window, I get this:

Strange two devices are listed in that output, while only one is registered:

image

Ubuntu 20.04 is fully updated, if that matters.

Hi @mvandenabeele !

Does this problem happen with all your modules? Or only some of them?

Best regards,

I think it must have something to do with the custom Torizon OS image. I can connect to a Verdin module with a default Torizon OS mounted on a Verdin development board without problems. Still investigating what the differences could be. Perhaps you can provide us with some pointers to where to start looking?

Hi @mvandenabeele,

Thanks for noticing this. Here are some questions that may help us find the origin of this problem.

  • Did your module with problems had the same issues before or did the issue start when you updated your image?
  • Are you using a custom carrier board, right? If so, does your custom TorizonCore image work with the development board, or do you have the same problem?
  • Did you change just the device tree or add other kernel modules, for instance?
  • Did you build the image with TorizonCore Builder or with Yocto? If it’s the first, can you share with us the tcbuild.yaml?
  • If you made it with Yocto, did you add or remove any package? If so, how?

Best regards,

Hi

I can’t say when exactly it started. Tomorrow, I’ll try with a new Verdin and see if that makes a difference. Today I updated my module to an image that does work with a colleague but that didn’t help. I also created a new Ubuntu VM to make sure it wasn’t related to my development environment.

Hi @mvandenabeele,

Please update us once you have tested your new module.

Best regards,

Resetting my module fixed it for now. Not sure if there was a failed update or if I had issues with my laptop, but I can continue working on the project for now.

1 Like

Hi @mvandenabeele,

Glad to hear it’s working now. I’ll tag your answer as the current solution but if the problem arrives once more feel free to reopen this thread.

Best regards,