500 Internal server error

Please follow the below template, it will help us to help you!

If you are Experiencing issues with a Pi-hole install that has non-standard elements (e.g you are using nginx instead of lighttpd, or there is some other aspect of your install that is customised) - please use the Community Help category.

Expected Behaviour:

  • Expecting to be able to access pi hole admin in browser
  • Expecting to be able to SSH into pihole using putty
  • Running pihole on lighttpd
  • Raspberry Pi 3 Model B+

Actual Behaviour:

  • When trying to access pihole admin console I get 500 Internal Error
  • Unable to SSH into pihole
  • happens within 24 hours of uptime

Debug Token:

(https://tricorder.pi-hole.net/q7JFvU73/)

I have a few other things that run such as nginx proxy manager through docker and homebridge, these all return error 500.

Please explain any tips like im a child as im semi-new to this

Which URL are you using to access it? You configured lighttpd to use port 8080.

Try http://192.168.1.24:8080/admin.

This is an Operating System function, not related to Pi-hole.

thanks for your reply!

ive been connecting using http://192.168.1.24:8080/admin as i have had it bookmarked since i started using it. It is currently up and working as of now so i can test that this URL works however when it decides to have issues this URL becomes inaccessible with the 500 error.

I mentioned the putty issue just in case this could be related as i am unable to RDP to my pi and connect via Putty when it is in its errored state.

Hope this makes sense!

Apparently something in your Operating System stops working and as a result Pi-hole also stops working, but there is too little information to guess what is the issue.

Thanks for the info!

Do you have any ideas on where to start looking for the issue? I appreciate it may not be pihole related :frowning:

I would suggest looking at various logs on the server when it happens. That is where I usually start, and it often points to the issue, or provides insight into what is occurring at the time.

any tips on what/where i should start looking for these logs? Apologies if thats a dumb question but ive surprisingly never had any issues with my setup on this system before.

The fact that other things also return 500 Internal Server Error sounds like that error is not coming from Pi-hole. This is also supported by the fact that you cannot SSH in. See if there any Homebridge interactions relating to this error.

Your debug log shows everything working okay within Pi-hole. Note that your gateway is the DHCP server and is giving out the Pi-hole and itself (the gateway) as DNS servers to clients, so clients will be able to bypass Pi-hole, but that is an aside and unrelated to the issue you posted.

thanks for the suggestion. I have gone through logs and cant seem to find anything obvious. Just is really confusing to me as the only thing i can do while its in its failed state is ping the pi. Homebridge had an update due but nothing major is being reported back from it

Well, considering that you mention a few other things running on the system that also give the 500 error…

I have a few other things that run such as nginx proxy manager through docker and homebridge, these all return error 500.

I think you may have to do some hunting. Personally, I would trigger the error and see what log files get updated, and start with looking at those. If you happen find something you are not sure about, start searching the web to see if that points you at other things to look at.

Of course, if you have changed something recently, that would also be a good area to start investigating. Unfortunately, with out a solid lead to go on, you will have to do some digging in an effort to narrow in on whatever is happening.

That implies that something between where you're testing from and the Pi is interfering with networking connections to the Pi. Possible candidates to check:

  • Something running on the machine you're testing from - try testing from another machine or try a separate smartphone while you are seeing the problem on one machine.
  • Something running on the Pi - if you have a spare SD card you can start again and take each service one at a time, making sure each step works before installing the next step.
  • The router - there might be a setting which is interfering with TCP/UDP, maybe some parental control option or traffic priority feature, if you have those then try disabling for a while and seeing if it makes any difference.

I have since created a fresh SSD with OS on it which i think will solve my issue. Not exactly a fix but creating backups of my services and restoring them have at least made it less painless.

Regarding the 2nd point of my gateway + dns. can you explain what i would need to do to resolve this? i kinda understand what you're saying but im losing it halfway through as to what i would need to change

Me: Note that your gateway is the DHCP server and is giving out the Pi-hole and itself (the gateway) as DNS servers to clients, so clients will be able to bypass Pi-hole, but that is an aside and unrelated to the issue you posted.

It means that your gateway is telling clients to use both Pi-hole and the gateway for DNS. Clients will usually try all available DNS servers and go with whatever is quickest. Since the gateway has given clients two options they will be using both, and that means they may often use the gateway and not Pi-hole.

To fix it, log in to your gateway's config pages and find the option for the LAN DHCP settings. Hopefully it will let you make changes here (some don't). There are typically spaces for a couple of DNS entries. You would change it so the first entry is Pi-hole's IP, and the second entry is blank. If it can't be blank, try making that also Pi-hole's IP. Save that, and then bounce your clients offf and back on the network to pick up the changed settings.

Now they should only be using Pi-hole for DNS.

Ahhh okay i see what you're saying now. Thanks for clearing that up. I originally set the gateway as the secondary as i was doing a lot of testing on the pi at the time so it would often be offline for periods of the day meaning no one on the network could get internet. I will make these changes now that it is up 24/7

1 Like

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