Pivotal Knowledge Base


App Fails to Start with Error Message "Status Code: 500" in Pivotal Cloud Foundry®


Pivotal Cloud Foundry® (PCF) versions 1.5.x and 1.6.x


When trying to start or stage an app, the following message is seen: 

starting app <APP-NAME> in org <ORG-NAME> / space <SPACE-NAME> as <USER-NAME>... FAILED Server error, status code: 500, error code: 10001, message: An unknown error occurred.

Upon examining the Cloud Controller VM logs, you see the following error in cloud_controller_ng.log:

message":"Request failed: 500: 
{\"code\"=>10001, \"description\"=>\"getaddrinfo: Name or service not known\"


The /etc/resolv.conf file should have the following order of DNS server addresses:

Line 1 -

Line 2 - DNS server address for network in Ops Manager

Line 3 - IP Address of the Director VM

If the order is changed, DNS resolution can fail because the hostnames sent are internal only. When the other IP address is on the first line and it doesn't resolve the address, the app doesn't return to resolv.conf to try another IP address for a DNS server. It fails and gives the "unknown error" message.


Use BOSH to SSH into the cloud_controller-partition VM and enable sudo rights. "cd" to the /var/vcap/sys/log/cloud_controller_ng directory to find the logs; the   cloud_controller_ng.log file is what we will be looking for. 

On running a "tail -f" on the cloud_controller_ng.log, you can see the "500 error" message appear again when the user tries to restart or push an app. The error entry will look something like this:

message":"Request failed: 500: 
{\"code\"=>10001, \"description\"=>\"getaddrinfo: Name or service not known\"

The "getaddrinfo" error description indicates to us that this is an issue with the DNS server. The next step is to get an address that should definitely be reachable. "cd" to the /var/vcap/jobs/cloud_controller_ng/config directory and open the cloud_controller_ng.yml file. 

What we need here is an address that we should definitely be able to reach. You'll see an entry at the top of this file that looks similar to this: "internal_service_hostname: cloud-controller-ng.service.cf.internal". You should be able to run a successful "dig" or "ping" on the cloud-controller-ng.service.cf.internal since it is an internal DNS. If this attempt is unsuccessful, then something is wrong with the local resolver.

From here, "cd" to the /etc/resolv.conf file. Open this file and you should see contents similar to the following:


The IP addresses above are for the local resolver (, custom DNS server addresses added through Ops Manager, and the IP address of the Director. The "" entry should be the first entry since this is the local resolver. If it is anything else, try switching the position of the "" entry with the first entry. Save and exit the "resolv.conf" file. Now, try to ping /digcloud-controller-ng.service.cf.internal (or the appropriate entry for "internal_service_hostname" in the previous step).

If you are successful, you have proven there is something wrong with the DNS at the address that was previously the first entry, and you have proven that the local resolver is working again. 

Try to push an app again to verify. 

Note- This was experienced in a 1.6.9 Elastic Runtime environment.



Powered by Zendesk