In attempting to deal with this issue #560, looking at the logs revealed another issue.
For context, Wiki.js is running in a VM using Linux with CentOS.
We were unable to get the Docker image to work previously and this was the only way we could get Wiki.js up.
Actual behavior
Wiki.js continually gets stuck in a loop on startup.
Here is an output of the log and error log.
[user@some_host]$ sudo node wiki start
✔ Wiki.js has started successfully.
[user@some_host]$ tail -f -n 40 logs/wiki-output-0.log
2018-07-03T17:47:37.355Z - info: [SERVER] Wiki.js is initializing...
2018-07-03T17:47:37.768Z - info: [SERVER] Checking data directories...
2018-07-03T17:47:37.770Z - info: [SERVER] Data and Repository directories are OK.
2018-07-03T17:47:38.641Z - info: [SERVER] Checking Git repository...
2018-07-03T17:47:41.525Z - info: [SERVER] Starting HTTP/WS server on port 9090...
2018-07-03T17:47:42.105Z - info: [SERVER] Wiki.js is initializing...
2018-07-03T17:47:42.456Z - info: [SERVER] Checking data directories...
2018-07-03T17:47:42.457Z - info: [SERVER] Data and Repository directories are OK.
2018-07-03T17:47:43.397Z - info: [SERVER] Checking Git repository...
[user@some_host]$ tail -f -n 40 logs/wiki-error-0.log
2018-07-03T17:47:03.344Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:08.060Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:13.161Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:18.187Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:22.864Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:27.741Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:32.410Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:36.948Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:41.574Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:46.316Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:50.819Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:47:55.345Z - error: [SERVER] Port 9090 is already in use!
2018-07-03T17:48:00.005Z - error: [SERVER] Port 9090 is already in use!
We also got a related issue that was discovered during troubleshooting. The logs indicated the following:
pm2 logs wiki --lines 100
0|wiki | 2018-07-03T17:42:31.201Z - error: [SERVER] Unable to write to cache! Performance may be affected.
0|wiki | 2018-07-03T17:42:31.201Z - error: [SERVER] Error: EACCES: permission denied, open '/home/user/dev/wikijs/data/cache/106a6c241b8797f52e1e77317b96a201.json'
0|wiki | 2018-07-03T17:42:31.370Z - error: [SERVER] Unable to write to cache! Performance may be affected.
0|wiki | 2018-07-03T17:42:31.370Z - error: [SERVER] Error: EACCES: permission denied, open '/home/user/dev/wikijs/data/cache/106a6c241b8797f52e1e77317b96a201.json'
Expected behavior
Expect that Wiki.js would initialize and stay started up after:
- Start wikijs: sudo node wiki start
- Stop wikijs: sudo node wiki stop
Actual behavior
Wiki.js continually gets stuck in a loop on startup.
Here is an output of the log and error log.
We also got a related issue that was discovered during troubleshooting. The logs indicated the following:
Expected behavior
Expect that Wiki.js would initialize and stay started up after:
Steps to reproduce the behavior
Restart Wiki.js