Troubleshooting — Fixing Common 503 Service Unavailable and Passenger Errors Print

  • node.js, NodeJS, troubleshoot node.js
  • 0

Troubleshooting Common Node.js Errors in Plesk (503 Service Unavailable)

Because Systron Linux servers use Phusion Passenger to supervise and route traffic to your Node.js application, configuration mishaps can result in a "503 Service Unavailable" error or a detailed Passenger crash page. Below are the most common root causes and how to solve them.

Issue 1: Missing "public" Subdirectory

Symptom: The application fails to start entirely, or files are served as plain text instead of executing.

The Fix: Passenger mandates that your Document Root points to a folder inside your project named public.

  • Open your File Manager, navigate inside your application folder, and create an empty folder named public if it does not exist.
  • Go to your Node.js settings and confirm that the Document Root field explicitly ends with /public (e.g., /httpdocs/my-app/public).

Issue 2: Incorrect Application Startup File

Symptom: Passenger cannot locate the primary entry file, prompting a script execution error.

The Fix: Check the filename of your main script (usually app.js, index.js, or server.js). Ensure the filename matches exactly—including case sensitivity—in the Application Startup File input field on your Plesk Node.js dashboard.

Issue 3: Missing Dependencies or Compilation Faults

Symptom: The log notes "Cannot find module" errors when launching the site.

The Fix: This means required modules are absent or were not fully downloaded. Navigate to the Node.js settings panel and click the NPM Install or Yarn button to rebuild your dependencies. If the error persists, use the File Manager to delete the node_modules folder and package-lock.json file entirely, then trigger the install button fresh.

How to Inspect Your Application Logs

If your website continues to show an error, you can find the raw JavaScript trace details to diagnose the exact line failing code execution:

  • Go to Plesk > Websites & Domains.
  • Click on the Log Browser icon for your domain.
  • Filter the logs to look for Node.js application logs or errors marked in red to pinpoint the exact syntax error or unhandled promise rejection.

Was this answer helpful?

« Back