Skip to content

Instantly share code, notes, and snippets.

@troyfontaine
Created January 25, 2016 16:14
Show Gist options
  • Save troyfontaine/05390f71546bad308ef5 to your computer and use it in GitHub Desktop.
Save troyfontaine/05390f71546bad308ef5 to your computer and use it in GitHub Desktop.
Troubleshooting HAProxy

Troubleshooting HAProxy

Step 1: Verify that HAProxy is running

On ubuntu, run the following command:

sudo service haproxy status

You should see output like below if it is running:

haproxy is running.

Step 2: Verify only one HAProxy process is running:

sudo ps ax | grep haproxy

This should result in output similar to:

  590 ?        Ss     0:00 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /var/run/haproxy.pid -D -sf 334
  602 pts/0    S+     0:00 grep --color=auto haproxy

This indicates only one HAProxy process is currently running. If you see more than one of the first line-you have launched multiple instances of HAProxy which can cause a lot of unexpected behavior.

To fix this condition, use kill PID where PID represents the process identifier (which is the first column in the output of the above command).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment