This is the error log:
Setting up haproxy (1.8.8-1ubuntu0.1) ...
Job for haproxy.service failed because the control process exited with error code.
See "systemctl status haproxy.service" and "journalctl -xe" for details.
invoke-rc.d: initscript haproxy, action "start" failed.
● haproxy.service - HAProxy Load Balancer
Loaded: loaded (/lib/systemd/system/haproxy.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2018-06-02 12:55:58 IST; 5ms ago
Docs: man:haproxy(1) file:/usr/share/doc/haproxy/configuration.txt.gz
Process: 6482 ExecStart=/usr/sbin/haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS [0;1;31m(code=exited, status=1/FAILURE)[0m
Process: 6481 ExecStartPre=/usr/sbin/haproxy -f $CONFIG -c -q $EXTRAOPTS (code=exited, status=0/SUCCESS)
Main PID: 6482 (code=exited, status=1/FAILURE)
Jun 02 12:55:59 Dell haproxy[6495]: [ALERT] 152/125559 (6495) : Starting proxy mysql: cannot bind socket [127.0.0.1:3306]
Jun 02 12:55:59 Dell systemd[1]: [0;1;39m[0;1;31m[0;1;39mhaproxy.service: Main process exited, code=exited, status=1/FAILURE[0m
Jun 02 12:55:59 Dell systemd[1]: [0;1;39m[0;1;31m[0;1;39mhaproxy.service: Failed with result 'exit-code'.[0m
Jun 02 12:55:59 Dell systemd[1]: [0;1;31m[0;1;39m[0;1;31mFailed to start HAProxy Load Balancer.[0m
Jun 02 12:55:59 Dell systemd[1]: haproxy.service: Service hold-off time over, scheduling restart.
Jun 02 12:55:59 Dell systemd[1]: haproxy.service: Scheduled restart job, restart counter is at 5.
Jun 02 12:55:59 Dell systemd[1]: Stopped HAProxy Load Balancer.
Jun 02 12:55:59 Dell systemd[1]: [0;1;39m[0;1;31m[0;1;39mhaproxy.service: Start request repeated too quickly.[0m
Jun 02 12:55:59 Dell systemd[1]: [0;1;39m[0;1;31m[0;1;39mhaproxy.service: Failed with result 'exit-code'.[0m
Jun 02 12:55:59 Dell systemd[1]: [0;1;31m[0;1;39m[0;
It looks like you have another service already listening on port 3306. Perhaps it's mysql itself?
Please attach these files:
/etc/default/haproxy
/etc/haproxy/haproxy.cfg
And show the output of this command:
sudo netstat -anp
Thanks for filing this bug in Ubuntu.
This is the error log: system/ haproxy. service; enabled; vendor preset: enabled)
file: /usr/share/ doc/haproxy/ configuration. txt.gz /usr/sbin/ haproxy -Ws -f $CONFIG -p $PIDFILE $EXTRAOPTS [0;1;31m( code=exited, status= 1/FAILURE) [0m /usr/sbin/ haproxy -f $CONFIG -c -q $EXTRAOPTS (code=exited, status=0/SUCCESS)
Setting up haproxy (1.8.8-1ubuntu0.1) ...
Job for haproxy.service failed because the control process exited with error code.
See "systemctl status haproxy.service" and "journalctl -xe" for details.
invoke-rc.d: initscript haproxy, action "start" failed.
● haproxy.service - HAProxy Load Balancer
Loaded: loaded (/lib/systemd/
Active: activating (auto-restart) (Result: exit-code) since Sat 2018-06-02 12:55:58 IST; 5ms ago
Docs: man:haproxy(1)
Process: 6482 ExecStart=
Process: 6481 ExecStartPre=
Main PID: 6482 (code=exited, status=1/FAILURE)
Jun 02 12:55:59 Dell haproxy[6495]: [ALERT] 152/125559 (6495) : Starting proxy mysql: cannot bind socket [127.0.0.1:3306] [0;1;31m [0;1;39mhaproxy .service: Main process exited, code=exited, status= 1/FAILURE [0m [0;1;31m [0;1;39mhaproxy .service: Failed with result 'exit-code'.[0m [0;1;39m [0;1;31mFailed to start HAProxy Load Balancer.[0m [0;1;31m [0;1;39mhaproxy .service: Start request repeated too quickly.[0m [0;1;31m [0;1;39mhaproxy .service: Failed with result 'exit-code'.[0m [0;1;39m [0;
Jun 02 12:55:59 Dell systemd[1]: [0;1;39m
Jun 02 12:55:59 Dell systemd[1]: [0;1;39m
Jun 02 12:55:59 Dell systemd[1]: [0;1;31m
Jun 02 12:55:59 Dell systemd[1]: haproxy.service: Service hold-off time over, scheduling restart.
Jun 02 12:55:59 Dell systemd[1]: haproxy.service: Scheduled restart job, restart counter is at 5.
Jun 02 12:55:59 Dell systemd[1]: Stopped HAProxy Load Balancer.
Jun 02 12:55:59 Dell systemd[1]: [0;1;39m
Jun 02 12:55:59 Dell systemd[1]: [0;1;39m
Jun 02 12:55:59 Dell systemd[1]: [0;1;31m
It looks like you have another service already listening on port 3306. Perhaps it's mysql itself?
Please attach these files: haproxy haproxy. cfg
/etc/default/
/etc/haproxy/
And show the output of this command:
sudo netstat -anp
Thanks!