Discussion:
[PacketFence-users] Upgrading PF 6.5 to 7.0 haproxy not starting
Ian MacDonald
2017-05-29 21:21:53 UTC
Permalink
We run PF on Debian Jessie with current packetfence 7.0.2 packages.

pf2:~# dpkg -l | grep packetfence
ii packetfence 7.0.2-1
all PacketFence network registration / worm
mitigation system
ii packetfence-config 7.0.2-1
all Service use to manage PacketFence
configuration.
ii packetfence-doc 7.0.2-1
all documentation for packetfence
ii packetfence-golang-daemon 7.0.2-1
amd64 PacketFence Golang binary.
ii packetfence-ntlm-wrapper 7.0.2-1
amd64 C wrapper around the ntlm_auth utility to
log authentication latency and success/failure.
ii packetfence-pfcmd-suid 7.0.2-1
amd64 C wrapper that replace perl-suid dependence
ii packetfence-redis-cache 7.0.2-1
all Init script to manage redis server.


Running regular security updates on our PF 6.5 server we ended up with many
PF 7.0 components, except those with MariaDB dependencies, sort of pushing
us into the upgrade.

After following
https://github.com/inverse-inc/packetfence/blob/stable/UPGRADE.asciidoc,
not quite in the specified order, we have a PF 7.0 system now, but a few
hangover issues.

The instruction *"Disable packetfence-mariadb on boot" *had us confused.
If we follow the recommendation to execute the systemctl disable
packetfence-mariadb we end up without a DB after boot and related
connectivity and service startup errors. So we have left the service
enabled.

The main problem seems to be that that the haproxy service is not starting.
We do not know why and can't seem to get any detailed logging from the
service startup. We tried changing

log %%active_active_ip%% local0

to

log %%active_active_ip%% local0 debug

in /usr/local/pf/conf/haproxy.conf with no additional log output we could
find.

In the syslog we just get a generic service failure with no details

May 29 16:51:08 pf2 systemd[1]: Started PacketFence HAProxy Load Balancer.
May 29 16:51:08 pf2 systemd[1]: packetfence-haproxy.service: main process
exited, code=exited, status=1/FAILURE
May 29 16:51:08 pf2 systemd[1]: Unit packetfence-haproxy.service entered
failed state.
May 29 16:51:08 pf2 systemd[1]: packetfence-haproxy.service holdoff time
over, scheduling restart.
May 29 16:51:08 pf2 systemd[1]: Stopping PacketFence HAProxy Load
Balancer...

How do we get more debug on this startup failure?; as we have scoured the
logs without any indication as to why this is happening.

We have some other issues, that could be dependent on the haproxy startup,
so we will leave those for now.
Louis Munro
2017-05-30 14:44:22 UTC
Permalink
Running regular security updates on our PF 6.5 server we ended up with many PF 7.0 components, except those with MariaDB dependencies, sort of pushing us into the upgrade.
After following https://github.com/inverse-inc/packetfence/blob/stable/UPGRADE.asciidoc <https://github.com/inverse-inc/packetfence/blob/stable/UPGRADE.asciidoc>, not quite in the specified order, we have a PF 7.0 system now, but a few hangover issues.
The instruction "Disable packetfence-mariadb on boot" had us confused. If we follow the recommendation to execute the systemctl disable packetfence-mariadb we end up without a DB after boot and related connectivity and service startup errors. So we have left the service enabled.
Those instructions are specifically for a two node active/active configuration where the database startup is managed by pacemaker.
Unless that is your case they don't apply to you.
The main problem seems to be that that the haproxy service is not starting. We do not know why and can't seem to get any detailed logging from the service startup. We tried changing
log %%active_active_ip%% local0
to
log %%active_active_ip%% local0 debug
in /usr/local/pf/conf/haproxy.conf with no additional log output we could find.
In the syslog we just get a generic service failure with no details
May 29 16:51:08 pf2 systemd[1]: Started PacketFence HAProxy Load Balancer.
May 29 16:51:08 pf2 systemd[1]: packetfence-haproxy.service: main process exited, code=exited, status=1/FAILURE
May 29 16:51:08 pf2 systemd[1]: Unit packetfence-haproxy.service entered failed state.
May 29 16:51:08 pf2 systemd[1]: packetfence-haproxy.service holdoff time over, scheduling restart.
May 29 16:51:08 pf2 systemd[1]: Stopping PacketFence HAProxy Load Balancer...
How do we get more debug on this startup failure?; as we have scoured the logs without any indication as to why this is happening.
We have some other issues, that could be dependent on the haproxy startup, so we will leave those for now.
Let's try a few things.

First, can you please post the output to these commands:

# systemctl status packetfence-haproxy

# systemctl cat packetfence-haproxy

# ps -ef | grep haproxy



As to the configuration itself, look in /usr/local/pf/var/conf/haproxy.conf to see the configuration that is actually generated by the conf/haproxy.conf template.


You can try running haproxy in debug mode to see what error messages may be lurking there:

# /usr/sbin/haproxy -f /usr/local/pf/var/conf/haproxy.conf -p /usr/local/pf/var/run/haproxy.pid -d



Regards,
--
Louis Munro
***@inverse.ca <mailto:***@inverse.ca> :: www.inverse.ca <http://www.inverse.ca/>
+1.514.447.4918 x125 :: +1 (866) 353-6153 x125
Inverse inc. :: Leaders behind SOGo (www.sogo.nu <http://www.sogo.nu/>) and PacketFence (www.packetfence.org <http://www.packetfence.org/>)
Loading...