Issue of the topic: PiHole w/ LightTPD disabled browser access for openhab
I recently installed Pihole (as docker container) again on the same Pi which is running OH. I did this back in 2019/2020 and there were no problems. Now I encounter some issues with LightTDP, which is installed by pihole. I do not know if that is new.
Since having LightTDP running I can’t access openhab from my Browser anymore. The App works fine, but trying to acces pi:8080 will result in me being taken over to the phoscon gateway login page. (pi/pwa/login). I can access the pihole on its port just fine though. Now I already fiddled with nginx once, which appears to do the same as lighttdp, but it currently is not running on my system. I have also found somewhere, that openhab uses jetty for whatever that is called. The lighttdp config hasn’t been very helpfull on how to set any of this up, neither has any search resulted in any thing usefull.
Can you please ELI5 (explain like im five)? I claim to be somewhat techsavy, but all this networking stuff is way beyond me.
How can I configure any of the services to let me access OH again?
What does lighttdp / nginx / jetty actually do and can they coexist?
I had three in that age - not sure if that will work
Don’t put all your toys into/onto one box. Use a separate box for each of your toys
In case different services/toys ( lighttpd, pihole, openhab, deconz ) use the same port ( e.g. 8080 ) then only the first one started up will win and run on that port. Mother only can listen to one at a time.
sudo nestat -tulpn
this will provide a list of listening services and ports. This list needs to be checked if all your services are listed there. Check the ports that are used.
Analyze each serivce log file resp. the output of
systemctl status pihole deconz openhab lighttpd
in case the services are installed in docker use the related docker command
Yes, the an coexist in the same room as long as they all use their own port.
It is like with the children …
lighttpd: is a light ware webservice that most probably is used to adminsitrate pihole ( big aunt google knows more about it ).
nginx: is a reverse proxy
jetty: is the engine behind OH to provide a webservice
All these need to coexist ( as long as you want to play with all your toys ).
If I had the money and boards lying around I’d do that, but given the current raspberry pricing and the rather low load on my pi that would be a bad economical decision.
Accoording to netstat deconz is running on Port 8080 now. Which it did before I guess, but I was not taken to the actual site of it if I visitied pi:8080. I had to specifically pass pi:8080/pwa. Could lighttpd have interfered with that?
As far as I understand several docs, lighttdp can handle mostly static sites with fixed .html files. At least it seems like that. So if I wanted to actually have some sort of routing of requests to specific ports and therefore use all services in parallel on my system, I would need to read into nginx and set that up to handle requests?
It is not just static pages but dynamic pages via CGI as well.
If you say that deconz is running on port 8080 according to netstat then by going to pi:8080 lighttpd cannot interfere with it. lighttpd must then run on an other port which also is displayed by nestat as long as lighttpd is running on any port.
No. You stated that you want to run all your ‘toys’ on the same box. nginx could be used to relay/forward ports to a different host ( indeed to the same host different port as well ) but what you need is that your applications do not share the same port. Putting something in front that adds an other port and forward it to a port that is already occupied by an other app does not help.
You need to check the config of your apps/toys and make sure they do not use the same port.
deconz, openhab, pihole, lighttpd all should be configurable which port to use.
In case you don’t know which port they use or want to use and you are not sure about it then I suggest to shutdown all of them. Turn on one service at a time and use e.g. netstat to analyze which ports are in use by these apps. Make an overview; detect the overlaying ports and then change the configuration.
While I do understand that, I don’t understand why all of a sudden I can’t access openhab anymore just by installing lighttdp. So there must be something going on, right? I have also changed the port Deconz now, resulting in neither OH nor deCONZ being accessible anymore. What a shame.
This should return a list of listening ports for binaries called lighttpd, java, deconz.
Based on the returned values we can have a look and check what might be wrong.
Please also check the application related log files and journalctl entries.