Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
680 Discussions

SSH connection disconnect after some time

ofiryaish
Novice
1,002 Views

I followed this guide for connecting to Devcloud with visual studio code:

https://devcloud.intel.com/oneapi/connect/connect-with-vscode/

and everything works fine. The problem is that the the connection is always lost after about an hour or so. I get messages:  

In the first shell  :

Connection reset by 12.229.61.118 port 22
packet_write_wait: Connection to UNKNOWN port 65535: Unknown error

In the second shell: 

packet_write_wait: Connection to UNKNOWN port 65535: Unknown error

Maybe it's connected to the fact that once I launch the connection I leave the shell without any use? meaning it ideal, and therefore the connection is lost?

I using Windows 10 powershell, and I also tried to use ubuntu shell the establish the connection. 

Another side problem that I a have is that the in the Visual code terminal none of the conda commands works and it says that "conda: command not found". I also can't perform "source activate my_env_name" and I get the error  "bash: activate: No such file or directory". I think that I need to add conda to the PATH, but I don't how to do this in the devcloud. 

Thank you, 
Ofir
 

0 Kudos
1 Solution
AthiraM_Intel
Moderator
904 Views

Hi,


Glad to know that your issue got resolved.

You can use the oneapi environment as default by setting the 'source /opt/intel/inteloneapi/setvars.sh' command in the bash_profile.

Please follow the below steps:

  • vi  ~/.bash_profile
  • Add and save the source command in the file.

source /opt/intel/inteloneapi/setvars.sh

  • source ~/.bash_profile

Hope this helps. If you face any issue please let us know.


Thanks


View solution in original post

12 Replies
AthiraM_Intel
Moderator
987 Views

Hi,


Thanks for reaching out to us.


Yes you are correct, the connection loss is due to no activity in the shell.


Regarding the next query, You can export the conda environment path in DevCloud by using below command:


export PATH="/home/uxxxxx/.conda/envs/env_name/bin":$PATH



Hope this helps. Please let us know if you have any further issues.


ofiryaish
Novice
983 Views

So what can be done in order to fix this? I working on Visual Studio code, and the connection is always closed, and it's annoying.

For second answer, It still not working on Visual Studio code, and I get "conda: command not found"

 

Thank you,

ofir

ofiryaish
Novice
981 Views

While trying to fix this, I tried to do "conda update conda" in the shell that conda commands are working (e.g., linux shell or powershell of windows), and I get   

Preparing transaction: done
Verifying transaction: failed

EnvironmentNotWritableError: The current user does not have write permissions to the target environment.
environment location: /glob/development-tools/versions/oneapi/beta08/inteloneapi/intelpython/latest
uid: 32614
gid: 32614

AthiraM_Intel
Moderator
969 Views

Hi,

Since We don't have write permission in DevCloud, conda update conda will show this error.

Could you please let us know, whether your "conda: command not found" error resolved ? Because you are able to run the conda update conda command.

  

Regarding the connection loss, you can prevent ssh session from exiting.

 In Cygwin we have "ServerAliveInterval" option , could you please check the below link for more information.

 https://superuser.com/questions/612401/keeping-cygwin-ssh-session-alive


Thanks


ofiryaish
Novice
967 Views
Maybe I wasn't clear. I manage to run conda commands on shells of linux or the PowerShell of windows. My problem happens on the shell on the visual studio code.

About the connection. I managed to do it, and I think it works now. Thank you
AthiraM_Intel
Moderator
957 Views

Hi,


We are checking on it and will get back to you soon.


Thanks


AthiraM_Intel
Moderator
947 Views

Hi,

Could you please let us know which shell are you using in visual studio code?

You can activate the oneapi environment before using conda command.

Please find the below command to activate the oneapi environment:

source /opt/intel/inteloneapi/setvars.sh


If the issue still persists, please let us know.


Thanks


ofiryaish
Novice
913 Views

Hey, sorry for replying so late. I didn't see your answer. 
I'm using Bash shell in visual studio code.
It's working when I use 'source /opt/intel/inteloneapi/setvars.sh' before using conda commands. 

How I make this work by default without passing 'source /opt/intel/inteloneapi/setvars.sh' each use?

 

Thank you,
Ofir

AthiraM_Intel
Moderator
917 Views

Hi,


Could you please give us an update? Is your issue resolved?


Thanks


AthiraM_Intel
Moderator
905 Views

Hi,


Glad to know that your issue got resolved.

You can use the oneapi environment as default by setting the 'source /opt/intel/inteloneapi/setvars.sh' command in the bash_profile.

Please follow the below steps:

  • vi  ~/.bash_profile
  • Add and save the source command in the file.

source /opt/intel/inteloneapi/setvars.sh

  • source ~/.bash_profile

Hope this helps. If you face any issue please let us know.


Thanks


View solution in original post

ofiryaish
Novice
897 Views
AthiraM_Intel
Moderator
887 Views

Hi,


Thanks for the confirmation. We won't be monitoring this thread anymore. Kindly raise a new thread  if you have further issues.




Reply