uptime-kuma
uptime-kuma copied to clipboard
App doesn't run using PM2
⚠️ Please verify that this bug has NOT been raised before.
- [X] I checked and didn't find similar issue
🛡️ Security Policy
- [X] I agree to have read this project Security Policy
Description
I installed Uptime Kuma using instructions Without Docker (Recommended for x86/x64 only) and started it using node server/server.js command, all works fine.
I saved the process using pm2 (version 5.2.0) to run in background, it correctly shows as online in the list of pm2 processes but browsing the app results as unreachable. So i checked the pm2 logs and i noticed some errors.
👟 Reproduction steps
Run the app in background using pm2: pm2 start server/server.js --name uptime-kuma
👀 Expected behavior
Browsing the address site app run normally.
😓 Actual Behavior
The app isn't reachable.
🐻 Uptime-Kuma Version
1.19.2
💻 Operating System and Arch
Windows Server 2019
🌐 Browser
Google Chrome 108.0.5359.125
🐋 Docker Version
No response
🟩 NodeJS Version
14.20.1
📝 Relevant log output
3|uptime-k | 2022-12-27T17:02:41+01:00 [SERVER] INFO: Server Type: HTTP
3|uptime-k | 2022-12-27T17:02:41+01:00 [SERVER] INFO: Importing this project modules
3|uptime-k | 2022-12-27T17:02:41+01:00 [NOTIFICATION] INFO: Prepare Notification Providers
3|uptime-k | 2022-12-27T17:02:41+01:00 [SERVER] INFO: Version: 1.19.2
3|uptime-k | 2022-12-27T17:02:41+01:00 [DB] INFO: Data Dir: ./data/
3|uptime-k | 2022-12-27T17:02:41+01:00 [SERVER] INFO: Connecting to the Database
3|uptime-k | 2022-12-27T17:02:41+01:00 [DB] INFO: SQLite config:
3|uptime-k | [ { journal_mode: 'wal' } ]
3|uptime-k | [ { cache_size: -12000 } ]
3|uptime-k | 2022-12-27T17:02:41+01:00 [DB] INFO: SQLite Version: 3.39.4
3|uptime-k | 2022-12-27T17:02:41+01:00 [SERVER] INFO: Connected
3|uptime-k | 2022-12-27T17:02:41+01:00 [DB] INFO: Your database version: 10
3|uptime-k | 2022-12-27T17:02:41+01:00 [DB] INFO: Latest database version: 10
3|uptime-k | 2022-12-27T17:02:41+01:00 [DB] INFO: Database patch not needed
3|uptime-k | 2022-12-27T17:02:41+01:00 [DB] INFO: Database Patch 2.0 Process
C:\ProgramData\pm2\home\logs\uptime-kuma-error.log last 15 lines:
3|uptime-k | at processTicksAndRejections (internal/process/task_queues.js:96:32)
3|uptime-k | If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
3|uptime-k | [Error: update `setting` set `key` = 'databasePatchedFiles', `value` = '{"patch-setting-value-type.sql":true,"patch-improve-performance.sql":true,"patch-2fa.sql":true,"patch-add-retry-interval-monitor.sql":true,"patch-incident-table.sql":true,"patch-group-table.sql":true,"patch-monitor-push_token.sql":true,"patch-http-monitor-method-body-and-headers.sql":true,"patch-2fa-invalidate-used-token.sql":true,"patch-notification_sent_history.sql":true,"patch-monitor-basic-auth.sql":true,"patch-add-docker-columns.sql":true,"patch-status-page.sql":true,"patch-proxy.sql":true,"patch-monitor-expiry-notification.sql":true,"patch-status-page-footer-css.sql":true,"patch-added-mqtt-monitor.sql":true,"patch-add-clickable-status-page-link.sql":true,"patch-add-sqlserver-monitor.sql":true,"patch-add-other-auth.sql":true,"patch-grpc-monitor.sql":true,"patch-add-radius-monitor.sql":true,"patch-monitor-add-resend-interval.sql":true,"patch-maintenance-table2.sql":true}', `type` = NULL where `id` = 2 - SQLITE_READONLY: attempt to write a readonly database] {
3|uptime-k | errno: 8,
3|uptime-k | code: 'SQLITE_READONLY'
3|uptime-k | }
3|uptime-k | Trace: [Error: update `setting` set `key` = 'databasePatchedFiles', `value` = '{"patch-setting-value-type.sql":true,"patch-improve-performance.sql":true,"patch-2fa.sql":true,"patch-add-retry-interval-monitor.sql":true,"patch-incident-table.sql":true,"patch-group-table.sql":true,"patch-monitor-push_token.sql":true,"patch-http-monitor-method-body-and-headers.sql":true,"patch-2fa-invalidate-used-token.sql":true,"patch-notification_sent_history.sql":true,"patch-monitor-basic-auth.sql":true,"patch-add-docker-columns.sql":true,"patch-status-page.sql":true,"patch-proxy.sql":true,"patch-monitor-expiry-notification.sql":true,"patch-status-page-footer-css.sql":true,"patch-added-mqtt-monitor.sql":true,"patch-add-clickable-status-page-link.sql":true,"patch-add-sqlserver-monitor.sql":true,"patch-add-other-auth.sql":true,"patch-grpc-monitor.sql":true,"patch-add-radius-monitor.sql":true,"patch-monitor-add-resend-interval.sql":true,"patch-maintenance-table2.sql":true}', `type` = NULL where `id` = 2 - SQLITE_READONLY: attempt to write a readonly database] {
3|uptime-k | errno: 8,
3|uptime-k | code: 'SQLITE_READONLY'
3|uptime-k | }
3|uptime-k | at process.<anonymous> (C:\uptime-kuma\server\server.js:1779:13)
3|uptime-k | at process.emit (events.js:412:35)
3|uptime-k | at processPromiseRejections (internal/process/promises.js:245:33)
3|uptime-k | at processTicksAndRejections (internal/process/task_queues.js:96:32)
3|uptime-k | If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues
SQLITE_READONLY
Please make sure your user have read-write permissions.
Hi @louislam, i checked the uptime-kuma folder permission cloned via git and the permissions are ok (full control).
Also, running the app using node server/server.js command i have no errors, only using pm2.
I had to add Everyone and set as full control in the Windows permission for the uptime-kuma folder, now it's ok.