LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-17-2010, 02:18 AM   #1
agarwalpranay
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Rep: Reputation: 0
haproxy


Hi, I am using haproxy for the first time.I downloaded the latest version 1.4.7 and then unpacked it.then opened the terminal and wrote the command
$make -f Makefile.bsd REGEX=pcre DEBUG= COPTS.generic="-Os -fomit-frame-pointer -mgnu"
After which an executable haproxy file was created which I copied to /usr/local/sbin.
then i wrote $sudo make install
then I make a configuration file in /etc/haproxy.cfg which is as follows

global
maxconn 4096
pidfile /var/run/haproxy.pid
daemon

defaults
mode http
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000

listen GALAXY 192.168.63.51:8080
mode http
cookie GALAXY insert
balance roundrobin
option httpclose
option forwardfor
stats enable
stats auth myuser:mypass
server EARTH 192.168.63.52:7634 cookie GALAXY_SERVER_01 check
server MOON 192.168.63.53 :7634 cookie GALAXY_SERVER_02 check
But it's not working it is various kind of errors intially it was showing "cannot bind to socket" so tried changing the port number but didn't help
I also used command like $sudo sysctl net.ipv4.ip_nonlocal_bind=1 But didn't help.
Please Help!!!
 
Old 06-17-2010, 09:41 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by agarwalpranay View Post
Hi, I am using haproxy for the first time.I downloaded the latest version 1.4.7 and then unpacked it.then opened the terminal and wrote the command
$make -f Makefile.bsd REGEX=pcre DEBUG= COPTS.generic="-Os -fomit-frame-pointer -mgnu"
After which an executable haproxy file was created which I copied to /usr/local/sbin.
then i wrote $sudo make install
then I make a configuration file in /etc/haproxy.cfg which is as follows

global
maxconn 4096
pidfile /var/run/haproxy.pid
daemon

defaults
mode http
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000

listen GALAXY 192.168.63.51:8080
mode http
cookie GALAXY insert
balance roundrobin
option httpclose
option forwardfor
stats enable
stats auth myuser:mypass
server EARTH 192.168.63.52:7634 cookie GALAXY_SERVER_01 check
server MOON 192.168.63.53 :7634 cookie GALAXY_SERVER_02 check
But it's not working it is various kind of errors intially it was showing "cannot bind to socket" so tried changing the port number but didn't help
I also used command like $sudo sysctl net.ipv4.ip_nonlocal_bind=1 But didn't help.
Please Help!!!

are these ports (7634) listening on the local hosts?
What you have to make sure is that all specified ports are open and listening, and do not already have another service using them..

Can you try and paste some more errors here too...?
 
Old 06-18-2010, 12:42 AM   #3
agarwalpranay
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Original Poster
Rep: Reputation: 0
haproxy

[ALERT] 168/111156 (28897) : parsing [/etc/haproxy.cfg:24] : server MOON only supports options 'backup', 'cookie', 'redir', 'observer', 'on-error', 'error-limit', 'check', 'disabled', 'track', 'id', 'inter', 'fastinter', 'downinter', 'rise', 'fall', 'addr', 'port', 'source', 'minconn', 'maxconn', 'maxqueue', 'slowstart' and 'weight'.
[ALERT] 168/111156 (28897) : Error(s) found in configuration file : /etc/haproxy.cfg
[ALERT] 168/111156 (28897) : Fatal errors found in configuration.
 
Old 06-18-2010, 12:44 AM   #4
agarwalpranay
LQ Newbie
 
Registered: Jun 2010
Posts: 4

Original Poster
Rep: Reputation: 0
I have posted above the errors it is currently showing..but it was showing some other erros too earlier like
System proxy GALAXY :cannot bind to the socket.

I also tried changing the port several times but was of no help.
How to make sure the port I am using is not used by some other services!
 
Old 06-19-2010, 01:31 AM   #5
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by agarwalpranay View Post
I have posted above the errors it is currently showing..but it was showing some other erros too earlier like
System proxy GALAXY :cannot bind to the socket.

I also tried changing the port several times but was of no help.
How to make sure the port I am using is not used by some other services!
Code:
Netstat -plant
Or telnet to the port and check response
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
haproxy status error-req ravibhure Linux - Networking 0 02-16-2009 05:04 AM
Haproxy handling diffrent URI guruyaya Linux - Server 0 09-11-2008 06:24 AM
Haproxy by host guruyaya Linux - Server 0 08-26-2008 08:15 AM
A question about HAProxy load balancer cooljai Linux - Server 0 08-25-2008 03:16 AM
HAProxy balancing problem Sheridan Linux - Server 1 03-02-2008 12:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration