OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Starting frontend xxxx: cannot bind socket
« previous next »
  • Print
Pages: [1]

Author Topic: Starting frontend xxxx: cannot bind socket  (Read 4908 times)

vikozo

  • Full Member
  • ***
  • Posts: 211
  • Karma: 5
    • View Profile
    • wombat.ch
Starting frontend xxxx: cannot bind socket
« on: November 02, 2020, 09:33:14 pm »
Hello

i wished to add HAProxy to point to a VM on my Setup.
i followed this wonderfull tutorial in German https://schulnetzkonzept.de/opnsense
I think i have done it right but the HAProxy don^t start

Quote
/usr/local/etc/rc.d/haproxy: WARNING: failed to start haproxy

i have also a error like
Quote
kernel   arp: 32:ea:39:26:d2:c1 attempts to modify permanent entry for 10.147.42.195 on igb1
this ip would be the VM i wish to add to HAProxy

and another error but not sure if it belongs to my HAProxy error
Quote
configctl[67179]   error in configd communication Traceback (most recent call last): File "/usr/local/opnsense/service/configd_ctl.py", line 68, in exec_config_cmd line = sock.recv(65536).decode() socket.timeout: timed out
any idea how to find out why HAProxy not start?

have a nice day
vinc

OPNsense 20.7.4-amd64
FreeBSD 12.1-RELEASE-p10-HBSD
LibreSSL 3.1.4
« Last Edit: November 04, 2020, 11:22:27 am by vikozo »
Logged
apu2c4 / wle200nx / 240 Disk --> Firewall | FW-03
---
OPNsense 22.1.6-amd64
FreeBSD 13.0-STABLE
OpenSSL 1.1.1n 15 Mar 2022

vikozo

  • Full Member
  • ***
  • Posts: 211
  • Karma: 5
    • View Profile
    • wombat.ch
Re: after first configuration HAProxy not starting
« Reply #1 on: November 03, 2020, 11:41:12 am »
any idea how to find out why this happen
on all config done a [Test syntax] and [Apply] but never get a error

WARNING: failed to start haproxy

on the HAProxy -> Log File
is only
haproxy[27040]   Proxy Gitlab_backend started.

---------------------------
OPNsense 20.7.4-amd64
FreeBSD 12.1-RELEASE-p10-HBSD
OpenSSL 1.1.1h 22 Sep 2020
« Last Edit: November 03, 2020, 12:01:42 pm by vikozo »
Logged
apu2c4 / wle200nx / 240 Disk --> Firewall | FW-03
---
OPNsense 22.1.6-amd64
FreeBSD 13.0-STABLE
OpenSSL 1.1.1n 15 Mar 2022

vikozo

  • Full Member
  • ***
  • Posts: 211
  • Karma: 5
    • View Profile
    • wombat.ch
Re: after first configuration HAProxy not starting
« Reply #2 on: November 03, 2020, 12:11:52 pm »
going to the terminal

# /usr/local/etc/rc.d/haproxy start
Starting haproxy.
[ALERT] 307/121028 (88262) : Starting frontend http_dmz_Wan: cannot bind socket [10.147.42.5:80]
[ALERT] 307/121028 (88262) : Starting frontend http_dmz_Wan: cannot bind socket [10.147.42.6:80]
[ALERT] 307/121028 (88262) : Starting frontend https_DMZ_WAN: cannot bind socket [10.147.42.5:443]
[ALERT] 307/121028 (88262) : Starting frontend https_DMZ_WAN: cannot bind socket [10.147.42.6:443]
[ALERT] 307/121028 (88262) : Starting frontend https_DMZ: cannot bind socket [10.147.42.6:443]
/usr/local/etc/rc.d/haproxy: WARNING: failed to start haproxy
« Last Edit: November 03, 2020, 06:04:14 pm by vikozo »
Logged
apu2c4 / wle200nx / 240 Disk --> Firewall | FW-03
---
OPNsense 22.1.6-amd64
FreeBSD 13.0-STABLE
OpenSSL 1.1.1n 15 Mar 2022

vikozo

  • Full Member
  • ***
  • Posts: 211
  • Karma: 5
    • View Profile
    • wombat.ch
Re: after first configuration HAProxy not starting
« Reply #3 on: November 03, 2020, 06:05:09 pm »
any idea to fix - the internet show only some way to fix it but not working on opnSense. because it is on BSD running
Logged
apu2c4 / wle200nx / 240 Disk --> Firewall | FW-03
---
OPNsense 22.1.6-amd64
FreeBSD 13.0-STABLE
OpenSSL 1.1.1n 15 Mar 2022

vikozo

  • Full Member
  • ***
  • Posts: 211
  • Karma: 5
    • View Profile
    • wombat.ch
Re: Starting frontend xxxx: cannot bind socket
« Reply #4 on: November 04, 2020, 08:22:38 pm »
Hello
because all the error where on the front end - i removed all of them, and yes HAProxy restarted again.
As soon i added something and did a reload it stop working.
But checking the Documentation there
https://docs.opnsense.org/manual/how-tos/haproxy.html

and removing all my config and just add the config with 0.0.0.0:81 and reload the HAProxy and there is no error!
So i changed back to my IP needed, and i got a error.

so why is it not working with my IP Adress, must this ip be somewhere added too?

have a nice day
and hope to get a feedback.

have a nice day
vinc
Logged
apu2c4 / wle200nx / 240 Disk --> Firewall | FW-03
---
OPNsense 22.1.6-amd64
FreeBSD 13.0-STABLE
OpenSSL 1.1.1n 15 Mar 2022

tomtra

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: Starting frontend xxxx: cannot bind socket
« Reply #5 on: January 26, 2022, 11:51:53 pm »
Hello

I found this thread running into the same issue like the original poster and having errors like:
Code: [Select]
Starting frontend xxxx: cannot bind socket [x.x.x.x:80]
Starting frontend xxxx: cannot bind socket [x.x.x.x:443]

Trying around to find something that already binds the Port 80 (netstat wasn't really helpful here...) on my OPNsense appliance, I found the solution by chance and wanted to leave it here in case someone else find this information helpful.

The HTTP to HTTPS Redirect option of the OPNsense Web GUI was the reason in my case that binds to port 80 if enabled. 

To solve this: Go to System -> Settings -> Administration and make sure to disable the HTTP Redirect option for the Web GUI.

(TCP Port for HTTPS needs also be set to something non-standard, like 44443 if you use haproxy for HTTPS offloading).

See also the image attached for the settings to solve this.
« Last Edit: January 27, 2022, 12:00:15 am by tomtra »
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Starting frontend xxxx: cannot bind socket
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2