-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Container is marked as unhealthy #3665
Comments
Same here. Can add to this that Portainer shows the error "sh: can't open 'DockerHealthcheck.sh': No such file or directory" on the container health report. Edit: I've also found a difference in the latest image: On the image layers, previous images referenced this in layer 18: 18 | 0 B | HEALTHCHECK &{["CMD-SHELL" "sh DockerHealthcheck.sh"] "0s" "0s" "0s" '\x00'} Yet latest image references this: 18 | 0 B | HEALTHCHECK &{["CMD-SHELL" "node docker_healthcheck.js"] "0s" "0s" "10s" '\x00'} Hope this tidbit is useful. Edit 2: Going through the changelog, perhaps it's related to #3582 |
Hello, could you provide output from this command?
Do you have some specific setup? TLS configured in trilium, different port etc.? |
Output: https://pastebin.com/P4Duj0R0 I have Trilium behind Traefik, using the default port (8080). I'm not using TLS in the container, certs are managed by Traefik. Since the update the container runs but it doesn't get routed by Traefik, so it's not accessible. |
I had this experience as well with a similar rev proxy setup. turned the normal port config back on, tested, turned off and it is working now without having a host exposed port. 🤷️ edit: healthcheck seems fine as well |
{"Status":"unhealthy","FailingStreak":2528,"Log":[{"Start":"2023-03-03T08:10:34.870633994+01:00","End":"2023-03-03T08:10:35.215146694+01:00","ExitCode":2,"Output":"sh: can't open 'DockerHealthcheck.sh': No such file or directory\n"},{"Start":"2023-03-03T08:11:05.411672947+01:00","End":"2023-03-03T08:11:05.480141764+01:00","ExitCode":2,"Output":"sh: can't open 'DockerHealthcheck.sh': No such file or directory\n"},{"Start":"2023-03-03T08:11:35.535185153+01:00","End":"2023-03-03T08:11:35.61732857+01:00","ExitCode":2,"Output":"sh: can't open 'DockerHealthcheck.sh': No such file or directory\n"},{"Start":"2023-03-03T08:12:05.677653081+01:00","End":"2023-03-03T08:12:05.75205972+01:00","ExitCode":2,"Output":"sh: can't open 'DockerHealthcheck.sh': No such file or directory\n"},{"Start":"2023-03-03T08:12:35.784502134+01:00","End":"2023-03-03T08:12:35.855438693+01:00","ExitCode":2,"Output":"sh: can't open 'DockerHealthcheck.sh': No such file or directory\n"}]} I'm using the nginx-pm as reverse proxy. Except the unhealty state tillium is working OK over here. |
I am not privy to Docker and Traefik internal workings, but I cannot find the Trilium container on the list of containers in Traefik's dashboard, so I have the theory that somehow the unhealthy status either prevents the propagation of the container's labels and Traefik can't pick them up, or Traefik is refusing to route Trilium's container due to the healthcheck. I've checked everything thrice, config hasn't changed and both Traefik and Trilium containers are on the same network. I've tried restarting and recreating both containers to no avail. I doubt it's pertinent, but just in case I'm running the official Traefik v2.2 image. Edit: Further investigation led me to find this Traefik issue that mentions how Traefik won't list nor route containers until their status is 'healthy': traefik/traefik#7842 So, Trilium is supposed to be working OK, even though the healthcheck fails, but I can't access it due to this Traefik feature. Edit 2: Workaround: I mounted
And completely bypassed the healthcheck. Now Traefik is picking up the container and routing it. Haven't found any other problems so far, everything is working as expected. |
There was a change and trilium 0.59 which now uses But this is correctly set up in the Dockerfile in the published images as visible here. So I'm confused where does the docker finds the reference to now non-existing |
Indeed, that is the conclusion I arrived at, and also tried unsuccessfully to find where the reference to I don't have much experience building Docker images, could it be possible that there's some Docker build cache that wasn't flushed before building the latest image? Just throwing stuff at the wall here... |
The docker hub image is the source of truth and it lists the correct healthcheck, so the cache would have to be on the clients. I don't know either, are you using the images directly from dockerhub or perhaps re-built from somewhere else? |
It has something to do with the upgrade process. I just removed the trillium container and installed it again via docker-compose. |
I am using the images directly from dockerhub, and I upgrade manually by recreating the container, pulling the latest image. I manage my containers with Portainer, tho, and will try deleting and creating it again from scratch and see what the result is in a few hours, will edit with the results. |
@jcvara Did it work for you? I am having the same issue. I am running Portainer on Debian and after updating several containers I am getting a health alert on the Trilium container. sh: can't open 'DockerHealthcheck.sh': No such file or directory I have removed the container (left volume intact to reuse) and reimplemented it by pulling down a fresh image from dockerhub. The alert is still present and indicating that the container is not healthy. I am able to access the container with no issue on local or external networks (npm by jlesage if that matters) and am about ready chaulk it up to a false positive that I can mute, but I would like to get it out of my logs if possible. |
@Dauntless-One Unfortunately life's caught up with me something fierce and I haven't had the time yet to run some more tests, but Trilium is indeed working correctly, and the healthcheck failure is a false positive, so I believe it can be safely ignored. If you'd like to get it out of your logs you might want to take a look at the workaround I posted in this comment to temporarily bypass the issue until it's resolved. |
That worked for me. Thanks! Before i was getting:
After I redeployed stack all was ok:
|
I am having the same problem with 60.4 (unhealthy container but otherwise working normally). Log extract:
|
Trilium Version
0.59.1
What operating system are you using?
Other Linux
What is your setup?
Local (no sync)
Operating System Version
Linux DS918 4.4.180+ #42962 SMP Fri Feb 10 16:32:29 CST 2023 x86_64 GNU/Linux synology_apollolake_918+
Description
After the container upgrade on march the first Trillium is working as expected but in Portainer the container is marked "unhealthy"
Error logs
No USER_UID specified, leaving 1000
No USER_GID specified, leaving 1000
App db version is 213, while db version is 212. Migration needed.
DB size: 1540 KB
Trusted reverse proxy: false
App HTTP server starting up at port 8080
{
"appVersion": "0.59.1",
"dbVersion": 213,
"syncVersion": 29,
"buildDate": "2023-02-28T23:39:34+01:00",
"buildRevision": "9eb3075f65af98bd8c4a8ca8cc241ae2ae05bfa9",
"dataDirectory": "/data",
"clipperProtocolVersion": "1.0",
"utcDateTime": "2023-03-01T11:04:19.733Z"
}
CPU model: Intel(R) Celeron(R) CPU J3455 @ 1.50GHz, logical cores: 4 freq: 1501 Mhz
Listening on port 8080
Created backup at /data/backup/backup-before-migration.db
Attempting migration to version 213
Migration with JS module
Becca (note cache) load took 22ms
Migration to version 213 has been successful.
Becca (note cache) load took 9ms
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 25ms)
[session-file-store] Deleting expired sessions
Optimizing database
Optimization finished in 0ms.
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 11ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 6ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 6ms)
[session-file-store] Deleting expired sessions
Created backup at /data/backup/backup-daily.db
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 7ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 7ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 6ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 10ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 9ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 7ms)
[session-file-store] Deleting expired sessions
Optimizing database
Optimization finished in 0ms.
Slow query took 31ms: SELECT COUNT(1) FROM notes
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 66ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 62ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 7ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 16ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 12ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 6ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 6ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 7ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 8ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 7ms)
[session-file-store] Deleting expired sessions
Optimizing database
Optimization finished in 3ms.
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 10ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 6ms)
[session-file-store] Deleting expired sessions
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 120ms)
WARNING: Wrong password from 172.29.0.1, rejecting.
Generated CSRF token q38RD4Xb-PbXy22vYPD8xLi-sVh7ZCGLd5MU with secret _csrf=ePGY4C8cZ0kfOrXELBJ0HK90; Path=/
200 GET /api/options with 6525 bytes took 4ms
200 GET /api/tree with 11160 bytes took 6ms
Keyboard action showNoteInfo found in database, but not in action definition.
Keyboard action showLinkMap found in database, but not in action definition.
Keyboard action focusOnAttributes found in database, but not in action definition.
Keyboard action toggleZenMode found in database, but not in action definition.
200 GET /api/keyboard-actions with 11935 bytes took 9ms
200 GET /api/script/widgets with 2 bytes took 2ms
websocket client connected
200 GET /api/keyboard-shortcuts-for-notes with 2 bytes took 3ms
200 POST /api/tree/load with 6038 bytes took 6ms
200 GET /api/tree?subTreeNoteId=9b4QOEeKqq06 with 5207 bytes took 5ms
200 GET /api/tree?subTreeNoteId=fDa52IxJiN9k with 2458 bytes took 4ms
200 GET /api/note-map/fDa52IxJiN9k/backlink-count with 11 bytes took 3ms
200 GET /api/notes/fDa52IxJiN9k with 1300 bytes took 4ms
200 POST /api/tree/load with 18350 bytes took 3ms
200 GET /api/script/startup with 2 bytes took 3ms
Caught interrupt/termination signal. Exiting.
No USER_UID specified, leaving 1000
No USER_GID specified, leaving 1000
DB size: 1540 KB
Trusted reverse proxy: false
App HTTP server starting up at port 8080
{
"appVersion": "0.59.1",
"dbVersion": 213,
"syncVersion": 29,
"buildDate": "2023-02-28T23:39:34+01:00",
"buildRevision": "9eb3075f65af98bd8c4a8ca8cc241ae2ae05bfa9",
"dataDirectory": "/data",
"clipperProtocolVersion": "1.0",
"utcDateTime": "2023-03-02T10:03:26.689Z"
}
CPU model: Intel(R) Celeron(R) CPU J3455 @ 1.50GHz, logical cores: 4 freq: 1501 Mhz
Listening on port 8080
Becca (note cache) load took 21ms
Table counts: notes: 79, note_revisions: 14, branches: 79, attributes: 133, etapi_tokens: 0
All consistency checks passed with no errors detected (took 39ms)
Generated CSRF token ssqGDIsx-V04AehUxcyvM5UO7KQvzPid2RI4 with secret undefined
304 GET /api/options with 6525 bytes took 5ms
304 GET /api/tree with 11160 bytes took 5ms
Keyboard action showNoteInfo found in database, but not in action definition.
Keyboard action showLinkMap found in database, but not in action definition.
Keyboard action focusOnAttributes found in database, but not in action definition.
Keyboard action toggleZenMode found in database, but not in action definition.
304 GET /api/keyboard-actions with 11935 bytes took 9ms
304 GET /api/script/widgets with 2 bytes took 2ms
websocket client connected
304 GET /api/keyboard-shortcuts-for-notes with 2 bytes took 5ms
200 POST /api/tree/load with 6038 bytes took 6ms
304 GET /api/tree?subTreeNoteId=9b4QOEeKqq06 with 5207 bytes took 3ms
304 GET /api/tree?subTreeNoteId=fDa52IxJiN9k with 2458 bytes took 3ms
200 POST /api/tree/load with 18350 bytes took 5ms
304 GET /api/notes/fDa52IxJiN9k with 1300 bytes took 4ms
304 GET /api/note-map/fDa52IxJiN9k/backlink-count with 11 bytes took 2ms
304 GET /api/script/startup with 2 bytes took 3ms
Slow 204 PUT /api/options with 0 bytes took 32ms
200 GET /api/notes/Y4aJpBeo1ly4 with 618 bytes took 4ms
200 GET /api/note-map/Y4aJpBeo1ly4/backlink-count with 11 bytes took 5ms
200 GET /api/notes/9b4QOEeKqq06 with 431 bytes took 5ms
200 GET /api/note-map/9b4QOEeKqq06/backlink-count with 11 bytes took 4ms
204 PUT /api/options with 0 bytes took 5ms
204 PUT /api/options with 0 bytes took 4ms
200 GET /api/notes/4BKQscvDctEe with 431 bytes took 3ms
200 GET /api/note-map/4BKQscvDctEe/backlink-count with 11 bytes took 2ms
200 GET /api/note-map/1AVCsbMaelAv/backlink-count with 11 bytes took 3ms
204 PUT /api/options with 0 bytes took 5ms
200 GET /api/notes/1AVCsbMaelAv with 966 bytes took 3ms
200 POST /api/notes/relation-map with 1177 bytes took 5ms
304 GET /api/notes/9b4QOEeKqq06 with 431 bytes took 3ms
304 GET /api/notes/9b4QOEeKqq06 with 431 bytes took 3ms
200 GET /api/notes/aCzFg2NTw45j with 442 bytes took 4ms
Slow 204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 12ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 5ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 6ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 5ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 3ms
204 PUT /api/notes/1AVCsbMaelAv/data with 0 bytes took 4ms
200 GET /api/notes/PjC9AaqmE7Pj with 435 bytes took 2ms
200 GET /api/health-check with 15 bytes took 2ms
200 GET /api/health-check with 15 bytes took 2ms
200 POST /api/tree/load with 4826 bytes took 3ms
204 PUT /api/options with 0 bytes took 9ms
200 POST /api/tree/load with 7860 bytes took 4ms
200 GET /api/note-map/_options/backlink-count with 11 bytes took 3ms
200 GET /api/tree?subTreeNoteId=_hidden with 25205 bytes took 4ms
204 PUT /api/branches/root__hidden/expanded/1 with 0 bytes took 2ms
200 GET /api/tree?subTreeNoteId=_options with 7859 bytes took 4ms
200 GET /api/app-info with 251 bytes took 2ms
No response
The text was updated successfully, but these errors were encountered: