Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Appears to Start but Cannot Be Accessed After PM2 Restart #11374

Open
majormj opened this issue Nov 11, 2024 · 0 comments
Open

Application Appears to Start but Cannot Be Accessed After PM2 Restart #11374

majormj opened this issue Nov 11, 2024 · 0 comments
Labels
bug It's a bug

Comments

@majormj
Copy link

majormj commented Nov 11, 2024

Operating system

Linux

Joplin version

v1.22.19

Desktop version info

No response

Current behaviour

Hi,

I'm using yarn run v1.22.19 to execute the command pm2 kill && pm2 start --no-daemon --exp-backoff-restart-delay=1000 dist/app.js to restart my application. Despite the logs indicating that the application starts successfully, it cannot actually be accessed after the PM2 restart.

Here is the output from the command:

yarn run v1.22.19
$ pm2 kill && pm2 start --no-daemon --exp-backoff-restart-delay=1000 dist/app.js
[PM2] Spawning PM2 daemon with pm2_home=/home/joplin/.pm2
[PM2] PM2 Successfully daemonized
[PM2][WARN] No process found
[PM2] [v] All Applications Stopped
[PM2] [v] PM2 Daemon Stopped
pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)
2024-11-11T06:51:23: PM2 log: Launching in no daemon mode
2024-11-11T06:51:23: PM2 log: [PM2] Starting /home/joplin/packages/server/dist/app.js in fork_mode (1 instance)
2024-11-11T06:51:23: PM2 log: App [app:0] starting in -fork mode-
2024-11-11T06:51:23: PM2 log: App [app:0] online
2024-11-11T06:51:23: PM2 log: [PM2] Done.
2024-11-11T06:51:23: PM2 log: ┌────┬────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ app │ default │ 3.0.1 │ fork │ 58 │ 0s │ 0 │ online │ 0% │ 39.5mb │ joplin │ disabled │
└────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
2024-11-11T06:51:23: PM2 log: [--no-daemon] Continue to stream logs
2024-11-11T06:51:23: PM2 log: [--no-daemon] Exit on target PM2 exit pid=47
06:51:25 0|app | 2024-11-11 06:51:25: App: Starting server v3.0.1 (prod) on port 22300 and PID 58...
06:51:25 0|app | 2024-11-11 06:51:25: App: Checking for time drift using NTP server: pool.ntp.org:123

Expected behaviour

Although the logs indicate that the application has started successfully (App [app:0] online), I am unable to access the application after the PM2 restart. The application should be accessible via http://localhost:22300, but it does not respond to requests.

Could you please help me understand what might be causing this issue and how to resolve it?

Thank you!

Logs

No response

@majormj majormj added the bug It's a bug label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

1 participant