HTTP 503 error after first deploy - dotcloud

After my first deploy on Next dotCloud I saw a 503 error when visiting the site. Haven't found anything in the logs.

The problem was that no web container was running.
The solution is to call
$ dcapp <app name>/default deploy --container 1

Related

Nginx Proxy Manager redirects hosted website to 502 Bad Gateway

I have a website running where I use Nginx Proxy Manager to redirect to this website. However, as soon as I hit my website I get the following message:
Does anyone have a clue what is happening here?
Finally, I came to the following conclusion. I think from my experience it can mean two things:
Either your website/docker container is not running
Or Nginx cannot find an index.html file on the main root of web address 'example.com'.
However, hostinger.com points out the following:
Unresolved domain name
Server overload
Browser issues
Home-network equipment error
Firewall blocks
So make sure that index.html is present for your website and you have trouble shooted your container where you are 100% sure that docker container has no exceptions, errors and runs perfectly fine. Try use something like 'docker-compose logs' where the docker-compose.yml is located (this only works for a running docker container)

Getting 503 error after every 30 seconds with akka and node js env

we have created one api to export patient details in csv file, this export request takes 2.5 min to execute.
we are using below technology for this app: Scala, akka, nginx and react/node js as front end.
when i will hit on export link, request got executed and able to see in logs.
but immediately after 30sec got error on browser console GET /export/request 503 (service unavailable ) with java script error in promise block.
after refering akka documentation i have increased ideal-timeout setting to 240s.
application.conf
http {
server {
request-timeout: 240s
idle-timeout: 240s
}
}
and it works on my local/development env. /export/ request was executed in 2 min.
after deploying this change at TEST env. issue is still there getting 503 after 30 sec.
on TEST env. application is running with docker env.
request flow/application setup:
Internal AWS load balancer => EC2 instance => nginx proxy (listing :80) => front end app (react js app) => backend (scala and akka)
i have not found any configuration key which has set to 30s.
Could you please help me with this ?
Many thanks
It seems your problem is on any intermediary proxy. You can perform your request with curl and check the response header Server:
curl -v -s -o /dev/null your_hostname/export/request
If it were akka you'd see a line as follows:
< Server: akka-http/10.2.4
Hopefully you can get more insights on your issue with this technique

DCOS Marathon-LB returns 503

I deployed application 1 on service port 10101. It's an external facing app with label HAPROXY_0_VHOST=vhost1.xxx.xxx. And it works with no problems.
Then I deployed a similar application 2 on service port 10102, with HAPROXY_1_VHOST=vhost2.xxx.xxx. I read Marathon-LB's document and this is my understanding of how to deploy 2 apps on different VHOST. However, curl http://vhost2.xxx.xxx returns HTTP/1.0 503 Service Unavailable.
I confirmed that application 2 is running normally by checking the result from curl marathon-lb.marathon.mesos:10102 on DCOS master node.
Did I configure VHOST incorrectly? Or something else was wrong?
Figured this out: the app for vhost2 should be labeled HAPROXY_0_VHOST=vhost2.xxx.xxx instead of HAPROXY_1_VHOST=vhost2.xxx.xxx. The documentation is note clear here.

WildFly 10.1.0.Final | Loading page during deployment | default-response-code is ignored

I wanted to distinguish between "deployment pending" and "deployment failed" and display a loading or a error page respectively. Therefore I tried to set the value default-response-code in the undertow configuration.
<host name="default-host" alias="localhost" default-response-code="503">
But when I start the server I still receive 404's when accessing the address of my deployment during the deployment process.
Did I miss something or is there a better way to show a loading page during a the deployment process?
I solved this problem by adding a custom Undertow HttpHandler as WildFly module. After adding this handler as filter in my WildFly configuration it returns HTTP Status Code 503 until the deployment unit is successfully deployed.
I followed this example with a few modifications:
https://github.com/thomasdarimont/undertow-extensions
The failure of the 503 to over-ride the 404 can be fixed by following the advice here http://lists.jboss.org/pipermail/undertow-dev/2017-January/001861.html which suggests removing the welcome-content filter. This does fix the issue. However it still remains how to customise the 503 page as 503 - Service Unavailable is not a very user friendly message.

How to display "Application is down for upgrade" message when redeploying Glassfish application?

I tried to access a web application while it was in the process of redeploying or reloading, and I just got a 404 error. This is likely to result in time-wasting helpdesk calls if a user happens to see it. How can I replace the 404 message with something more helpful, like "This application is being upgraded - check back in a minute or two"?
You may want to consider looking at Application Versioning feature to "pre-deploy" an application to minimize the impact.
Deploy your app:
$ asadmin deploy myapp.war
Deploy version2 in "disabled" mode, meaning the old version is still active:
$ asadmin deploy --enabled=false --name myapp:version2 myapp.war (version2 is an arbitrary name)
When ready to activate version2:
$ asadmin enable myapp:version2
The nice thing about this approach is that if you run into issues with version2, you can always fall back to the original version:
$ asadmin enable myapp
I normally deploy my webapps behind an Apache proxy. When the appserver goes down Apache returns a 503 response.
This can be customised with an alternative "I'm sorry we're doing maintanence" message
You can also customize the standard response codes (403, 404, etc.) in the server configuration. The simple change is to change the message text, but it isn't as elegant as what you are looking for. However, there will always be a point where the environment will return 404, 503, etc., so you might consider adding this, in addition to, the "behind the proxy" answer provided by #Mark O'Connor.