Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1626 Discussions

Problem with connect devcloud-vscode

ghnunes
Beginner
9,087 Views

Hi, I am trying connect in devcloud-vscode with Linux but I have this error:

[16:26:48.596] > local-server> Spawned ssh: 38317
[16:26:48.598] stderr> OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020
[16:26:48.599] stderr> ssh: connect to host localhost port 5022: Connection refused
[16:26:48.601] > local-server> ssh child died, shutting down
[16:26:48.601] Local server exit: 0
[16:26:48.601] Received install output: OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020
ssh: connect to host localhost port 5022: Connection refused

[16:26:48.602] Stopped parsing output early. Remaining text: OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020ssh: connect to host localhost port 5022: Connection refused
[16:26:48.602] Failed to parse remote port from server output

I follow all the tutorial in https://devcloud.intel.com/oneapi/get_started/aiAnalyticsToolkitSamples/ without problems, but in step 8 - Connect VS Code* to Intel DevCloud I have this error. My file acess-key is:

# DevCloud VSCode config
#########################################################################
Host devcloud-vscode
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Hostname localhost
User xxxxx
Port 5022
IdentityFile ~/.ssh/devcloud-access-key-xxxxxxx.txt

someone else could me help ?

 

 

EDIT:

Now I was able to connect with devcloud-vscode, but I waited for 30 minutes and didn't connect, it follows as messages from the terminal

[18:06:33.493] Log Level: 2
[18:06:33.494] remote-ssh@0.64.0
[18:06:33.494] linux x64
[18:06:33.495] SSH Resolver called for "ssh-remote+devcloud-vscode", attempt 1
[18:06:33.496] "remote.SSH.useLocalServer": true
[18:06:33.496] "remote.SSH.sshPath": ~/.ssh/config
[18:06:33.496] "remote.SSH.sshConfigurationFile": /home/xxxx/.ssh/config
[18:06:33.496] "remote.SSH.useFlock": true
[18:06:33.496] "remote.SSH.lockfilesInTmp": false
[18:06:33.497] "remote.SSH.localServerDownload": auto
[18:06:33.497] "remote.SSH.remoteServerListenOnSocket": false
[18:06:33.497] "remote.SSH.showLoginTerminal": false
[18:06:33.497] "remote.SSH.defaultExtensions": []
[18:06:33.497] SSH Resolver called for host: devcloud-vscode
[18:06:33.497] Setting up SSH remote "devcloud-vscode"
[18:06:33.500] Acquiring local install lock: /tmp/vscode-remote-ssh-devcloud-vscode-install.lock
[18:06:33.508] Looking for existing server data file at /home/xxx/.config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-devcloud-vscode-622cb03f7e070a9670c94bae1a45d78d7181fbd4-0.64.0/data.json
[18:06:33.509] Using commit id "622cb03f7e070a9670c94bae1a45d78d7181fbd4" and quality "stable" for server
[18:06:33.511] Install and start server if needed
[18:06:33.516] Checking ssh with "~/.ssh/config -V"
[18:06:33.521] Got error from ssh: spawn ~/.ssh/config ENOENT
[18:06:33.521] The specified path ~/.ssh/config is not a valid SSH binary
[18:06:33.521] Checking ssh with "ssh -V"
[18:06:33.539] > OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020

0 Kudos
9 Replies
Gopika_Intel
Moderator
9,058 Views

Hi,

 

Thank you for posting in Intel devcloud forum. Could you please confirm the following steps:-

 

1.   Are you able to connect to devcloud via vscode? Ensure you’re getting devcloud-vscode in the bottom left corner. Screenshot attached.

2.   > Now I was able to connect with devcloud-vscode, but I waited for 30 minutes and didn't connect, it follows as messages from the terminal

 

Is your question about devcloud getting disconnected after 30 minutes (timed out message)? Or that you’re not able to connect to VSCode 30 minutes after port forwarding (6th and 7th steps in documentation)?

3.   Ensure SSH Config path is set to the right config file in VSCode.

4.   Ensure you are doing the port forwarding step each time before connecting to devcloud-vscode.

5.   Please share the screenshot after completing the 8th step in documentation.

6.   Also please share the contents of your config file

 

Regards

Gopika

 

0 Kudos
ghnunes
Beginner
9,045 Views

Hello @Gopika_Intel , thank you very much for the reply.

1 - Yes, I can connect to devcloud via vsCode without any problem, follow print 1.

