Issue about lighttpd / haproxy conflict "0.0.0.0 already in use" + struggling with exporting logs

Hello

I have an issue to report but am stuck trying to get the logs out of my 3b+. I am sorry if I don’t post enough logs to be useful yet. Please help. For now I can decribe as best I can and say what I did:

(sorry it’s messy, been gathering notes and working on this for the whole day)

Logs problem :

  • need to copy log output, over ssh without scp (using openssh I guess, since dropbear has no scp)
  1. “journalctl” output is too long to fit in the “terminal cache” (beginning of the log goes off screen)
  2. scp with openssh gives a connection refused due to router config bug (no firewall atm, not sure what’s up but port 222 is what I setup, not 22)

ex: scp -P 222 2.txt admin@192.168.1.3:/home
ssh: connect to host 192.168.1.3 port 222: Connection refused

  1. using the following command as a workaround, could work but this means copy/pasting every page of the output manually… but I gave up after 9 pages thinking this can’t be the only way

journalctl -xb

  1. I’d love to use xclip instead, which i installed just to try and make it easier but… I can’t seem to find how to change “ForwardX11 yes” in “~/.ssh/config”. I mean, can’t find that folder / file…

root@DietPi:~# xclip -sel c < 2.txt
Error: Can’t open display: (null)

Maybe there is another, easier way idk. But I’ve been at this for so long now (many many google foo) I’m starting to get tunnel vision. I also looked through the FAQ here. I just couldn’t find much info about logs, so I guess I need to troubleshoot the connection refused thing ^ but I am affraid to mess up more things on my actual system.

I’d really appreciate some insight about this. It would sure be a life saver, for future troubleshooting


EDIT: [SOLVED]
I confirmed that installing fail2ban, pi-hole & unbound without haproxy fix this issue. So I went for that . Not sure if it was due my ingnorance or an acutal bug but anyways, I may check later



Lighttpd + haproxy, actual problem:

Initially the purpose of getting the logs out was to get help and report a blocker issue I have with lighttpd error

A start job for unit haproxy.service has finished successfully.
░░
░░ The job identifier is 129.
Aug 24 00:30:33 DietPi haproxy[499]: [WARNING] (499) : Server nodes/web01 is DOWN, reason: Layer4 connection problem, info: “Connection refused”, check duration: 0ms. 2 active and 0 backup servers left. 0 sess>
Aug 24 00:30:33 DietPi systemd[1]: Starting The PHP 7.4 FastCGI Process Manager…



The job identifier is 198.
Aug 24 00:30:34 DietPi haproxy[499]: [WARNING] (499) : Server nodes/web02 is DOWN, reason: Layer4 connection problem, info: “Connection refused”, check duration: 0ms. 1 active and 0 backup servers left. 0 sess>
Aug 24 00:30:35 DietPi haproxy[499]: [WARNING] (499) : Server nodes/web03 is DOWN, reason: Layer4 connection problem, info: “Connection refused”, check duration: 0ms. 0 active and 0 backup servers left. 0 sess>
Aug 24 00:30:35 DietPi haproxy[499]: [NOTICE] (499) : haproxy version is 2.4.0-6cbbecf
Aug 24 00:30:35 DietPi haproxy[499]: [NOTICE] (499) : path to executable is /usr/local/sbin/haproxy
Aug 24 00:30:35 DietPi haproxy[499]: [ALERT] (499) : backend ‘nodes’ has no server available!
Aug 24 00:30:35 DietPi systemd[1]: Started The PHP 7.4 FastCGI Process Manager.



Aug 24 00:30:45 DietPi systemd[1]: Failed to start Lighttpd Daemon.



Pi-hole lighttpd (0.0.0.0 already in use)

I don’t even know why I installed haproxy this time. Usually I just do
73 fail2ban
93 pi-hole
182 unbound

Some observations:

  1. when restarting lighttpd maually, it sometimes shows [OK], sometimes not (when using “restart service” menu)
  2. Regardless of the behaviour mentionned above, pi-hole admin webpage always gives a 503
  3. A reboot always show “[ OK ] Dietpi-services | start : lighttpd” but statement #1 and #2 ^ continue to be true
  4. somehow the “deitpi-vpn” got installed but is listed as “inactive” in Dietpi-services, even though I did not choose to install this (unrelated ? expected behavior caused by my other installation choices?)

are we not supposed to combine/install these software together? Sorry if that’s the case… but I figured I should report in case

I will try to re-install without haproxy and see what happens.

Hi,

I guess the issue is that HAProxy as well as Web Server are trying to use same port 80. And of course this is not working. You would need to install web server first, change port away from 80 to 8080 or something similar and install HAProxy afterwards.

Thank you very much, I am still relatively new to proxies and self-hosting stuff but this helped.

it is not really dedicated to proxies. It’s more a basic think. A network port can be used by a single application only.