LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: ldirectord and squid check

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: ldirectord and squid check
From: Morgan Marodin <mmarodin@xxxxxxxxxxx>
Date: Fri, 16 Apr 2004 15:55:02 +0200
Hi, I win !!! :)

Using this configuration ...
---------------------------------------------------
virtual = 192.168.0.235:8080
    fallback = 127.0.0.1:8080
    real = 192.168.0.28:8080 gate 5
    protocol = tcp
    checktype = connect
    scheduler = wlc
    persistent = 120
---------------------------------------------------

... ldirectord check only port 8080 could be connected ...

---------------------------------------------------
[root@midir perl5]# ldirectord -d start
DEBUG2: Running exec(/usr/sbin/ldirectord -d start)
Running exec(/usr/sbin/ldirectord -d start)
DEBUG2: Starting Linux Director v1.77 with pid: 5655
Starting Linux Director v1.77 with pid: 5655
DEBUG2: Running system(/sbin/ipvsadm -A -t 192.168.0.235:8080 -s wlc -p 120 )
Running system(/sbin/ipvsadm -A -t 192.168.0.235:8080 -s wlc -p 120 )
DEBUG2: Added virtual server: 192.168.0.235:8080
Added virtual server: 192.168.0.235:8080
DEBUG2: Running system(/sbin/ipvsadm -a -t 192.168.0.235:8080 -r 127.0.0.1:8080 -g -w 1) Running system(/sbin/ipvsadm -a -t 192.168.0.235:8080 -r 127.0.0.1:8080 -g -w 1) DEBUG2: Added fallback server: 127.0.0.1:8080 (0 x 192.168.0.235:8080) (Weight set to 1) Added fallback server: 127.0.0.1:8080 (0 x 192.168.0.235:8080) (Weight set to 1) DEBUG2: Checking connect: real server=connect:tcp:192.168.0.28:8080::5:\/: (virtual=tcp:192.168.0.235:8080)
DEBUG3: Connected to  (port 8080)
DEBUG2: Running system(/sbin/ipvsadm -a -t 192.168.0.235:8080 -r 192.168.0.28:8080 -g -w 5) Running system(/sbin/ipvsadm -a -t 192.168.0.235:8080 -r 192.168.0.28:8080 -g -w 5) DEBUG2: Added real server: 192.168.0.28:8080 (0 x 192.168.0.235:8080) (Weight set to 5)
Added real server: 192.168.0.28:8080 (0 x 192.168.0.235:8080) (Weight set to 5)
DEBUG2: Running system(/sbin/ipvsadm -d -t 192.168.0.235:8080 -r 127.0.0.1:8080)
Running system(/sbin/ipvsadm -d -t 192.168.0.235:8080 -r 127.0.0.1:8080)
DEBUG2: Deleted fallback server: 127.0.0.1:8080 (1 x 192.168.0.235:8080)
Deleted fallback server: 127.0.0.1:8080 (1 x 192.168.0.235:8080)
DEBUG2: Enabled server=192.168.0.28
DEBUG3: Activated service 192.168.0.28:8080
DEBUG2: Checking connect: real server=connect:tcp:192.168.0.28:8080::5:\/: (virtual=tcp:192.168.0.235:8080)
DEBUG3: Connected to  (port 8080)
DEBUG3: Activated service 192.168.0.28:8080
---------------------------------------------------

Do you think that it's correct?
If you haven't any other solution ... I'm going to work with this configuration.

Bye, Morgan

At 15.18 16/04/2004, you wrote:
Hi.

If I use this configuration:
---------------------------------------------------
virtual = 192.168.0.235:8080
    fallback = 127.0.0.1:8080
    real = 192.168.0.28:8080 gate 5
    protocol = tcp
    service = http
    scheduler = wlc
    persistent = 120
    request = "http://192.168.0.99/.testpage";
    receive = "Bad Request"
---------------------------------------------------