2 - I am unable to connect to devcloud-vscode after the completion of ages 6 and 7, which are the last I can do without errors. (print 2 and 3)

3 - Follow the print 4.

4 - This step I did not do, it may be the problem, because I am having problems with connection refused on port 5022 how can I do?

5 - Follow the print 2 and 3.

6 - See attached, do I need to change anything in it? I simply downloaded it from the website and ran the command bash ~ / Downloads / setup-devcloud-access -......

7 - In print 7 I have this message: "Your service running on port 46493 is available. [See all forwarded ports](command:~remote.forwardedPorts.focus)"

8 - config file:

################################################################################################
# oneAPI DevCloud SSH config
################################################################################################
Host devcloud
User uXXXXX
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-XXXXX.txt guest@devcloud.intel.com

Host devcloud.proxy
User uXXXXX
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T devcloud-via-proxy

# If you must route outgoing SSH connection via a corporate proxy,
# replace PROXY_HOSTNAME and PORT below with the values provided by
# your network administrator.
Host devcloud-via-proxy
User guest
Hostname devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
LocalForward 4022 c009:22
ProxyCommand nc -x PROXY_HOSTNAME:PORT %h %p
################################################################################################

################################################################################################
# DevCloud VSCode config
################################################################################################
Host devcloud-vscode
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Hostname localhost
User uXXXXX
Port 5022
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
################################################################################################

################################################################################################
# SSH Tunnel config
################################################################################################
Host *.aidevcloud
User uXXXXX
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T devcloud nc %h %p
LocalForward 5022 localhost:22
LocalForward 5901 localhost:5901
################################################################################################

################################################################################################
# oneAPI DevCloud SSH config
################################################################################################
Host devcloud
User uXXXXX
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-XXXXX.txt guest@devcloud.intel.com

Host devcloud.proxy
User uXXXXX
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T devcloud-via-proxy

# If you must route outgoing SSH connection via a corporate proxy,
# replace PROXY_HOSTNAME and PORT below with the values provided by
# your network administrator.
Host devcloud-via-proxy
User guest
Hostname devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
LocalForward 4022 c009:22
ProxyCommand nc -x PROXY_HOSTNAME:PORT %h %p
################################################################################################

################################################################################################
# DevCloud VSCode config
################################################################################################
Host devcloud-vscode
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Hostname localhost
User uXXXXX
Port 5022
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
################################################################################################

################################################################################################
# SSH Tunnel config
################################################################################################
Host *.aidevcloud
User uXXXXX
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T devcloud nc %h %p
LocalForward 5022 localhost:22
LocalForward 5901 localhost:5901
################################################################################################

################################################################################################
# oneAPI DevCloud SSH config
################################################################################################
Host devcloud
User uXXXXX
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-XXXXX.txt guest@devcloud.intel.com

Host devcloud.proxy
User uXXXXX
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T devcloud-via-proxy

# If you must route outgoing SSH connection via a corporate proxy,
# replace PROXY_HOSTNAME and PORT below with the values provided by
# your network administrator.
Host devcloud-via-proxy
User guest
Hostname devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
LocalForward 4022 c009:22
ProxyCommand nc -x PROXY_HOSTNAME:PORT %h %p
################################################################################################

################################################################################################
# DevCloud VSCode config
################################################################################################
Host devcloud-vscode
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Hostname localhost
User uXXXXX
Port 5022
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
################################################################################################

################################################################################################
# SSH Tunnel config
################################################################################################
Host *.aidevcloud
User uXXXXX
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T devcloud nc %h %p
LocalForward 5022 localhost:22
LocalForward 5901 localhost:5901
################################################################################################

################################################################################################
# oneAPI DevCloud SSH config
################################################################################################
Host devcloud
User uXXXXX
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T -i ~/.ssh/devcloud-access-key-XXXXX.txt guest@devcloud.intel.com

Host devcloud.proxy
User uXXXXX
Port 4022
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T devcloud-via-proxy

# If you must route outgoing SSH connection via a corporate proxy,
# replace PROXY_HOSTNAME and PORT below with the values provided by
# your network administrator.
Host devcloud-via-proxy
User guest
Hostname devcloud.intel.com
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
LocalForward 4022 c009:22
ProxyCommand nc -x PROXY_HOSTNAME:PORT %h %p
################################################################################################

