[GH-ISSUE #7135] [Bug]: Recommended healthcheck script failing even with healthy instance #9929

Closed
opened 2026-04-10 20:16:42 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @k3mystra on GitHub (Mar 5, 2026).
Original GitHub issue: https://github.com/actualbudget/actual/issues/7135

What happened?

I'm deploying an Actual Budget server using the recommended Compose file. On starting the container, Docker reports the container being 'unhealthy' but the server is running fine when.

What I found from testing the src/scripts/health-check.js inside the container while it is running:

  • If https.key and https.cert is set (protocol defaults to HTTPS) but hostname isn't, the health check fails due to the host name not matching the certificate's altname (since the hostname defaults to localhost)
node@963f708bf860:/app$ node src/scripts/health-check.js
actual:config Project root: '/app' +0ms
  actual:config Actual web build path: '/app/node_modules/@actual-app/web/build' +3ms
  actual:config loading config from default path: '/data/config.json' +8ms
  actual:config Validating config +0ms
  actual:config Project root: /app +3ms
  actual:config Port: 5006 +0ms
  actual:config Hostname: :: +0ms
  actual:config Data directory: /data +0ms
  actual:config Server files: /data/server-files +0ms
  actual:config User files: /data/user-files +0ms
  actual:config Web root: /app/node_modules/@actual-app/web/build +1ms
  actual:config Login method: password +0ms
  actual:config Allowed methods: password, header, openid +0ms
  actual:config HTTPS Key: ************************************** +0ms
  actual:config HTTPS Cert: ************************************** +1ms
Health check failed: FetchError: request to https://localhost:5006/health failed, reason: Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:skorpion-1.tailb2de62.ts.net
    at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1501:11)
    at ClientRequest.emit (node:events:517:28)
    at TLSSocket.socketErrorListener (node:_http_client:501:9)
    at TLSSocket.emit (node:events:517:28)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ERR_TLS_CERT_ALTNAME_INVALID',
  code: 'ERR_TLS_CERT_ALTNAME_INVALID'
}
  • If https.key or https.cert is not set (protocol defaults to HTTP), the health check still fails:
node@963f708bf860:/app$ ACTUAL_HTTPS_KEY= node src/scripts/health-check.js
  actual:config Project root: '/app' +0ms
  actual:config Actual web build path: '/app/node_modules/@actual-app/web/build' +3ms
  actual:config loading config from default path: '/data/config.json' +8ms
  actual:config Validating config +1ms
  actual:config Project root: /app +2ms
  actual:config Port: 5006 +0ms
  actual:config Hostname: :: +1ms
  actual:config Data directory: /data +0ms
  actual:config Server files: /data/server-files +0ms
  actual:config User files: /data/user-files +0ms
  actual:config Web root: /app/node_modules/@actual-app/web/build +0ms
  actual:config Login method: password +1ms
  actual:config Allowed methods: password, header, openid +0ms
  actual:config HTTPS Cert: ************************************** +0ms
Health check failed: FetchError: request to http://localhost:5006/health failed, reason: socket hang up
    at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1501:11)
    at ClientRequest.emit (node:events:517:28)
    at Socket.socketOnEnd (node:_http_client:525:9)
    at Socket.emit (node:events:529:35)
    at endReadableNT (node:internal/streams/readable:1400:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'ECONNRESET',
  code: 'ECONNRESET'
}

I tried calling the health endpoint from outside of the container using curl. It only works with HTTPS. HTTP request fails with Empty reply from server.

How can we reproduce the issue?

  1. Deploy Docker container with the recommended Compose file
  2. Observe the health status turns to unhealthy when checked with docker ps -a

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Other

Operating System

Linux

Originally created by @k3mystra on GitHub (Mar 5, 2026). Original GitHub issue: https://github.com/actualbudget/actual/issues/7135 ### What happened? I'm deploying an Actual Budget server using the recommended [Compose file](https://github.com/actualbudget/actual/blob/master/packages/sync-server/docker-compose.yml). On starting the container, Docker reports the container being 'unhealthy' but the server is running fine when. What I found from testing the `src/scripts/health-check.js` inside the container while it is running: - If `https.key` and `https.cert` is set (protocol defaults to HTTPS) but `hostname` isn't, the health check fails due to the host name not matching the certificate's altname (since the hostname defaults to localhost) ```sh node@963f708bf860:/app$ node src/scripts/health-check.js actual:config Project root: '/app' +0ms actual:config Actual web build path: '/app/node_modules/@actual-app/web/build' +3ms actual:config loading config from default path: '/data/config.json' +8ms actual:config Validating config +0ms actual:config Project root: /app +3ms actual:config Port: 5006 +0ms actual:config Hostname: :: +0ms actual:config Data directory: /data +0ms actual:config Server files: /data/server-files +0ms actual:config User files: /data/user-files +0ms actual:config Web root: /app/node_modules/@actual-app/web/build +1ms actual:config Login method: password +0ms actual:config Allowed methods: password, header, openid +0ms actual:config HTTPS Key: ************************************** +0ms actual:config HTTPS Cert: ************************************** +1ms Health check failed: FetchError: request to https://localhost:5006/health failed, reason: Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:skorpion-1.tailb2de62.ts.net at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1501:11) at ClientRequest.emit (node:events:517:28) at TLSSocket.socketErrorListener (node:_http_client:501:9) at TLSSocket.emit (node:events:517:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { type: 'system', errno: 'ERR_TLS_CERT_ALTNAME_INVALID', code: 'ERR_TLS_CERT_ALTNAME_INVALID' } ``` - If `https.key` or `https.cert` is not set (protocol defaults to HTTP), the health check still fails: ```sh node@963f708bf860:/app$ ACTUAL_HTTPS_KEY= node src/scripts/health-check.js actual:config Project root: '/app' +0ms actual:config Actual web build path: '/app/node_modules/@actual-app/web/build' +3ms actual:config loading config from default path: '/data/config.json' +8ms actual:config Validating config +1ms actual:config Project root: /app +2ms actual:config Port: 5006 +0ms actual:config Hostname: :: +1ms actual:config Data directory: /data +0ms actual:config Server files: /data/server-files +0ms actual:config User files: /data/user-files +0ms actual:config Web root: /app/node_modules/@actual-app/web/build +0ms actual:config Login method: password +1ms actual:config Allowed methods: password, header, openid +0ms actual:config HTTPS Cert: ************************************** +0ms Health check failed: FetchError: request to http://localhost:5006/health failed, reason: socket hang up at ClientRequest.<anonymous> (/app/node_modules/node-fetch/lib/index.js:1501:11) at ClientRequest.emit (node:events:517:28) at Socket.socketOnEnd (node:_http_client:525:9) at Socket.emit (node:events:529:35) at endReadableNT (node:internal/streams/readable:1400:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { type: 'system', errno: 'ECONNRESET', code: 'ECONNRESET' } ``` I tried calling the `health` endpoint from outside of the container using `curl`. It only works with HTTPS. HTTP request fails with `Empty reply from server`. ### How can we reproduce the issue? 1. Deploy Docker container with the recommended [Compose file](https://github.com/actualbudget/actual/blob/master/packages/sync-server/docker-compose.yml) 2. Observe the health status turns to `unhealthy` when checked with `docker ps -a` ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Other ### Operating System Linux
GiteaMirror added the dockerbug labels 2026-04-10 20:16:42 -05:00
Author
Owner

@prmbittencourt commented on GitHub (Apr 2, 2026):

Same issue here. Everything seems to work, but the container is reported as unhealthy. On EndeavourOS Linux.

<!-- gh-comment-id:4177918892 --> @prmbittencourt commented on GitHub (Apr 2, 2026): Same issue here. Everything seems to work, but the container is reported as unhealthy. On EndeavourOS Linux.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#9929