Re: Attached: May you support me for this issue logs of HAProxy

2015-03-23 Thread Ha Quan Le
Thank you for support, we have fixed our issues. 
Ha. 
- Original Message -

From: Ramin K ramin-l...@badapple.net 
To: Ha Quan Le nlp...@shaw.ca, haproxy@formilux.org 
Sent: Friday, March 20, 2015 6:56:59 PM 
Subject: Re: Attached: May you support me for this issue logs of HAProxy 

Loads simpler to do the following: 

## /etc/haproxy/haproxy.cfg 

global 
log /dev/log local0 notice 

## /etc/rsyslog.d/49-haproxy.conf 

# Create an additional socket in haproxy's chroot in order 
# to allow logging via /dev/log to chroot'ed HAProxy processes 
$AddUnixListenSocket /var/lib/haproxy/dev/log 

# Send HAProxy messages to a dedicated logfile 
if $programname startswith 'haproxy' then /var/log/haproxy.log 
~ 

I believe most of the above is included in Vincent Bernat's very nice 
Ubuntu/Debian packages, https://launchpad.net/~vbernat 

Ramin 




Re: Attached: May you support me for this issue logs of HAProxy

2015-03-20 Thread Ramin K

Loads simpler to do the following:

## /etc/haproxy/haproxy.cfg

global
  log /dev/log local0 notice

## /etc/rsyslog.d/49-haproxy.conf

# Create an additional socket in haproxy's chroot in order
# to allow logging via /dev/log to chroot'ed HAProxy processes
$AddUnixListenSocket /var/lib/haproxy/dev/log

# Send HAProxy messages to a dedicated logfile
if $programname startswith 'haproxy' then /var/log/haproxy.log
~

I believe most of the above is included in Vincent Bernat's very nice 
Ubuntu/Debian packages, https://launchpad.net/~vbernat


Ramin




Re: Attached: May you support me for this issue logs of HAProxy

2015-03-20 Thread Ha Quan Le
Dear Sir, 


I did create /var/lib/haproxy/var/log, 
and the same issue still remaining, 


Ha. 

- Original Message -

From: Thrawn shell_layer-git...@yahoo.com.au 
To: haproxy@formilux.org 
Sent: Thursday, March 19, 2015 11:59:55 PM 
Subject: Re: Attached: May you support me for this issue logs of HAProxy 


Perhaps the trouble is that you're putting HAProxy inside a chroot? Does 
/var/lib/haproxy/var/log exist? 




Re: Attached: May you support me for this issue logs of HAProxy

2015-03-19 Thread Thrawn

Perhaps the trouble is that you're putting HAProxy inside a chroot? Does 
/var/lib/haproxy/var/log exist?



Attached: May you support me for this issue logs of HAProxy

2015-03-19 Thread Ha Quan Le



Attached! 






Dear HA-Proxy support, 


I am installing HA-Proxy 1.5 to make load balancing for my 3 Ubuntu servers 
(version 14.04) using with Postgresql database 



Primary 10.236.49.12:5432 
HotStandby 172.24.22.68:5432 
AsyncStandby 10.236.134.187:5432 


The HA-Proxy is installed on the Primary only, and not on the HotStandby 
neither on the AsyncStandby. 


After I have done all of the steps below, (you can also download the scripting 
file from this email attachment); 
But however, I still do not have the log files /var/log/haproxy_0.log and 
/var/log/haproxy_1.log (the files are not created), and also not logs of 
haproxy found inside /var/log/syslog 


May you check, here is all the steps that I did. 
My Ha-Proxy does not have any logs. 


I would like to look forward to hearing from you, 
Sincerely, 
Quan Ha Le, 
IT Manager of Canwrx 
IT Manager of Anvy Digital, 
Calgary, Alberta, Canada. 


PS: May you make it urgently, because I tried to fix unsuccessfully for two 
days already. 



 GOOD HAProxy 1.5 -- 

1) Removal of old HA-Proxy1.4 
$ sudo apt-get remove haproxy 


2) Preparation 
$ cd /usr/local/src/ 
local@PGSYNCTEST:/usr/local/src$ sudo apt-get install build-essential 
local@PGSYNCTEST:/usr/local/src$ sudo apt-get build-dep -y haproxy 
local@PGSYNCTEST:/usr/local/src$ sudo apt-get install -y libssl-dev 
local@PGSYNCTEST:/usr/local/src$ sudo apt-get install libpcre3-dev 


3) Download HA-Proxy 1.5 
local@PGSYNCTEST:/usr/local/src$ sudo wget 
http://www.haproxy.org/download/1.5/src/haproxy-1.5.11.tar.gz 
local@PGSYNCTEST:/usr/local/src$ sudo tar xvf haproxy-1.5.11.tar.gz 
local@PGSYNCTEST:/usr/local/src$ cd haproxy-1.5.11 


4) Installation 
local@PGSYNCTEST:/usr/local/src/haproxy-1.5.11$ sudo make TARGET=linux2628 
USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 
gcc -Iinclude -Iebtree -Wall -O2 -g -fno-strict-aliasing 
-DCONFIG_HAP_LINUX_SPLICE -DTPROXY -DCONFIG_HAP_LINUX_TPROXY -DCONFIG_HAP_CRYPT 
-DUSE_ZLIB -DENABLE_POLL -DENABLE_EPOLL -DUSE_CPU_AFFINITY 
-DASSUME_SPLICE_WORKS -DUSE_ACCEPT4 -DNETFILTER -DUSE_GETSOCKNAME -DUSE_OPENSSL 
-DUSE_SYSCALL_FUTEX -DUSE_PCRE -I/usr/include 
-DCONFIG_HAPROXY_VERSION=\1.5.11\ -DCONFIG_HAPROXY_DATE=\2015/01/31\ \ 
-DBUILD_TARGET='linux2628' \ 
-DBUILD_ARCH='' \ 
-DBUILD_CPU='generic' \ 
-DBUILD_CC='gcc' \ 
-DBUILD_CFLAGS='-O2 -g -fno-strict-aliasing' \ 
-DBUILD_OPTIONS='USE_ZLIB=1 USE_OPENSSL=1 USE_PCRE=1' \ 
-c -o src/haproxy.o src/haproxy.c 
gcc -Iinclude -Iebtree -Wall -O2 -g -fno-strict-aliasing 
-DCONFIG_HAP_LINUX_SPLICE -DTPROXY -DCONFIG_HAP_LINUX_TPROXY -DCONFIG_HAP_CRYPT 
-DUSE_ZLIB -DENABLE_POLL -DENABLE_EPOLL -DUSE_CPU_AFFINITY 
-DASSUME_SPLICE_WORKS -DUSE_ACCEPT4 -DNETFILTER -DUSE_GETSOCKNAME -DUSE_OPENSSL 
-DUSE_SYSCALL_FUTEX -DUSE_PCRE -I/usr/include 
-DCONFIG_HAPROXY_VERSION=\1.5.11\ -DCONFIG_HAPROXY_DATE=\2015/01/31\ -c -o 
src/sessionhash.o src/sessionhash.c 
gcc -Iinclude -Iebtree -Wall -O2 -g -fno-strict-aliasing 
-DCONFIG_HAP_LINUX_SPLICE -DTPROXY -DCONFIG_HAP_LINUX_TPROXY -DCONFIG_HAP_CRYPT 
-DUSE_ZLIB -DENABLE_POLL -DENABLE_EPOLL -DUSE_CPU_AFFINITY 
-DASSUME_SPLICE_WORKS -DUSE_ACCEPT4 -DNETFILTER -DUSE_GETSOCKNAME -DUSE_OPENSSL 
-DUSE_SYSCALL_FUTEX -DUSE_PCRE -I/usr/include 
-DCONFIG_HAPROXY_VERSION=\1.5.11\ -DCONFIG_HAPROXY_DATE=\2015/01/31\ -c -o 
src/base64.o src/base64.c 
 


local@PGSYNCTEST:/usr/local/src/haproxy-1.5.11$ sudo make install 
install -d /usr/local/sbin 
install haproxy /usr/local/sbin 
install haproxy-systemd-wrapper /usr/local/sbin 
install -d /usr/local/share/man/man1 
install -m 644 doc/haproxy.1 /usr/local/share/man/man1 
install -d /usr/local/doc/haproxy 
for x in configuration architecture haproxy-en haproxy-fr; do \ 
install -m 644 doc/$x.txt /usr/local/doc/haproxy ; \ 
done 


5) Service start 
local@PGSYNCTEST:/usr/local/src/haproxy-1.5.11$ sudo vi /etc/init.d/haproxy 
HAPROXY=/usr/local/sbin/haproxy 


local@PGSYNCTEST:/usr/local/src/haproxy-1.5.11$ sudo mkdir /var/lib/haproxy 


local@PGSYNCTEST:/usr/local/src/haproxy-1.5.11$ sudo chown -R haproxy:haproxy 
/var/lib/haproxy 


local@PGSYNCTEST:/usr/local/src/haproxy-1.5.11$ sudo /etc/init.d/haproxy start 
* Starting haproxy haproxy [ OK ] 


6) Checking if HA-Proxy 1.5 is running 
local@PGSYNCTEST:/usr/local/src/haproxy-1.5.11$ sudo /etc/init.d/haproxy status 
haproxy is running. 


7) Re-configuration of HA-Proxy 
local@PGSYNCTEST:/usr/local/src/haproxy-1.5.11$ sudo vi 
/etc/haproxy/haproxy.cfg 
global 
log 127.0.0.1 local0 
log 127.0.0.1 local1 notice 
maxconn 45000 # Total Max Connections. This is dependent on your limit 
user haproxy 
group haproxy 
daemon 
nbproc 4 # Number of processors, quad-core by default 
chroot /var/lib/haproxy 
pidfile /var/run/haproxy.pid 
tune.ssl.default-dh-param 2048 


defaults 
log global 
mode tcp 
option tcplog 
#option dontlognull 
option redispatch 
retries 3 
timeout queue 1m 
timeout connect 10s 
timeout client 1m 
timeout server 1m 
timeout check 10s