Troubleshoot Error 502

Before investigating further, the more common cause of this issue is that your application is using another port than the one setup in your the networking settings.

Qoddi automatically apps to uses the 8080 port (in most of the cases) but some NodeJS apps use 3000 or another port instead.

Qoddi automatically create en environment variable with the port used by the app at the first app creation. You can either replace this environment variable by the one used by your application or use the environment variable inside your code (using const PORT = process.env.PORT for instance).

The other common cause of this error is that a Procfile is missing from your repository and Qoddi doesn’t know how to start your app.

When you deploy an app on Qoddi, you may come across this page, pictured below, instead of seeing your app run:

That error can be a result of several reasons, which include:

  • If you just deployed or built your app, Qoddi may still be working on it so, verify that your app status is running.
  • Qoddi automatically restarts any stopped or crashed container but, if you want to force a restart, you have to open the “Settings” page and click save under the Network settings tab (without modifying anything):
    This action will force the restart of your app.
  • In the same network settings tab, you should verify that the App Port identified there matches the container port used by your app.
  • Make sure the current build is running and has not failed. You can verify the current status inside the “Logs” tab :
  • If there was no other build that was running before, and the last build for your app failed, the error will persist until a valid one gets deployed to the app.
  • Check the running app Logs to make sure your app is running as expected and that the app is not encountering any unexpected error.

Verify your app logs

Click on Logs on your app’s settings page to check the logs of your running app.

This kind of error happens often and it’s ready to fix:

ERROR: failed to launch: determine start command: when there is no default process a command is required

This means your app doesn’t know the appropriate command to launch. For a NodeJS app verify the values of start inside the package.json file and add a Procfile if required.

Check on your language the required files and settings for your app.

Visit this page for more information

Java and Postgres databases

Another common error with Java and Postgres databases is that the Postgres driver uses SSL by default. Since Qoddi’s datastores are stored on a private encrypted network, SSL is not activated.

Please check the Java documentation on how to connect to your Postgres database using the JDBC URL instead of the DATABASE_URL.

If it’s still not working

If anything looks good and you still have issues, we’re here to help!

If you need help, feel free to contact us and we’ll be glad to help you. 

Please note that we are not able to access your app files or modify your code. We can only provide guidance about the current status and possible problems with your app deployment.

Was this helpful?

23 / 13