contrueCT commented on issue #3103:
URL: https://github.com/apache/hugegraph/issues/3103#issuecomment-5200867906
Thanks for reporting this issue.
There appear to be two separate problems involved here:
1. **`docker logs` shows no HugeGraph Server output**
In HugeGraph 1.7.0, the startup script redirects JVM output to files
inside the container, and the Log4j2 console appender is not connected to the
main HugeGraph logger. This has already been fixed by:
https://github.com/apache/hugegraph/pull/2980
After this change, Docker deployments can access application logs
directly through `docker logs`.
2. **The container remains running but becomes unhealthy**
HugeGraph 1.7.0 uses `tail -f /dev/null` in the Docker entrypoint to keep
the container alive. If the HugeGraph Java process exits, the `tail` process
continues running, so the container remains in the `Up (unhealthy)` state and
Docker's restart policy is not triggered.
This container supervision problem has already been fixed by:
https://github.com/apache/hugegraph/pull/3051
The updated entrypoint monitors the actual Java process and exits when
that process exits, allowing Docker to restart the container according to its
restart policy.
Dockerfile-level health checks were also added in:
https://github.com/apache/hugegraph/pull/3052
These PRs fix the missing Docker logs and the behavior where a failed Java
process leaves the container permanently unhealthy. They have been merged into
the ASF master branch and will be included in a future official release.
However, the information currently available is not sufficient to determine
why the Java process exited or why the REST endpoint stopped responding in this
particular deployment. It could be an OOM, prolonged GC, a deadlock,
thread-pool exhaustion, or another HStore-related failure.
For HugeGraph 1.7.0, please check the log file inside the container:
```bash
docker exec <container> tail -500 /hugegraph-server/logs/hugegraph-server.log
```
It would also be helpful to provide the following information from around
the time the container becomes unhealthy:
```bash
docker stats <container> --no-stream
docker exec <container> ps -ef
docker exec <container> jstack <java-pid>
docker inspect <container> --format='{{json .State}}'
```
With the server log and thread dump, we can determine whether an additional
server or HStore fix is required.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]