[GH-ISSUE #1110] HTTPS error 50001 / http:500 / internal server error #781

Closed
opened 2026-05-07 00:27:27 +02:00 by BreizhHardware · 7 comments

Originally created by @usbrpa on GitHub (May 17, 2024).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1110

Sorry if this is due to my ignorance, but I can't be sorting out a small issue:

I set up everything and ntfy is listening on ports 80 http and 444 https (have another server running using port 443 on same machine).

I can connect to both servers from the android app, no issue. Systemctl shows all correctly, running and listening to the right ports.

When I send a message from cli, form wherever, I get a message:

"{"code":50001,"http":500,"error":"internal server error"}"

If I disable http and only let https run, I get a message that I am trying to send a message to a https server.

Nevertheless, the notifications do work. I receive them in the app in both groups, the one connected to http as well as the one connected to https.

When only using http. I get a feedback after sending the command containing the sent message, which is kind of nice to have.

So everything works, but I can't get {"code":50001,"http":500,"error":"internal server error"} away.

Anyone would happen to have some hints?

Thank you !!!!

Originally created by @usbrpa on GitHub (May 17, 2024). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1110 Sorry if this is due to my ignorance, but I can't be sorting out a small issue: I set up everything and ntfy is listening on ports 80 http and 444 https (have another server running using port 443 on same machine). I can connect to both servers from the android app, no issue. Systemctl shows all correctly, running and listening to the right ports. When I send a message from cli, form wherever, I get a message: "{"code":50001,"http":500,"error":"internal server error"}" If I disable http and only let https run, I get a message that I am trying to send a message to a https server. Nevertheless, the notifications do work. I receive them in the app in both groups, the one connected to http as well as the one connected to https. When only using http. I get a feedback after sending the command containing the sent message, which is kind of nice to have. So everything works, but I can't get {"code":50001,"http":500,"error":"internal server error"} away. Anyone would happen to have some hints? Thank you !!!!
BreizhHardware 2026-05-07 00:27:27 +02:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@wunter8 commented on GitHub (May 17, 2024):

Turn on logging in your server.yml file to see what's going on. "debug" is probably enough, but you could also do "trace"

<!-- gh-comment-id:2118345584 --> @wunter8 commented on GitHub (May 17, 2024): Turn on logging in your server.yml file to see what's going on. "debug" is probably enough, but you could also do "trace"
Author
Owner

@usbrpa commented on GitHub (May 18, 2024):

Hi Wunter,

have done so. I see an error about writing permissions to a DB:

INFO Connection closed with HTTP 500 (ntfy error 50001) (error=attempt to write a readonly database, http_method=POST

ntfy.log

ntfyhttps.log

I also tried the same now only enabling https, commented out http. See log attached.

At the beginning I used to get a message that I was trying to send a message to a https server using http (with curl). This though disappeared.

Thanks.

<!-- gh-comment-id:2118731474 --> @usbrpa commented on GitHub (May 18, 2024): Hi Wunter, have done so. I see an error about writing permissions to a DB: INFO Connection closed with HTTP 500 (ntfy error 50001) (error=attempt to write a readonly database, http_method=POST [ntfy.log](https://github.com/binwiederhier/ntfy/files/15360978/ntfy.log) [ntfyhttps.log](https://github.com/binwiederhier/ntfy/files/15361583/ntfyhttps.log) I also tried the same now only enabling https, commented out http. See log attached. At the beginning I used to get a message that I was trying to send a message to a https server using http (with curl). This though disappeared. Thanks.
Author
Owner

@usbrpa commented on GitHub (May 18, 2024):

Sorry, update:

I did comment out http, which was wrong. After putting http to "" instead of commenting it out, I get the following:

root@vps2432639:/var# curl -d "test" x.x.x.x/alerts
Client sent an HTTP request to an HTTPS server.

I also changed server.yml cache db entry to a different file name hoping it would be recreated, maybe with right permissions. Didn't work.

Thanks.

<!-- gh-comment-id:2118735289 --> @usbrpa commented on GitHub (May 18, 2024): Sorry, update: I did comment out http, which was wrong. After putting http to "" instead of commenting it out, I get the following: root@vps2432639:/var# curl -d "test" x.x.x.x/alerts Client sent an HTTP request to an HTTPS server. I also changed server.yml cache db entry to a different file name hoping it would be recreated, maybe with right permissions. Didn't work. Thanks.
Author
Owner

@usbrpa commented on GitHub (May 18, 2024):

I guess I solved it doing a chown ntfy on the cache db file... is that a good thing?

:-)

<!-- gh-comment-id:2118735934 --> @usbrpa commented on GitHub (May 18, 2024): I guess I solved it doing a chown ntfy on the cache db file... is that a good thing? :-)
Author
Owner

@wunter8 commented on GitHub (May 18, 2024):

It makes sense that chown on the cache.db file fixed things. You could still send and receive messages (as you saw) without a working cache.

Did you get the http and https stuff figured out? If so, I think we can probably close this!

<!-- gh-comment-id:2118809009 --> @wunter8 commented on GitHub (May 18, 2024): It makes sense that chown on the cache.db file fixed things. You could still send and receive messages (as you saw) without a working cache. Did you get the http and https stuff figured out? If so, I think we can probably close this!
Author
Owner

@usbrpa commented on GitHub (May 18, 2024):

Yes, it can all be closed. I figured pretty much everything out, it really works like a charm. To be honest, one of the most useful discoveries I've made in years. In my case (home lab / hobby guy) I extremely appreciate being able to get notification from Cron when a job did run etc. I truthfully am delighted by this solution, and havn't explored even 1% of its capabilites. A big THANKS.

<!-- gh-comment-id:2118850549 --> @usbrpa commented on GitHub (May 18, 2024): Yes, it can all be closed. I figured pretty much everything out, it really works like a charm. To be honest, one of the most useful discoveries I've made in years. In my case (home lab / hobby guy) I extremely appreciate being able to get notification from Cron when a job did run etc. I truthfully am delighted by this solution, and havn't explored even 1% of its capabilites. A big THANKS.
Author
Owner

@japharl commented on GitHub (Aug 29, 2024):

FWIW, I noticed the same error message. In my case, the server flipped the bit from read / write file system to read only. (Close ticket, but for others who search for the ticket, it could be another debugging technique to check.)

<!-- gh-comment-id:2318100036 --> @japharl commented on GitHub (Aug 29, 2024): FWIW, I noticed the same error message. In my case, the server flipped the bit from read / write file system to read only. (Close ticket, but for others who search for the ticket, it could be another debugging technique to check.)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#781
No description provided.