How to debug Open Shift 503 Service Unavailable error

I have a node application that I am trying to deploy to Open Shift. This is the main express, almost vanilla from the express generator. It works locally. When I click OpenShift, I get the following error:

503 Service Unavailable No server is available to handle this request. 

Now I'm not surprised that there are errors, because I clicked on an all-new application to open the shift at a time, but I want to know how to find it?

How do I debug this? How can I hack into a server and see what happens?

+5
source share
3 answers

You can try the following:

  • rhc tail <app_name> to view log files on the server
  • Connect to the server with SSH, look at the logs in ~/app-root/logs
  • If it is a scaled application, go to http://<app_name>-<your_namespace>.rhcloud.com/haproxy-status to view the status of your scaled transfers
+9
source

I know this is pretty old, but I had a problem with this error 503. My log tail showed that the application was ok, but the HA Proxy Status link showed that the site was down. I am running a Node Express application that handles requests for specific endpoints, and I did not have a handler defined for the root "/" request. I ended up adding

 app.get('/', function (req, res) { res.status('200').send('Service is up'); }); 

and everything's good.

+1
source

Today I am stuck in a similar "503 Service Unavailable" when deploying the Simple Spring Boot application in Minishift (that is, in the local Openshift).

For me, the problem was that in the Dockerfile I did not have the "EXPOSE" line that I used to create the Docker image.

At first I missed it, but the "oc new-app" command actually hints at this:

 * The image does not expose any ports - if you want to load balance or send traffic to this component you will need to create a service with 'expose dc/sb-test --port=[port]' later 
0
source

Source: https://habr.com/ru/post/1207814/


All Articles