Debug messages are:
---------------------------------------------------
[root@midir perl5]# ldirectord -d start
DEBUG2: Running exec(/usr/sbin/ldirectord -d start)
Running exec(/usr/sbin/ldirectord -d start)
DEBUG2: Starting Linux Director v1.77 with pid: 5553
Starting Linux Director v1.77 with pid: 5553
DEBUG2: Running system(/sbin/ipvsadm -A -t 192.168.0.235:8080 -s wlc -p 120 )
Running system(/sbin/ipvsadm -A -t 192.168.0.235:8080 -s wlc -p 120 )
DEBUG2: Added virtual server: 192.168.0.235:8080
Added virtual server: 192.168.0.235:8080
DEBUG2: Running system(/sbin/ipvsadm -a -t 192.168.0.235:8080 -r 127.0.0.1:8080 -g -w 1) Running system(/sbin/ipvsadm -a -t 192.168.0.235:8080 -r 127.0.0.1:8080 -g -w 1) DEBUG2: Added fallback server: 127.0.0.1:8080 (0 x 192.168.0.235:8080) (Weight set to 1) Added fallback server: 127.0.0.1:8080 (0 x 192.168.0.235:8080) (Weight set to 1) DEBUG2: Checking negotiate: real server=negotiate:http:tcp:192.168.0.28:8080::5:\/http\:\/\/10\.120\.128\.98\/\.testpage:Bad\ Request (virtual=tcp:192.168.0.235:8080) DEBUG2: Checking http: url="http://192.168.0.28:8080/http://192.168.0.99/.testpage";
LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://192.168.0.28:8080/http://192.168.0.99/.testpage
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 731 bytes
LWP::Protocol::collect: read 145 bytes
LWP::UserAgent::request: Simple response: Bad Request
DEBUG2: Disabled server=192.168.0.28
DEBUG3: Headers Date: Fri, 16 Apr 2004 13:07:33 GMT
Server: Squid/2.4.STABLE6
Content-Length: 876
Content-Type: text/html
Expires: Fri, 16 Apr 2004 13:07:33 GMT
Client-Date: Fri, 16 Apr 2004 14:10:04 GMT
Client-Response-Num: 1
Mime-Version: 1.0
Proxy-Connection: close
Title: ERRORE: URL cannot be retrivied
X-Cache: MISS from proxy.mydomain.com
X-Squid-Error: ERR_INVALID_URL 0
---------------------------------------------------

So ... I try to use nagios plugins to see squid' responces:
---------------------------------------------------
[root@midir plugins]# ./check_tcp -H 192.168.0.28 -p 8080
TCP OK -   0.001 second response time on port 8080|time=  0.001

[root@midir plugins]# ./check_http -H 192.168.0.28 -p 8080
HTTP WARNING: HTTP/1.0 400 Bad Request
---------------------------------------------------

And if I try with telnet to port 8080:
---------------------------------------------------
[root@midir plugins]# telnet 192.168.0.28 8080
Trying 192.168.0.28...
Connected to 192.168.0.28 (192.168.0.28).
Escape character is '^]'.
GET http://192.168.0.99/.testpage HTTP/1.0

HTTP/1.0 200 OK
Date: Fri, 16 Apr 2004 11:11:06 GMT
Server: Apache/2.0.46 (Red Hat)
Last-Modified: Thu, 15 Apr 2004 15:50:23 GMT
ETag: "57c21-a-d8b0dc0"
Accept-Ranges: bytes
Content-Length: 10
Content-Type: text/plain; charset=UTF-8
Age: 7184
X-Cache: HIT from proxy.mydomain.com
Proxy-Connection: close

test page
Connection closed by foreign host.
---------------------------------------------------

Do you have any suggestions? There isn't any pluging to check if a port is alive or not? Or to check telnet service?

Thanks!
Morgan

At 13.52 16/04/2004, you wrote:
Morgan Marodin wrote:
>
> Hi.
>
> Is possible to check availability of SQUID's realserver with ldirectord?
> The man page tells about ftp, smtp, http, pop, nntp, imap, ldap or https
> services.
>
> Is there any trick?

possibly but I don't have a squid setup and I don't know what people do.

How about having the squid check a webpage on some local machine
(possibly even on the realservers).

Joe

--
Joseph Mack PhD, High Performance Computing & Scientific Visualization
SAIC, Supporting the EPA Research Triangle Park, NC 919-541-0007
Federal Contact - John B. Smith 919-541-1087 - smith.johnb@xxxxxxx
_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users

_______________________________________________
LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://www.in-addr.de/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>