From: Simon Horman <[email protected]> | > On Tue, Oct 12, 2010 at 08:39:07AM -0400, Niles Ingalls wrote: >> >> On Oct 12, 2010, at 5:52 AM, Sohgo Takeuchi wrote: >> >> > >> > From: Sohgo Takeuchi <[email protected]> >> > | >> >> From: Niles Ingalls <[email protected]> >> >> | >> >>> On Oct 7, 2010, at 11:37 PM, Sohgo Takeuchi wrote: >> >>> >> >>>> From: Niles Ingalls <[email protected]> >> >>>> | >> >>>>> Hello lvs-users, >> >>>>> >> >>>>> I'm having a problem doing request receive authentication that I'm >> >>>>> unable to resolve on my own. >> >>>>> >> >>>>> I'm using the ldirectord version that comes with debian 5 supplied >> >>>>> with Linux-HA (2.1.3-6lenny4) >> >>>>> I've also tested this with dowload/ldirectord-latest from the >> >>>>> ldirectord download page. >> >>>>> (http://horms.net/projects/ldirectord/download/ldirectord-latest). >> >>>>> >> >>>>> I'm using ldirectord for load balancing 3M Standard Interchange >> >>>>> Protocol (also known as SIP, not to be confused for Session Initiation >> >>>>> Protocol) >> >>>>> >> >>>>> Here's what the config looks like. >> >>>>> >> >>>>> virtual=192.168.80.2:6001 >> >>>>> real=192.168.80.25:6001 masq >> >>>>> request="9300CNredacted|redacted|AY0AZF63B" >> >>>>> receive="^941AY0AZFDFD" >> >>>>> service=simpletcp >> >>>> >> >>>> >> >>>> Hi, >> >>>> >> >>>> How about specifying like this as a workaround. >> >>>> >> >>>> virtual=192.168.80.2:6001 >> >>>> real=192.168.80.25:6001 masq "9300CNredacted|redacted|AY0AZF63B" >> >>>> "^941AY0AZFDFD" >> >>>> service=simpletcp >> >>>> >> >>> >> >>> Hello Sohgo, >> >>> >> >>> Your workaround fixed my problem, and the SIP server is >> >>> authenticating properly. >> >> >> >> Hello Niles, >> >> >> >> That's good. >> >> >> >> When I checked the >> >> http://horms.net/projects/ldirectord/download/ldirectord-latest, >> >> I found that it was not latest. The real latest version does not >> >> need this workaround. >> >> >> >> If you want to get a latest code, please follow a below >> >> instruction written at >> >> http://horms.net/projects/ldirectord/download.shtml >> >> >> >> "The Latest Un-Released Version" -> "Download linux-ha tree >> >> using Mercurial" >> >> >> >>> Oct 8 08:25:52 xenb2sip acs-server: INPUT MSG: >> >>> '9300CNredacted|CO_redacted|AY0AZF63B ' >> >>> Oct 8 08:25:52 xenb2sip acs-server: Sip::MsgType::new('Sip::MsgType', >> >>> '9300CNredacted', '93'): msgtag '0' >> >>> Oct 8 08:25:52 xenb2sip acs-server: Sip::MsgType:_initialize('Login', >> >>> '00CNredacted|CO_re...') >> >>> Oct 8 08:25:52 xenb2sip acs-server: Sip::MsgType::_initialize('Login', >> >>> '00CNHredacted|CO_redacted|', 'A1A1', '2', ... >> >>> Oct 8 08:25:52 xenb2sip acs-server: Successful login for 'redacted' of >> >>> 'indiana' >> >>> >> >>> As you can see, the SIP server is happy. >> >>> New problem, the negotiation between ldirectord and my SIP server >> >>> timeout, as if the response is never received. >> >>> >> >>> DEBUG2: Checking negotiate: real >> >>> server=negotiate:simpletcp:tcp:192.168.80.25:6001:::1:masq:9300CNredacted\|COredacted\|AY0AZF63B\\n:\^941AY0AZFDFD >> >>> (virtual=tcp:192.168.80.2:6001) >> >>> DEBUG2: Checking simpletcp server=192.168.80.25 port=6001 >> >>> DEBUG3: Connected from 192.168.80.2:41853 to 192.168.80.25:6001 >> >>> DEBUG2: Checking simpletcp server=192.168.80.25 port=6001 request: >> >>> 9300CNredacted|COredacted|AY0AZF63B >> >>> DEBUG2: Disabled real >> >>> server=negotiate:simpletcp:tcp:192.168.80.25:6001:::1:masq:9300CNredacted\|COredacted\|AY0AZF63B\\n:\^941AY0AZFDFD >> >>> (virtual=tcp:192.168.80.2:6001) >> >>> DEBUG3: Deactivated service 192.168.80.25:6001: Timeout Alarm at >> >>> /usr/sbin/ldirectord line 3022. >> >>> >> >>> I've tried this with and without adding \n at the end of the request >> >>> without success. >> >>> When using telnet, I have to hit return after sending the request >> >>> 9300CNredacted|COredacted|AY0AZF63B , and after receiving the response >> >>> 941AY0AZFDFD before the connection is closed. >> >>> I assume that since the SIP server isn't closing the connection, this is >> >>> why I'm timing out. >> >> >> >> The ldirectord assumes that the response has a \n. Do you find >> >> the SIP server returns response which contains a \n like >> >> "941AY0AZFDFD\n" ? >> > >> > Could you try following patch? This patch can be applied to >> > http://horms.net/projects/ldirectord/download/ldirectord-latest >> > >> > --- ldirectord-latest.orig 2009-09-15 14:59:34.000000000 +0900 >> > +++ ldirectord-latest 2010-10-12 18:50:12.270363918 +0900 >> > @@ -3355,6 +3355,7 @@ >> > >> > &ld_debug(2, "Checking simpletcp server=$$r{server} >> > port=$d_port request:\n$request"); >> > print $sock $request; >> > + shutdown($sock, SHUT_WR); >> > >> > my $ok; >> > my $reply; >> > >> >> I'm now using the latest Un-Released version with your patch, and it's >> working very well. > > Thanks. Sohgo, are you comfortable with me merging this patch?
Hi Simon, Yes, I am. _______________________________________________ Please read the documentation before posting - it's available at: http://www.linuxvirtualserver.org/ LinuxVirtualServer.org mailing list - [email protected] Send requests to [email protected] or go to http://lists.graemef.net/mailman/listinfo/lvs-users
