Getting network is down errors via host name, but ip works fine. #1693
-
Checklist
ConfigurationIOS 16.2 I’ve checked that Blink has local network access and it does. Describe the bugSo I have an internal host running Ubuntu 18.04, and when i try to SSH to it using the hostname, it doesn’t work, if i SSH using the ip it does work. I don’t have any ssh hosts defined. Example session: blink> ping reliquary.moondine.raganit.com PING reliquary.moondine.raganit.com (172.16.236.130): 56 data bytes 64 bytes from 172.16.236.130: icmp_seq=0 ttl=64 time=2.829 ms 64 bytes from 172.16.236.130: icmp_seq=1 ttl=64 time=2.944 ms |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
By chance is your device jailbroken? I only ask because I ran into this myself at one point, and it was because I had an issue in my /etc/hosts file in my local device. |
Beta Was this translation helpful? Give feedback.
-
Specifically, I think I had moved my hosts file to /etc/hosts.old and forgot to move it back, causing inconsistent name resolution behavior. |
Beta Was this translation helpful? Give feedback.
-
Nope, and if it helps, this device has never been jailbroken. I’m also pretty sure ssh using host names used to work |
Beta Was this translation helpful? Give feedback.
-
Sorry you are experiencing this issue. Nothing has changed there so the issue may well be temporary. Ping is solving the address using the usual POSIX C functions, but our ssh implementation uses iOS Sockets, which in theory are mostly the same except for iOS optimizations. If I recall, from my experience debugging this part of the code, I think that may be what is going on. If for some reason a socket would try to connect multiple times without success, at one point it will internally mark that part of the network down until it can figure out how to connect there again. One possible workaround would be to use a Host from config. We also provide ssh2 command, which if I recall has been using the older libssh2 functions, and that may have more luck. Sorry again, don’t have a magic wand for this one. |
Beta Was this translation helpful? Give feedback.
Sorry you are experiencing this issue. Nothing has changed there so the issue may well be temporary. Ping is solving the address using the usual POSIX C functions, but our ssh implementation uses iOS Sockets, which in theory are mostly the same except for iOS optimizations. If I recall, from my experience debugging this part of the code, I think that may be what is going on. If for some reason a socket would try to connect multiple times without success, at one point it will internally mark that part of the network down until it can figure out how to connect there again.
One possible workaround would be to use a Host from config. We also provide ssh2 command, which if I recall has been us…