[SOLVED] /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haprox

Started by abackler, March 30, 2017, 02:36:44 PM

Previous topic - Next topic
Hi all
I started with 16.7 and have upgraded via console to 17.1 (now 17.1.4).
I was having some configuration issues with HAProxy and the short story is that I installed relayd alongside HAProxy. I tried to switch back to HAProxy but it wasn't working.  The log shows:
root: /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy.

I noted during the relayd installation that libwww got removed. I found that although this package is at the 16.7 repository it is not on the 17.1 repository. I presume that is why.

How do I get HAProxy to run again? Does it depend on libwww, or is something else amiss?

Thanks
Adrian

Hi Adrian,

"root: /usr/local/etc/rc.d/haproxy: WARNING: failed precmd routine for haproxy." is really unspecific. Do you have an actual error from haproxy binary? Or is there anything in the haproxy log file?

I also don't know about libwww, I think it was added for NTP at some point via FreeBSD ports, but was removed again so it's not in 17.1.4. On the other hand, if it's not on the mirror, no other package should depend on it.


Cheers,
Franco

Hi Franco

The coincidence seemed too strong...
I didn't find anything in haproxy.log, but being a UNIX person for more than half the epoch, I did find the problem. By running /usr/local/etc/rc.d/haproxy start, I got an alert about not being able to load a private key from a pem file. When I looked at that file, I had a line:
-----END PRIVATE KEY----------BEGIN CERTIFICATE-----
Changing that to the expected
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
and HAProxy starts.

Now, I am wondering how this file got 'adjusted' ... but not enough to spend any more time on it.

Case closed!

Thanks for the speedy input.

Kind regards
Adrian