We’ve run into an error every time we power cycle our pbxact server. It reboots properly but apache fails to run every time. As a result, we can’t access the web gui.
The reason for the failure appears to be that “haproxy” is running on the same port as “sangoma phone desktop client service.” In order to get apache to run, I have to SSH into the server as root and run “sudo systemctl stop haproxy” then “sudo systemctl restart httpd.” That works, but haproxy is no longer running.
What is odd to me is that after this happened the first time, I went in and changed the port on the Sangoma phone desktop client service from 6443 to 2443. I figured that would resolve the conflict. However, the next time I power cycled it, the same issue reoccurred, except now when I look at the haproxy.cfg file it has somehow updated to 2443 on it’s own instead of 6443. (see below).
Is there a way to permanently resolve this conflict on bootup?
I’m tempted to change the port in the haproxy.cfg file but I’m not sure the consequences of making a manual change to that.
Automatically Generated File - 1703369695
Do NOT edit this file as it is auto-generated
#---------------------------------------------------------------------
#---------------------------------------------------------------------
Global settings
#---------------------------------------------------------------------
global
to have these messages end up in /var/log/haproxy.log you will
need to:
1) configure syslog to accept network log events. This is done
by adding the ‘-r’ option to the SYSLOGD_OPTIONS in
/etc/sysconfig/syslog
2) configure local2 events to go to the /var/log/haproxy.log
file. A line like the following can be added to
/etc/sysconfig/syslog
local2.* /var/log/haproxy.log
tune.ssl.default-dh-param 2048
log /dev/log local0 debug #127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 25000
user haproxy
group haproxy
daemon
nbproc 1
nbthread 2
cpu-map auto:1/1-2 0-1
ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11
turn on stats unix socket
stats socket /var/lib/haproxy/stats mode 777
#---------------------------------------------------------------------
common defaults that all the ‘listen’ and ‘backend’ sections will
use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout tunnel 1h
timeout check 10s
maxconn 25000
option log-health-checks
#---------------------------------------------------------------------
main frontend which proxys to the backends
#---------------------------------------------------------------------
frontend wss_frontend
bind *:2443 ssl crt /etc/httpd/pki/webserver.pem
http-request add-header X-Real-IP %[src]
maxconn 25000
acl main_path path /main && query -i -m sub showPasswordForm=true
acl is_sangoma hdr_sub(user-agent) -i Sangoma
http-request deny unless is_sangoma
http-request replace-header Host ([^:]+) if main_path
http-request redirect code 301 location https://%[hdr(host)]:3443/?action=reset if main_path
use_backend chat if { path /chatul } || { path_beg /chatul/ }
use_backend scd_downloads if { path /scd_downloads } || { path_beg /scd_downloads/ }
use_backend scd_contacts if { path /scd_contacts } || { path_beg /scd_contacts/ }
use_backend scd_queues if { path /scd_queues } || { path_beg /scd_queues/ }
use_backend rtapiws if { path /rtapiws } || { path_beg /rtapiws/ }
use_backend sipws if { path /sipws } || { path_beg /sipws/ }
acl main_path path /main && query -i -m sub showPasswordForm=true
acl is_scd_downloads path_beg /scd_downloads
acl is_scd_contacts path_beg /scd_contacts
acl is_scd_queues path_beg /scd_queues
acl is_rtapiws path_beg /rtapiws
acl is_sipws path_beg /sipws
acl is_main path_beg /main
backend chat
balance source
server chat 127.0.0.1:6086 check
backend scd_downloads
balance source
server scd_downloads 127.0.0.1:6002 check
backend scd_contacts
balance source
server scd_contacts 127.0.0.1:6002 check
backend scd_queues
balance source
server scd_queues 127.0.0.1:6002 check
backend rtapiws
balance source
server rtapiws 127.0.0.1:6006 check
backend sipws
balance source
server sipws 127.0.0.1:6006 check