Unable to start HAProxy Service after upgrading to version

Hi Team,

We are using the Haproxy as load balancer for our Bitbucket DC Version as suggested in the article Install Bitbucket Data Center | Bitbucket Data Center and Server 8.2 | Atlassian Documentation
Last week we tried to upgrade the HAProxy to version 2.6.1

haproxy -v
HAProxy version 2.6.1-1ppa1~focal 2022/06/22 - https://haproxy.org/
Status: long-term supported branch - will stop receiving fixes around Q2 2027.
Known bugs: http://www.haproxy.org/bugs/bugs-2.6.1.html
Running on: Linux 5.4.0-104-generic #118-Ubuntu SMP Wed Mar 2 19:02:41 UTC 2022 x86_64

After upgrading to this version we noticed that we were not able to start the HAProxy service and when further checked we noticed

service haproxy start
Job for haproxy.service failed because the control process exited with error code.
See “systemctl status haproxy.service” and “journalctl -xe” for details.

Also tried to execute the command haproxy -f /etc/haproxy/haproxy.cfg -db and noticed an error
haproxy -f /etc/haproxy/haproxy.cfg -db
[NOTICE] (3442430) : haproxy version is 2.6.1-1ppa1~focal
[NOTICE] (3442430) : path to executable is /usr/sbin/haproxy
[WARNING] (3442430) : config : parsing [/etc/haproxy/haproxy.cfg:52] : backend ‘bitbucket_http_backend’ : ‘option httplog’ directive is ignored in backends.
[ALERT] (3442430) : config : parsing [/etc/haproxy/haproxy.cfg:60] : ‘stick’: unknown fetch method ‘set-cookie’
[ALERT] (3442430) : config : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
[ALERT] (3442430) : config : Fatal errors found in configuration.
Seeing the above error I tried to comment out the following lines in the haproxy.cfg file
#stick-table type string len 52 size 5M expire 30m
#stick store-response set-cookie(BITBUCKETSESSIONID)
#stick on cookie(BITBUCKETSESSIONID)

Doing so I was able to start the HAProxy service however in the Bitbucket server I am not able to create any repository or project and getting the following error message.

I consulted Atlassian and they said
“For the HAProxy issue, as we know one of the possible causes is the sticky session (mentioned in the article shared in the last mail) that is recommended for the Bitbucket DataCenter setup and without sticky session properties - the application comes up fine, I would request you to work with HAProxy support and verify the issue with them on specific properties. After a check with the vendor team, if you need our involvement - please feel free to raise a new case with us or please feel free to let us know to raise a new case on your behalf.”

The above issue is not noticed in the version “HA-Proxy version 2.0.13-2ubuntu0.1 2020/09/08 - https://haproxy.org/”
Please guide.

Regards
Aravind Viswanathan

Hi All,

Could you please advise?

Regards
Aravind Viswanathan.

The documentation:

http://docs.haproxy.org/2.6/configuration.html#7.3.6-set-cookie

suggests using res.cook() instead of set-cookie() use and use req.cook() instead of cookie():

stick store-response res.cook(BITBUCKETSESSIONID)
stick on req.cook(BITBUCKETSESSIONID)
1 Like

Awesome,
Thank You Very much lukastribus.
That solved my problem.