mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #512] I cannot get iOS and Android notification work on my server #390
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#390
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @davidchezmoa on GitHub (Nov 20, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/512
On iOS when a I subscribe to a topic I get error 404 (same appear on the server logs)
Nov 20 00:17:39 server1-arm ntfy[3935]: 2022/11/20 00:17:39 [XXX.XXX.XX.XX:62627] GET - 404 - http: Not Found
On Android it work the first time I subscribe to the topic and then I have a "reconnecting message" on the app and error 400 on the server logs.
Nov 20 00:36:04 server1-arm ntfy[3935]: 2022/11/20 00:36:04 [XXX.XXX.XX.XX:46693] GET - 400 - http: Bad Request
Notification work great with Chrome but meh that's not what I was looking for.
Can somebody help me (I try two different method of hosting server, docker and normal deb install under ubuntu)
Server is install with all default setting nothing touched in configuation.
@0x111 commented on GitHub (Nov 22, 2022):
Show your config
server.ymland also what url are you hosting this on, what are you putting in your phone etc. More context is needed to possibly help you.@davidchezmoa commented on GitHub (Nov 23, 2022):
server.xml
base-url: "http://notify.xxxxxxx.net"cache-file: "/var/cache/ntfy/cache.db"attachment-cache-dir: "/var/cache/ntfy/attachments"upstream-base-url: "https://ntfy.sh"iPhone screen
Server logs:
Nov 23 02:15:03 server1-arm systemd[1]: Started ntfy server.
Nov 23 02:15:03 server1-arm ntfy[282351]: 2022/11/23 02:15:03 Listening on :80/http
Nov 23 02:23:03 server1-arm ntfy[282351]: 2022/11/23 02:23:03 Stats: 0 message(s) published, 0 topic(s) active, 0 subscriber(s), 0 message(s) buffered, 0 visitor(s)
Nov 23 02:23:53 server1-arm ntfy[282351]: 2022/11/23 02:23:53 [XXX.XXX.XX.XX:56038] GET - 404 - http: Not Found
Nov 23 02:24:03 server1-arm ntfy[282351]: 2022/11/23 02:24:03 Stats: 0 message(s) published, 0 topic(s) active, 0 subscriber(s), 0 message(s) buffered, 0 visitor(s)
@0x111 commented on GitHub (Nov 24, 2022):
Do you use some kind of proxy for this? Because the config files look very generic to me, so there is no apparent error at first sight.
If you do, maybe provide that too please, for troubleshooting. I think this is some issue with vhosts on your end probably.
@binwiederhier commented on GitHub (Nov 24, 2022):
Does the web app work? Have you tried turning on debugging (https://docs.ntfy.sh/config/#debuggingtracing) on the server? The 404 does look like this is a server/proxy config issue and not an issue with iOS.
@davidchezmoa commented on GitHub (Nov 24, 2022):
I will try debug level log later but for information, no proxy in front of it, webapp works fine and as I was saying in first message notification work fine when I subscribe using chrome on PC.
@davidchezmoa commented on GitHub (Nov 24, 2022):
It's seems like the documentation is not up to date or my installation is wrong because debug option is not there.
ntfy serve -ddoesn't workMy options are:
root@server1-arm:/etc/ntfy# ntfy serve -B "http://notify.xxxxxxxx.net" -l ":80" -d
Incorrect Usage: flag provided but not defined: -d
NAME:
ntfy serve - Run the ntfy server
USAGE:
ntfy serve [OPTIONS..]
DESCRIPTION:
Run the ntfy server and listen for incoming requests
The command will load the configuration from /etc/ntfy/server.yml. Config options can
be overridden using the command line options.
Examples:
ntfy serve # Starts server in the foreground (on port 80)
ntfy serve --listen-http :8080 # Starts server with alternate port
OPTIONS:
--config value, -c value config file (default: /etc/ntfy/server.yml) [$NTFY_CONFIG_FILE]
--base-url value, -B value externally visible base URL for this host (e.g. https://ntfy.sh) [$NTFY_BASE_URL]
--listen-http value, -l value ip:port used to as HTTP listen address (default: ":80") [$NTFY_LISTEN_HTTP]
--listen-https value, -L value ip:port used to as HTTPS listen address [$NTFY_LISTEN_HTTPS]
--key-file value, -K value private key file, if listen-https is set [$NTFY_KEY_FILE]
--cert-file value, -E value certificate file, if listen-https is set [$NTFY_CERT_FILE]
--firebase-key-file value, -F value Firebase credentials file; if set additionally publish to FCM topic [$NTFY_FIREBASE_KEY_FILE]
--cache-file value, -C value cache file used for message caching [$NTFY_CACHE_FILE]
--cache-duration since, -b since buffer messages for this time to allow since requests (default: 12h0m0s) [$NTFY_CACHE_DURATION]
--keepalive-interval value, -k value interval of keepalive messages (default: 30s) [$NTFY_KEEPALIVE_INTERVAL]
--manager-interval value, -m value interval of for message pruning and stats printing (default: 1m0s) [$NTFY_MANAGER_INTERVAL]
--smtp-addr value SMTP server address (host:port) to allow email sending [$NTFY_SMTP_ADDR]
--smtp-user value SMTP user (if e-mail sending is enabled) [$NTFY_SMTP_USER]
--smtp-pass value SMTP password (if e-mail sending is enabled) [$NTFY_SMTP_PASS]
--smtp-from value SMTP sender address (if e-mail sending is enabled) [$NTFY_SMTP_FROM]
--global-topic-limit value, -T value total number of topics allowed (default: 5000) [$NTFY_GLOBAL_TOPIC_LIMIT]
--visitor-subscription-limit value number of subscriptions per visitor (default: 30) [$NTFY_VISITOR_SUBSCRIPTION_LIMIT]
--visitor-request-limit-burst value initial limit of requests per visitor (default: 60) [$NTFY_VISITOR_REQUEST_LIMIT_BURST]
--visitor-request-limit-replenish value interval at which burst limit is replenished (one per x) (default: 10s) [$NTFY_VISITOR_REQUEST_LIMIT_REPLENISH]
--visitor-email-limit-burst value initial limit of e-mails per visitor (default: 16) [$NTFY_VISITOR_EMAIL_LIMIT_BURST]
--visitor-email-limit-replenish value interval at which burst limit is replenished (one per x) (default: 1h0m0s) [$NTFY_VISITOR_EMAIL_LIMIT_REPLENISH]
--behind-proxy, -P if set, use X-Forwarded-For header to determine visitor IP address (for rate limiting) (default: false) [$NTFY_BEHIND_PROXY]
--help, -h show help (default: false)
flag provided but not defined: -d
@0x111 commented on GitHub (Nov 24, 2022):
Not sure which version this is, but download the latest, which is currently 1.29.1 from here. There you will have debug flag.
@davidchezmoa commented on GitHub (Nov 25, 2022):
I have manually install the deb file on my ubuntu server and now everything work as it should, thank you so much for pointing me in the right direction.