'AWS LightSail SSH says UPSTREAM_NOT_FOUND And Also not able to connect by PUTTY
ssh -i "LightsailDefaultKey-ap-south-1.pem" bitnami@[ip-of-lightsail-instance] ssh: connect to host 6[ip-of-lightsail-instance] port 22: Connection timed out
UPSTREAM_NOT_FOUND An error occurred and we were unable to connect or stay connected to your instance. If this instance has just started up, try again in a minute or two. UPSTREAM_NOT_FOUND [519]
PUTTY says Connection Timeout
Solution 1:[1]
Ran into the same problem. Managed to log in after rebooting from the browser. My problem started after some upgrades and updates and heavy installations that took up most of my 512MB memory. The solution going forward is to create a swapfile to improve the performance of the system.
Solution 2:[2]
I struggled with this 519 Upstream Error for several days in Lightsail as well. I could not connect via SSH-in-Browser, nor via SSH in my Mac Terminal. It simply timed out.
However, I found a solution that works -
In short, you can:
- Create a snapshot of the "broken server"
- Export to Amazon EC2 (think of EC2 as a more manipulatable version of Lightsail)
- Create a new volume from that snapshot in EC2, and mount it on a new machine image
There is a great video here that I followed step by step: https://www.youtube.com/watch?v=EN2oXVuOTSo
After following those steps, I was able to SSH in to the new volume, and recover all my data in the /mnt directory. You may need to change some permissions with chown to access the data.
Solution 3:[3]
Were you able to make your instance working, or it was just data retrieval? For only data and files, EC2 is not required. You can use AWS cli to create disksnapshot, then create disk, and attach to any instance, mount and then access files.
Solution 4:[4]
Create a snapshot and add script
sudo ufw disable
sudo iptables -F
sudo mv /etc/hosts.deny /etc/hosts.deny_backup
sudo touch /etc/hosts.deny
echo "Port 22" >> /etc/ssh/sshd_config
systemctl restart sshd
sudo systemctl enable sshd
sudo systemctl restart sshd
Wait 10-15minutes. Done! Issue fixed :-)
Solution 5:[5]
For anyone interested, I set detect_anomaly=True in Trainer, then was able to trace the torch function outputting NaNs during backpropagation. In my case it was torch.atan2 so I added a tiny epsilon to its denominator and fixed it, but as a general point I've always found denominator epsilons to be really helpful in preventing NaNs from dividing functions!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kaluba Chibesakunda |
| Solution 2 | Mark Zee |
| Solution 3 | user17187799 |
| Solution 4 | RBT |
| Solution 5 | Jack Walters |
