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

Docker reporting container as not healthy #296

Closed
eliandoran opened this issue Aug 6, 2024 · 13 comments
Closed

Docker reporting container as not healthy #296

eliandoran opened this issue Aug 6, 2024 · 13 comments
Assignees
Milestone

Comments

@eliandoran
Copy link
Contributor

Could be that the healthcheck script is broken. To investigate.

@eliandoran eliandoran self-assigned this Aug 6, 2024
@eliandoran eliandoran added the bug label Aug 6, 2024
@eliandoran eliandoran added this to the v0.90.4 milestone Aug 6, 2024
@dariuszszyc
Copy link

Same on my side, even though the logs don't mention any issues - only a successful migration.
However I cannot see any Web UI and the desktop app cannot connect to the Server.

@hulmgulm
Copy link

hulmgulm commented Aug 7, 2024

That's the output form the health check:

file:///usr/src/app/docker_healthcheck.js:1 const http = require("http"); ^ ReferenceError: require is not defined in ES module scope, you can use import instead This file is being treated as an ES module because it has a '.js' file extension and '/usr/src/app/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension. at file:///usr/src/app/docker_healthcheck.js:1:14 at ModuleJob.run (node:internal/modules/esm/module_job:222:25) at async ModuleLoader.import (node:internal/modules/esm/loader:316:24) at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5) Node.js v20.15.1

@eliandoran
Copy link
Contributor Author

Same on my side, even though the logs don't mention any issues - only a successful migration. However I cannot see any Web UI and the desktop app cannot connect to the Server.

This sounds like a serious issue. Could you please try to take logs? Try restarting the container to have as much information as possible.

@foux
Copy link

foux commented Aug 7, 2024

Same issue on me, making it unavailable on Traefik

@eliandoran
Copy link
Contributor Author

Same issue on me, making it unavailable on Traefik

@foux , is the container marked unhealthy, but is it working normally for you?
Or are you having the same issue as @dariuszszyc who is unable to access the Trilium instance?

@foux
Copy link

foux commented Aug 7, 2024

The container is marked as unhealthy. If I expose the port, I can access Trillium on myhost:port. But the Traefik proxy doesn't work, because Traefik doesn't create proxy for unhealthy containers.

So my issue is really only the unhealthy container. Traefik not creatink the proxy is directly because of this.

@eliandoran
Copy link
Contributor Author

@foux , thank you for the clarification. In this case, I'll prioritize fixing the healthcheck.
I should have a fix available by the end of the day.

@dariuszszyc
Copy link

My case is also with Traefik, sorry for not mentioning this earlier.

@eliandoran
Copy link
Contributor Author

@foux , @dariuszszyc ,

The issue should be solved now, please have a look at https://hub.docker.com/layers/triliumnext/notes/develop/images/sha256-2a88629322894d86e73011b454820ca2a04cb31bd00654855aa659f67a94cb69?context=explore and let me know if it works out for you.

I have taken the time to add a build step in the CI to check if the healthcheck passes to make sure we don't run into it again.

I will not deploy a new version yet with just this change, but expect a new release in a couple of days.

@dariuszszyc
Copy link

@eliandoran it did fix the issue for me.
I can now access the Web version and the Desktop also can now sync with server.

@eliandoran
Copy link
Contributor Author

@dariuszszyc , thank you for the very prompt response.

@foux
Copy link

foux commented Aug 8, 2024

Sorry for the late reply it's OK for me too on arm64, thanks! But it seems the image hasn't been pushed for amd64.

@eliandoran
Copy link
Contributor Author

@foux , that was me trying to fix multiplatform builds. It's not finished yet and we should develop soon on all previously compatible platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants