mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #383] Getting Matrix gateway error on self-hosted instance, ntfy claims push key is not prefixed with base URL #295
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#295
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 @christophehenry on GitHub (Aug 18, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/383
I run a self hosted ntfy and have try to get Element Android to work with is for the last few days. Today, setting the log level to
TRACE, I can see the following in ntfy logs:I don't understand why I'm getting this error, the server is correctly configured as followed:
where
<ntfy.domain>corresponds to my self-hosted ntfy domain.Can you please tell me what's going on here?
@binwiederhier commented on GitHub (Aug 18, 2022):
This is quite odd. This error message only happens in one case:
So something's not right, either in your example or your config. Check "http" vs "https", and make sure you restarted the server.
@christophehenry commented on GitHub (Aug 18, 2022):
Unfortunatly, setting
base-url: "http://<ntfy.domain>"doesn't solve the problem. Here is the full log trace:Here is the full updated configuration:
Note that despite running behind Apache, encryption stops at the reverse proxy.
@binwiederhier commented on GitHub (Aug 18, 2022):
Just like I said, HTTP/HTTPS mismatch :-)
@binwiederhier commented on GitHub (Aug 18, 2022):
base-urlis the externally visible URL. It doesn't matter where SSL is terminated.@christophehenry commented on GitHub (Aug 18, 2022):
You told me to update my config to try
httpwhich is why I specifically mentioned "updated configuration". But neitherhttpnorhttps. I get the same message either way.@binwiederhier commented on GitHub (Aug 18, 2022):
Does your base URL contain a / at the end? If so, remove it.
Idk what to tell you. The snippet above shows the code it's executing. You can try to compile your own binary and see what ntfy thinks the push key is
@christophehenry commented on GitHub (Aug 18, 2022):
No, no trainling slash. Alright, let's write some Go, then!
@christophehenry commented on GitHub (Aug 19, 2022):
Ok, I know what was going on. The problem was not the code but the configuration in
/etc/ntfy/server.ymlwhich, somehow, doesn't get reloaded when doingsystemctl reload ntfyorsystemctl restart ntfy. This morning, while testing #384, I did a fullsystemctl stop ntfy && systemctl start ntfy. Only after that did the configuration change worked. I repeated the operation multiple time and I can confirm thatsystemctl reload ntfyorsystemctl restart ntfydo not force reload/etc/ntfy/server.yml. At least on Fedora.Still I propose #384 because I think this is a valuable change.
@binwiederhier commented on GitHub (Aug 19, 2022):
systemctl reload ntfyonly reloads the log level (it's in the docs, but buried).systemctl restart ntfyshould absolutely and totally restart the binary. The service file doesn't do anything special, so systemd should just send a SIGKILL and restart the binary. Maybe look atjournalctlto see if there are clues.@christophehenry commented on GitHub (Aug 21, 2022):
Never mind.
systemctl restart ntfyworks correctly. I really don't understand where I messed up, but at some point, I really believe I had the correct configuration but ntfy still wouldn't work event with asystemctl restart ntfy. Sorry for the noise.