- Newest
- Most votes
- Most comments
Hello.
Have you checked the syslog and application logs?
If it is a 503 error, there should be some logs in the application log that will give you some clues for troubleshooting.
Also, if the "sudo systemctl status" command shows a "Degraded" status, the service has failed to start, so try restarting the service with the following command.
If you cannot start the service with the following command, please check the Syslog.
sudo systemctl restart ...
Based on your description, it sounds like your Node.js application service might not be running properly after the maintenance, causing the 503 error.
Since you've already verified that the system is in a "Degraded" state and restarting the instance didn't resolve the issue, here are some steps you can try:
-
Check if your Node.js application service is running by using commands like
systemctl status your-nodejs-service
or checking your process list withps aux | grep node
. -
Try restarting all services on the instance. If your Lightsail instance uses Bitnami (which many Lightsail instances do), you can run:
sudo /opt/bitnami/ctlscript.sh restart
This will restart all services on the instance.
- Check your application logs for any errors that might indicate why the service isn't starting properly. Common locations include:
/var/log/
directory- Your application's log directory
-
Verify that your firewall settings haven't changed and that the necessary ports are open.
-
If none of these steps work, consider creating a snapshot of your instance before making any further changes. This will allow you to recover your data if needed.
The 503 error typically indicates that the web server is running but the application service it's trying to proxy to isn't responding. Restarting your specific Node.js application service should resolve this issue.
Sources
Troubleshoot Ghost instance 503 service unavailable error on Lightsail - Amazon Lightsail
Troubleshoot common Lightsail resource issues - Amazon Lightsail
lightsail suddenly cannot be accessed | AWS re:Post
Relevant content
- asked 6 years ago
I'm not finding any application logs. I've checked the system logs in /var/logs, but there's a lot there and I don't know what to look for (https://imgur.com/LCFDtIm) Also, as I said, I've stopped and restarted the instance before posting the question. This fixed the "Degraded" message and now the instance returns a green "Running" status, but the service is unavailable still.
Please try starting the Node.js service by executing the command as described in the following document. https://docs.bitnami.com/aws/infrastructure/nodejs/administration/control-services/
Also, if you are using bitnami Node.js, Apache logs will be output to "/opt/bitnami/apache/logs/". https://docs.bitnami.com/aws/infrastructure/nodejs/troubleshooting/debug-errors-apache/