Troubleshooting 'unhealthy' docker container


Recommended Posts

A previously stable container recently started reporting as 'unhealthy' during startup.  The internal docker log does not report any errors and I'm able to access the containers active URL as expected. Version hasn't changed recently from what I can tell.

 

Calling a docker inspect command I get the following output (truncated to show health status):

 

[
    {
        "Id": "5c374170d7afed5811cc3251f27b12de173beee2c7899a102e2e47fe9f90c426",
        "Created": "2024-02-04T03:17:16.701460867Z",
        "Path": "./entrypoint.sh",
        "Args": [
            "resources/app/main.mjs",
            "--port=30000",
            "--headless",
            "--noupdate",
            "--dataPath=/data"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 4395,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2024-02-04T19:55:57.66182608Z",
            "FinishedAt": "2024-02-04T19:49:05.964040495Z",
            "Health": {
                "Status": "unhealthy",
                "FailingStreak": 16,
                "Log": [
                    {
                        "Start": "2024-02-04T15:04:28.485001389-05:00",
                        "End": "2024-02-04T15:04:28.52147859-05:00",
                        "ExitCode": 1,
                        "Output": ""
                    },
                    {
                        "Start": "2024-02-04T15:04:58.531513334-05:00",
                        "End": "2024-02-04T15:04:58.581211192-05:00",
                        "ExitCode": 1,
                        "Output": ""
                    },
                    {
                        "Start": "2024-02-04T15:05:28.590011407-05:00",
                        "End": "2024-02-04T15:05:28.634376391-05:00",
                        "ExitCode": 1,
                        "Output": ""
                    },
                    {
                        "Start": "2024-02-04T15:05:58.642992165-05:00",
                        "End": "2024-02-04T15:05:58.678409309-05:00",
                        "ExitCode": 1,
                        "Output": ""
                    },
                    {
                        "Start": "2024-02-04T15:06:28.689170661-05:00",
                        "End": "2024-02-04T15:06:28.725521568-05:00",
                        "ExitCode": 1,
                        "Output": ""
                    }
                ]
            }
        },

 

What's the best way to troubleshoot given that the container appears to be running without issue?

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.