You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defget_cmd(pod_id: str):
pod_stat=runpod.get_pod(pod_id)
runtime=pod_stat.get('runtime') or {}
ports_info=runtime.get('ports', [])
ifnotports_info:
raiseValueError(f"Pod {pod_id} is not ready.")
ssh_cmd=Nonecurl_cmd=Noneforpinports_info:
ifp['isIpPublic']:
ifp['privatePort'] ==22:
ssh_cmd=f'ssh -i ~/.ssh/id_rsa -p {p["publicPort"]} root@{p["ip"]}'ifp['privatePort'] ==9000:
curl_cmd=f'curl http://{p["ip"]}:{p["publicPort"]}'assertssh_cmdisnotNoneandcurl_cmdisnotNone, f"Pod {pod_id} is not ready."returnssh_cmd, curl_cmd# Fill in the pod id retrieved from previous scriptrp1_id='qi5a6pnu01x2zl'rp2_id='3k3hy87mtr2old'rp1_ssh, rp1_curl=get_cmd(rp1_id)
rp2_ssh, rp2_curl=get_cmd(rp2_id)
print(rp1_curl)
print(rp2_curl)
print(f'{rp1_ssh}{rp2_curl}')
print(f'{rp2_ssh}{rp1_curl}')
Trying to run the 4 commands we get from the script. The first two (from the laptop running runpod api calls) success but the third and the fourth (which doing curl inside the pod) failed.
$ curl http://69.30.85.69:22145
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
...
$ curl http://69.30.85.69:22186
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
...
$ ssh -i ~/.ssh/id_rsa -p 22144 root@69.30.85.69 curl http://69.30.85.69:22186
The authenticity of host '[69.30.85.69]:22144 ([69.30.85.69]:22144)' can't be established.ECDSA key fingerprint is SHA256:8wlRef+5KXU62d7TkPvMan6bkdkyUgPxt4qP4WyWFrw.Are you sure you want to continue connecting (yes/no/[fingerprint])? yesWarning: Permanently added '[69.30.85.69]:22144' (ECDSA) to the list of known hosts. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (7) Failed to connect to 69.30.85.69 port 22186: Connection refused$ ssh -i ~/.ssh/id_rsa -p 22185 root@69.30.85.69 curl http://69.30.85.69:22145The authenticity of host '[69.30.85.69]:22185 ([69.30.85.69]:22185)' can't be established.
ECDSA key fingerprint is SHA256:8wlRef+5KXU62d7TkPvMan6bkdkyUgPxt4qP4WyWFrw.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[69.30.85.69]:22185' (ECDSA) to the list of known hosts.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to 69.30.85.69 port 22145: Connection refused
The same command works well if the two pod is from different region (tested with CA and SE).
Expected behavior
The exposed endpoint is accessible from anywhere, including other pods started by runpod.
Screenshots
Pls see the console logs before.
Desktop (please complete the following information):
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
$ pip show runpod
Name: runpod
Version: 1.7.0
Summary: 🐍 | Python library for RunPod API and serverless worker SDK.
Home-page: https://runpod.io
Author: RunPod
Author-email: RunPod <engineer@runpod.io>, Justin Merrell <justin.merrell@runpod.io>
License: MIT License
Location: /home/memory/install/miniconda3/envs/sky/lib/python3.9/site-packages
Requires: aiohttp, aiohttp-retry, backoff, boto3, click, colorama, cryptography, fastapi, inquirerpy, paramiko, prettytable, py-cpuinfo, requests, tomli, tomlkit, tqdm-loggable, urllib3, watchdog
Required-by:
Additional context
None
The text was updated successfully, but these errors were encountered:
I also need help with connecting to pods. Connecting via "Basic SSH Terminal" works, but "SSH over exposed TCP" doesn't. I checked the ~/.ssh/authorized_keys file on the pod, and it matches the public key corresponding to the private key I'm using while SSHing. The error I receive is
ssh: connect to host 213.173.108.100 port 12157: Connection refused
Describe the bug
The ports exposed through TCP Public IP cannot be accessed inside pods within same region.
To Reproduce
Example output:
Expected behavior
The exposed endpoint is accessible from anywhere, including other pods started by runpod.
Screenshots
Pls see the console logs before.
Desktop (please complete the following information):
Additional context
None
The text was updated successfully, but these errors were encountered: