ntfy: Health check on port 3000 has failed. Your app is not responding properly. Services exposed on ports [80, 443] will have intermittent failures until the health check passes.

Hello, I’m trying to deploy ntfy.sh on fly io, but i got problem when try deploying it on port 3000.

I’m trying to set up this project as small as possible but can’t get it done

Dockerfile

FROM binwiederhier/ntfy
EXPOSE 80
ENTRYPOINT ["ntfy", "serve"]

fly.toml

app = "ntfy-app"

# Kill signal and timeout
kill_signal = "SIGINT"
kill_timeout = 5

[[services]]
  http_checks = []
  internal_port = 3000
  processes = ["app"]
  protocol = "tcp"
  script_checks = []
  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    force_https = true
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

Here’s the log

 2023-03-28T05:37:23.398 runner[a703b8b1] sin [info] Starting instance

2023-03-28T05:37:23.484 runner[a703b8b1] sin [info] Configuring virtual machine

2023-03-28T05:37:23.485 runner[a703b8b1] sin [info] Pulling container image

2023-03-28T05:37:28.205 runner[a703b8b1] sin [info] Unpacking image

2023-03-28T05:37:28.213 runner[a703b8b1] sin [info] Preparing kernel init

2023-03-28T05:37:28.534 runner[a703b8b1] sin [info] Configuring firecracker

2023-03-28T05:37:28.772 runner[a703b8b1] sin [info] Starting virtual machine

2023-03-28T05:37:29.037 app[a703b8b1] sin [info] Starting init (commit: 8e03fa6)...

2023-03-28T05:37:29.067 app[a703b8b1] sin [info] Preparing to run: `ntfy serve` as root

2023-03-28T05:37:29.074 app[a703b8b1] sin [info] 2023/03/28 05:37:29 listening on [fdaa:1:7293:a7b:fe:a703:b8b1:2]:22 (DNS: [fdaa::3]:53)

2023-03-28T05:37:29.177 app[a703b8b1] sin [info] 2023/03/28 05:37:29 INFO Listening on :80[http], ntfy 2.2.0, log level is INFO (tag=startup)

2023-03-28T05:37:33.962 health[a703b8b1] sin [error] Health check on port 3000 has failed. Your app is not responding properly. Services exposed on ports [80, 443] will have intermittent failures until the health check passes.

2023-03-28T05:38:07.681 app[4fecb412] sin [info] 2023/03/28 05:38:07 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:38:29.185 app[a703b8b1] sin [info] 2023/03/28 05:38:29 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:39:07.683 app[4fecb412] sin [info] 2023/03/28 05:39:07 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:39:29.184 app[a703b8b1] sin [info] 2023/03/28 05:39:29 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:40:07.687 app[4fecb412] sin [info] 2023/03/28 05:40:07 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:40:29.186 app[a703b8b1] sin [info] 2023/03/28 05:40:29 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:41:07.691 app[4fecb412] sin [info] 2023/03/28 05:41:07 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:41:29.188 app[a703b8b1] sin [info] 2023/03/28 05:41:29 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:42:07.692 app[4fecb412] sin [info] 2023/03/28 05:42:07 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:42:29.190 app[a703b8b1] sin [info] 2023/03/28 05:42:29 INFO Server stats (emails_received=0, emails_received_failure=0, emails_received_success=0, emails_sent=0, emails_sent_failure=0, emails_sent_success=0, messages_cached=0, messages_published=0, subscribers=0, tag=manager, topics_active=0, users=0, visitors=0)

2023-03-28T05:42:38.774 runner[a703b8b1] sin [info] Shutting down virtual machine

2023-03-28T05:42:39.023 app[a703b8b1] sin [info] Sending signal SIGINT to main child process w/ PID 520

2023-03-28T05:42:39.439 app[a703b8b1] sin [info] Starting clean up. 

Since ntfy listens on port 80 by default, you need to set internal_port = 80.

It’s working, thank you so much!!!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.