Closed
Description
I have ntfy behind a traefik proxy, and although I can subscribe, messages seem to go into a loop and time out with a rate limit. Here is my server.yml file: (redacted to not show actual domain):
base-url: "https://ntfy.xxx.org"
cache-file: "/var/cache/ntfy/cache.db"
attachment-cache-dir: "/var/cache/ntfy/attachments"
behind-proxy: true
upstream-base-url: "https://ntfy.xxx.org"
If send a message to the "test" topic, I see this in the log:
2022/06/20 00:55:31 INFO Listening on :80[http], ntfy 1.26.0, log level is INFO
2022/06/20 00:56:31 INFO Stats: 32 messages published, 3 in cache, 2 topic(s) active, 0 subscriber(s), 2 visitor(s), 0 mails received (0 successful, 0 failed), 0 mails sent (0 successful, 0 failed)
2022/06/20 00:56:32 INFO 172.70.126.81 HTTP POST /5d1e3888f7ae011705f02959ede7ffc27f2452227ff7b615e310a674496f8383 Connection closed with HTTP 429 (ntfy error 42901): limit reached: too many requests, please be nice
2022/06/20 00:56:33 WARN 172.70.126.81/dc31f59cbecd56c3c3f8d0c76b3502044a8adf9e9db452f1929d571766d681df/NKEMjgaHjpSh Unable to publish poll request, unexpected HTTP status: 429
2022/06/20 00:57:31 INFO Stats: 61 messages published, 3 in cache, 2 topic(s) active, 0 subscriber(s), 2 visitor(s), 0 mails received (0 successful, 0 failed), 0 mails sent (0 successful, 0 failed)
With debug, I see this in the log, with a loop of requests until it finally fails with rate-limit:
2022/06/20 00:55:00 DEBUG 172.70.130.131 HTTP POST /ec2a675d51421c2297ca0223f781fac94805a06c7d230117d74667acd6be552b Dispatching request
2022/06/20 00:55:00 DEBUG 172.70.130.131/ec2a675d51421c2297ca0223f781fac94805a06c7d230117d74667acd6be552b/J2TsTfAOBoZ2 Received message: event=poll_request, body=11 byte(s), delayed=false, firebase=true, cache=false, up=false, email=
2022/06/20 00:55:00 DEBUG 172.70.130.131/ec2a675d51421c2297ca0223f781fac94805a06c7d230117d74667acd6be552b/J2TsTfAOBoZ2 Publishing poll request to https://ntfy.xxx.org/a736402aa3b0e766ed3f3a534d7e56165193f6f5517a052476257df57f196b1c
2022/06/20 00:55:00 DEBUG 172.70.130.131 HTTP POST /a736402aa3b0e766ed3f3a534d7e56165193f6f5517a052476257df57f196b1c Dispatching request
2022/06/20 00:55:00 DEBUG 172.70.130.131/a736402aa3b0e766ed3f3a534d7e56165193f6f5517a052476257df57f196b1c/HHxvaHzd5RKr Received message: event=poll_request, body=11 byte(s), delayed=false, firebase=true, cache=false, up=false, email=
2022/06/20 00:55:00 DEBUG 172.70.130.131/a736402aa3b0e766ed3f3a534d7e56165193f6f5517a052476257df57f196b1c/HHxvaHzd5RKr Publishing poll request to https://ntfy.xxx.org/61eaae2826b7606321c4bfee7cad089134f4cbfc712e779dca3af2c8d0fcd276
2022/06/20 00:55:00 DEBUG 172.70.130.131 HTTP POST /61eaae2826b7606321c4bfee7cad089134f4cbfc712e779dca3af2c8d0fcd276 Dispatching request
2022/06/20 00:55:00 INFO 172.70.130.131 HTTP POST /61eaae2826b7606321c4bfee7cad089134f4cbfc712e779dca3af2c8d0fcd276 Connection closed with HTTP 429 (ntfy error 42901): limit reached: too many requests, please be nice
2022/06/20 00:55:00 WARN 172.70.130.131/a736402aa3b0e766ed3f3a534d7e56165193f6f5517a052476257df57f196b1c/HHxvaHzd5RKr Unable to publish poll request, unexpected HTTP status: 429
It's like the server is sending the request back to itself, endlessly. I can show you the traefik config, but it's pretty basic. Server is in docker with port 80 mapped to 4080 on the outside.