################################################################################################
# DevCloud VSCode config
################################################################################################
Host devcloud-vscode
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Hostname localhost
User uXXXXX
Port 5022
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
################################################################################################

################################################################################################
# SSH Tunnel config
################################################################################################
Host *.aidevcloud
User uXXXXX
IdentityFile ~/.ssh/devcloud-access-key-XXXXX.txt
ProxyCommand ssh -T devcloud nc %h %p
LocalForward 5022 localhost:22
LocalForward 5901 localhost:5901
################################################################################################

 

Do you need any more information?

 

Thanks for all!

 

 

0 Kudos
ghnunes
Beginner
9,024 Views

Now I was able to start a connection with devcloud-vscode, but it gave this error and does not connect or timeout.

0 Kudos
ghnunes
Beginner
8,965 Views

Hi @Gopika_Intel , please, could you help me? I don't know what else to do.

0 Kudos
Gopika_Intel
Moderator
8,919 Views

Hi,

 

Thank you for providing the information and screenshots.

1 - Yes, I can connect to devcloud via vsCode without any problem, follow print 1.

Ø From the screenshot we could understand that the connection is not done. After a successful connection to devcloud via VSCode will yield this: <screenshot_1>

 

2 - I am unable to connect to devcloud-vscode after the completion of ages 6 and 7, which are the last I can do without errors. (print 2 and 3)

Ø The 6th and 7th steps in the documentation is the port forwarding steps. After successful port forwarding, you’ll get this. (after 6th step < screenshot_2>) (after 7th step < screenshot_3>) NOTE: 6th and 7th steps(the port forwarding steps) are not done in VSCode terminal. Please use linux terminal for that.

Ø Please share your screenshots after port forwarding steps.

 

3 - Follow the print 4.

Ø Config path looks right.

 

4 - This step I did not do, it may be the problem, because I am having problems with connection refused on port 5022 how can I do?

Ø From (2), you’ve done the port forwarding steps - 6th and 7th steps in documentation.

 

So, after config path is set in VSCode

-> Do port forwarding in linux terminals

-> then open VSCode

-> Do the 8th step and 9th step in documentation

-> Connection would be successful

-> You can verify this by checking for the SSH Config name, SSH:devcloud-vscode, in the lower-left corner

-> Open a terminal in VSCode

-> the same node number you’ve port forwarded will be seen in the VSCode terminal< screenshot_4>

 

Hope this helps you.

Regards

Gopika

 

0 Kudos
ghnunes
Beginner
8,908 Views

Hi @Gopika_Intel , I followed yours steps. 

The step 6th and 7th (prints step1-A,step1-B and step1-C) I no have problems, had the sames results that you.

In step 8 when I open my vsCode it looks like this (step2-A). When I click to connect, he spent about 30 minutes trying to connect, but nothing happened, and there was no time out (step2-B). I checked on the terminal that he returns this message to me (step2-C). Do you know what I'm doing wrong?

Thanks!

0 Kudos
Gopika_Intel
Moderator
8,843 Views

Hi,

Thank you for the update. From the screenshot step1-C.jpeg, it seems you executed “ssh s001-n028.aidevcloud” in the same terminal where you executed “ssh devcloud” and “qsub -I”. The port forwarding step involves the use of two terminals.

In the first linux terminal

1.   Execute ssh devcloud

2.   Execute qsub -I(copy the node number)

 

In second linux terminal(Don’t close the first terminal, keep it open)

1.   Execute ssh node_number.aidevcloud  

2.   Port forwarding is done

 

>So after port forwarding step you will have two linux terminals open, Keep them open.(screenshot: terminals_cyg)

>Follow the rest of the steps

>  then open VSCode

-> Do the 8th step and 9th step in documentation

-> Connection would be successful

-> You can verify this by checking for the SSH Config name, SSH:devcloud-vscode, in the lower-left corner

-> Open a terminal in VSCode

-> the same node number you’ve port forwarded will be seen in the VSCode terminal

Regards

Gopika

 

0 Kudos
ghnunes
Beginner
8,826 Views

It worked!!!!
I don't know how to thank you, thank you very much for your help!

0 Kudos
Gopika_Intel
Moderator
8,375 Views

Hi,

Thank you for the confirmation. Glad to know your issue has been resolved. If you need any additional information, please submit a new question as this thread will no longer be monitored.

Regards

Gopika

 

0 Kudos
Reply