Try this guy as a test, Gorakhnath?  ( I suspect either user haproxy cannot
bind that port or -- maybe more likely? -- that the listening ip is
incorrect)

# cat /etc/haproxy.cfg.quicktest
global
        log 127.0.0.1   local0
        log 127.0.0.1   local1 notice
        #log loghost    local0 info
        maxconn 4096
        #debug
        #quiet
        #user haproxy
        #group haproxy

defaults
        log     global
        mode    http
        option  httplog
        option  dontlognull
        retries 3
        option redispatch
        maxconn 2000
        contimeout      5000
        clitimeout      50000
        srvtimeout      50000
listen webfarm
       bind :80
       mode http
       stats enable
       stats auth jhon:x
       balance roundrobin
       cookie JSESSIONID prefix
       option httpclose
       option forwardfor
       option httpchk HEAD /check.txt HTTP/1.0
       server webA 192.168.1.34:80 cookie A check
      server webB 192.168.1.41:80 cookie B check

Then

# haproxy -f /etc/haproxy.cfg.quicktest

Double checking the interface is good if the above does not work:

# ip addr

regards!
Carlo

On Tue, Jan 4, 2011 at 4:45 PM, Gorakhnath Mishra <
[email protected]> wrote:

>  Hi,
>
> I am using CentOS 5.5(32 bit)
>
> Details:
> [r...@gnm haproxy-1.3.20]# ps aux|grep httpd
> root      8077  0.0  0.0   4000   680 pts/3    S+   06:12   0:00 grep httpd
> [r...@gnm haproxy-1.3.20]# ps aux|grep haproxy
> root      8080  0.0  0.0   4000   680 pts/3    S+   06:12   0:00 grep
> haproxy
> [r...@gnm haproxy-1.3.20]# cat /etc/haproxy.cfg
> global
>         log 127.0.0.1   local0
>         log 127.0.0.1   local1 notice
>         #log loghost    local0 info
>         maxconn 4096
>         #debug
>         #quiet
>         user haproxy
>         group haproxy
>
> defaults
>         log     global
>         mode    http
>         option  httplog
>         option  dontlognull
>         retries 3
>         option redispatch
>         maxconn 2000
>         contimeout      5000
>         clitimeout      50000
>         srvtimeout      50000
> listen webfarm 192.168.1.99:80
>        mode http
>        stats enable
>        stats auth jhon:x
>        balance roundrobin
>        cookie JSESSIONID prefix
>        option httpclose
>        option forwardfor
>        option httpchk HEAD /check.txt HTTP/1.0
> server webA 192.168.1.34:80 cookie A check
> server webB 192.168.1.41:80 cookie B check
>
> In my case both the server does not up right now.
>
> Thanks
>
>
>
> On 05-01-2011 06:10, Karl Kloppenborg wrote:
>
> Gorakhnath,
>
>  That won't help you, you need to know your config file and know which
> port haproxy is supposed to be connecting on,
>
>  Also, do the following please:
>
>  ps aux | grep httpd
>
>  ps aux | grep haproxy
>
>  and please output each of them to this list, as well please provide your
> config and what operating system your using...
>
>  Thanks.
>
>   *Karl Kloppenborg*
> Head of Development
> *Phone:* 1300 884 839 *(AU Only - Business Hours)*
> *Website:* AU http://www.crucial.com.au| US http://www.crucialp.com
>
>
>  On 05/01/2011, at 11:35, Gorakhnath Mishra wrote:
>
>  Hi,
>
> Thanks for quick response and help.
>
> [r...@gnm network-scripts]# netstat -ano |grep :80
> [r...@gnm network-scripts]# /etc/init.d/haproxy restart
> Shutting down HAproxy:                                     [FAILED]
> Starting HAproxy: [ALERT] 004/060455 (8011) : Starting proxy webfarm:
> cannot bind socket
>                                                            [FAILED]
>
> Thanks
>
>
> On 05-01-2011 06:00, carlo flores wrote:
>
> Same line of thought: perhaps there's a process already running listening
> on your target port.  I'd suggest you do a netstat or lsof to see if Karl is
> right and it is an old HAProxy.  (Just as likely to be another process.)
>
>  For example, if HAProxy is to listen on port 80...
>
>  # netstat -ano |grep :80
>
>
>  On Tue, Jan 4, 2011 at 4:26 PM, Karl Kloppenborg <[email protected]>wrote:
>
>> Hi,
>>
>>  Okay, that is basically caused when you have the socket still binded
>> after shutdown...
>>
>>  What user are you running haproxy under? also, can you give us an idea
>> of your cluster setup? operating system etc?
>>
>>  You cannot bind to an already binded socket, so it will collapse when
>> this error occurs.
>>
>>  --Karl
>>
>>  On 05/01/2011, at 11:22, Gorakhnath Mishra wrote:
>>
>>   Hi,
>>
>> Actually I was getting below error:
>>
>> Shutting down HAproxy:                                     [FAILED]
>> Starting HAproxy: [ALERT] 004/053031 (7134) : Starting proxy webfarm:
>> cannot bind socket
>>                                                            [FAILED]
>> [r...@gnm network-scripts]#
>>
>> Trying to resolve but I will be thankful to u if u give me tips on this.
>>
>> Thanks.
>>
>>
>> On 05-01-2011 05:46, Karl Kloppenborg wrote:
>>
>> Hi Gorakhnath,
>>
>>  Have you even read the documentation?
>>
>>  It is very clear and precise about the prerequisites ...
>>
>>  Also as for a howto? why not just search google, or even howtoforge.com?
>>
>>
>>  Thanks,
>> Karl.
>>
>>
>>   *Karl Kloppenborg*
>> Head of Development
>> *Phone:* 1300 884 839 *(AU Only - Business Hours)*
>> *Website:* AU http://www.crucial.com.au| US http://www.crucialp.com
>>
>> <Mail Attachment.gif>
>>
>>  On 05/01/2011, at 11:11, Gorakhnath Mishra wrote:
>>
>>  Hi,
>>
>> Can sombody give me notes/howto on haproxy and
>> what are the prerequisite etc.
>>
>> Thanks
>> Gorakhnath Mishra
>>
>>
>>
>>
>>
>> --
>> **************** CAUTION - Disclaimer *****************
>> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended
>> solely
>> for the use of the addressee(s). If you are not the intended recipient,
>> please
>> notify the sender by e-mail and delete the original message. Further, you
>> are
>> not to copy, disclose, or distribute this e-mail or its contents to any
>> other
>> person and any such actions are unlawful. This e-mail may contain viruses.
>> Netmagic Solutions Pvt. Ltd. has taken every reasonable precaution to
>> minimize
>> this risk, but is not liable for any damage you may sustain as a result of
>> any
>> virus in this e-mail. You should carry out your own virus checks before
>> opening the e-mail or attachment. Netmagic Solutions Pvt. Ltd. reserves
>> the
>> right to monitor and review the content of all messages sent to or from
>> this
>> e-mail address.
>>
>> Messages sent to or from this e-mail address may be stored on the Netmagic
>> Solutions Pvt. Ltd.'s e-mail system.
>> ***************** End of Disclaimer *******************
>>
>>
>>
>>
>>
>>
>>
>> --
>> **************** CAUTION - Disclaimer ***************** This e-mail
>> contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use
>> of the addressee(s). If you are not the intended recipient, please notify
>> the sender by e-mail and delete the original message. Further, you are not
>> to copy, disclose, or distribute this e-mail or its contents to any other
>> person and any such actions are unlawful. This e-mail may contain viruses.
>> Netmagic Solutions Pvt. Ltd. has taken every reasonable precaution to
>> minimize this risk, but is not liable for any damage you may sustain as a
>> result of any virus in this e-mail. You should carry out your own virus
>> checks before opening the e-mail or attachment. Netmagic Solutions Pvt. Ltd.
>> reserves the right to monitor and review the content of all messages sent to
>> or from this e-mail address. Messages sent to or from this e-mail address
>> may be stored on the Netmagic Solutions Pvt. Ltd.'s e-mail system.
>> ***************** End of Disclaimer *******************
>>
>>
>>
>>
>
>
>
>
> --
> **************** CAUTION - Disclaimer ***************** This e-mail
> contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use
> of the addressee(s). If you are not the intended recipient, please notify
> the sender by e-mail and delete the original message. Further, you are not
> to copy, disclose, or distribute this e-mail or its contents to any other
> person and any such actions are unlawful. This e-mail may contain viruses.
> Netmagic Solutions Pvt. Ltd. has taken every reasonable precaution to
> minimize this risk, but is not liable for any damage you may sustain as a
> result of any virus in this e-mail. You should carry out your own virus
> checks before opening the e-mail or attachment. Netmagic Solutions Pvt. Ltd.
> reserves the right to monitor and review the content of all messages sent to
> or from this e-mail address. Messages sent to or from this e-mail address
> may be stored on the Netmagic Solutions Pvt. Ltd.'s e-mail system.
> ***************** End of Disclaimer *******************
>
>
>
>
>   &nbsp &nbsp
>
>
> --
> **************** CAUTION - Disclaimer ***************** This e-mail
> contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use
> of the addressee(s). If you are not the intended recipient, please notify
> the sender by e-mail and delete the original message. Further, you are not
> to copy, disclose, or distribute this e-mail or its contents to any other
> person and any such actions are unlawful. This e-mail may contain viruses.
> Netmagic Solutions Pvt. Ltd. has taken every reasonable precaution to
> minimize this risk, but is not liable for any damage you may sustain as a
> result of any virus in this e-mail. You should carry out your own virus
> checks before opening the e-mail or attachment. Netmagic Solutions Pvt. Ltd.
> reserves the right to monitor and review the content of all messages sent to
> or from this e-mail address. Messages sent to or from this e-mail address
> may be stored on the Netmagic Solutions Pvt. Ltd.'s e-mail system.
> ***************** End of Disclaimer *******************
>  &nbsp &nbsp

Reply via email to