You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ian Lea <ia...@gmail.com> on 2008/12/31 13:20:01 UTC

[users@httpd] 2.2.11: BalancerMember Ping/Pong timeout has wrong format

Hi


On apache 2.2.10 a config file with these lines

<Proxy balancer://xxx>
     BalancerMember ajp://localhost:17100 route=yyy ping=10
</Proxy>

works fine, but on 2.2.11 it fails to parse, showing error

Syntax error on line 73 of /opt/apache-2.2.11/conf/test.conf:
BalancerMember Ping/Pong timeout has wrong format


I see that the changes file includes

  mod_proxy: Add the possibility to set the worker parameters
  connectiontimeout and ping in milliseconds. [Ruediger Pluem]

If I've followed the code path correctly (far from certain),
server/util.c says that the following units are understood

* ms    : milliseconds
* s     : seconds
* mi[n] : minutes
* h     : hours

but adding any of those makes no difference - they all still fail with
the parse error.


Any suggestions?



--
Ian.
ian.lea@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] 2.2.11: BalancerMember Ping/Pong timeout has wrong format

Posted by Ian Lea <ia...@gmail.com>.
Grand, thanks.  That fix works for me too.


--
Ian.


On Wed, Jan 14, 2009 at 10:55 PM, Javier Miqueleiz <ja...@miqueleiz.com> wrote:
> On Wed, Dec 31, 2008 at 12:20:01PM +0000, Ian Lea wrote:
>> Hi
>>
>>
>> On apache 2.2.10 a config file with these lines
>>
>> <Proxy balancer://xxx>
>>      BalancerMember ajp://localhost:17100 route=yyy ping=10
>> </Proxy>
>>
>> works fine, but on 2.2.11 it fails to parse, showing error
>>
>> Syntax error on line 73 of /opt/apache-2.2.11/conf/test.conf:
>> BalancerMember Ping/Pong timeout has wrong format
>>
>>
>> I see that the changes file includes
>>
>>   mod_proxy: Add the possibility to set the worker parameters
>>   connectiontimeout and ping in milliseconds. [Ruediger Pluem]
>>
>> If I've followed the code path correctly (far from certain),
>> server/util.c says that the following units are understood
>>
>> * ms    : milliseconds
>> * s     : seconds
>> * mi[n] : minutes
>> * h     : hours
>>
>> but adding any of those makes no difference - they all still fail with
>> the parse error.
>>
>>
>> Any suggestions?
>>
>
> Found the same issue here.
>
> Have debugged the problem with gdb. In function util.c:ap_timeout_parameter_parse
> the first errno checking is true, so it returns an error to its caller.
>
> The apr_strings.c:apr_strtoi64 function just above should clear the errno
> variable at the beginning, I think.
>
> The following patch against apr_strings.c works for me.
>
> diff -uNr /httpd-2.2.11/srclib/apr/strings/apr_strings.c.orig \
> /httpd-2.2.11/srclib/apr/strings/apr_strings.c
> --- /httpd-2.2.11/srclib/apr/strings/apr_strings.c.orig  2006-08-03
> +12:55:31.000000000 +0200
> +++ /httpd-2.2.11/srclib/apr/strings/apr_strings.c       2009-01-14
> +23:24:55.000000000 +0100
> @@ -244,6 +244,7 @@
>
>  APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base)
>  {
> +    errno = 0;
>  #ifdef APR_INT64_STRFN
>     return APR_INT64_STRFN(nptr, endptr, base);
>  #else
>
> Regards,
>
> Javi.
>
>>
>>
>> --
>> Ian.
>> ian.lea@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] 2.2.11: BalancerMember Ping/Pong timeout has wrong format

Posted by Javier Miqueleiz <ja...@miqueleiz.com>.
Thanks for pointing out ;)

-- 
---- Javier Miqueleiz <ja...@SEND.ME.SPAM.miqueleiz.com> ----------

  "Listen to your heart. It knows all things, because it came from the Soul of
   the World, and it will one day return there."

--------------------------------------------------------------------------------

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] 2.2.11: BalancerMember Ping/Pong timeout has wrong format

Posted by Jess Holle <je...@ptc.com>.
A patch already exists for this.  See

http://svn.apache.org/viewvc?rev=727052&view=rev

Javier Miqueleiz wrote:
> On Wed, Dec 31, 2008 at 12:20:01PM +0000, Ian Lea wrote:
>   
>> Hi
>>
>>
>> On apache 2.2.10 a config file with these lines
>>
>> <Proxy balancer://xxx>
>>      BalancerMember ajp://localhost:17100 route=yyy ping=10
>> </Proxy>
>>
>> works fine, but on 2.2.11 it fails to parse, showing error
>>
>> Syntax error on line 73 of /opt/apache-2.2.11/conf/test.conf:
>> BalancerMember Ping/Pong timeout has wrong format
>>
>>
>> I see that the changes file includes
>>
>>   mod_proxy: Add the possibility to set the worker parameters
>>   connectiontimeout and ping in milliseconds. [Ruediger Pluem]
>>
>> If I've followed the code path correctly (far from certain),
>> server/util.c says that the following units are understood
>>
>> * ms    : milliseconds
>> * s     : seconds
>> * mi[n] : minutes
>> * h     : hours
>>
>> but adding any of those makes no difference - they all still fail with
>> the parse error.
>>
>>
>> Any suggestions?
>>
>>     
>
> Found the same issue here.
>
> Have debugged the problem with gdb. In function util.c:ap_timeout_parameter_parse
> the first errno checking is true, so it returns an error to its caller.
>
> The apr_strings.c:apr_strtoi64 function just above should clear the errno
> variable at the beginning, I think.
>
> The following patch against apr_strings.c works for me.
>
> diff -uNr /httpd-2.2.11/srclib/apr/strings/apr_strings.c.orig \
> /httpd-2.2.11/srclib/apr/strings/apr_strings.c
> --- /httpd-2.2.11/srclib/apr/strings/apr_strings.c.orig  2006-08-03
> +12:55:31.000000000 +0200
> +++ /httpd-2.2.11/srclib/apr/strings/apr_strings.c       2009-01-14
> +23:24:55.000000000 +0100
> @@ -244,6 +244,7 @@
>
>  APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base)
>  {
> +    errno = 0;
>  #ifdef APR_INT64_STRFN
>      return APR_INT64_STRFN(nptr, endptr, base);
>  #else
>
> Regards,
>
> Javi.
>
>   
>> --
>> Ian.
>> ian.lea@gmail.com
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>     
>
>   


Re: [users@httpd] 2.2.11: BalancerMember Ping/Pong timeout has wrong format

Posted by Javier Miqueleiz <ja...@miqueleiz.com>.
On Wed, Dec 31, 2008 at 12:20:01PM +0000, Ian Lea wrote:
> Hi
> 
> 
> On apache 2.2.10 a config file with these lines
> 
> <Proxy balancer://xxx>
>      BalancerMember ajp://localhost:17100 route=yyy ping=10
> </Proxy>
> 
> works fine, but on 2.2.11 it fails to parse, showing error
> 
> Syntax error on line 73 of /opt/apache-2.2.11/conf/test.conf:
> BalancerMember Ping/Pong timeout has wrong format
> 
> 
> I see that the changes file includes
> 
>   mod_proxy: Add the possibility to set the worker parameters
>   connectiontimeout and ping in milliseconds. [Ruediger Pluem]
> 
> If I've followed the code path correctly (far from certain),
> server/util.c says that the following units are understood
> 
> * ms    : milliseconds
> * s     : seconds
> * mi[n] : minutes
> * h     : hours
> 
> but adding any of those makes no difference - they all still fail with
> the parse error.
> 
> 
> Any suggestions?
> 

Found the same issue here.

Have debugged the problem with gdb. In function util.c:ap_timeout_parameter_parse
the first errno checking is true, so it returns an error to its caller.

The apr_strings.c:apr_strtoi64 function just above should clear the errno
variable at the beginning, I think.

The following patch against apr_strings.c works for me.

diff -uNr /httpd-2.2.11/srclib/apr/strings/apr_strings.c.orig \
/httpd-2.2.11/srclib/apr/strings/apr_strings.c
--- /httpd-2.2.11/srclib/apr/strings/apr_strings.c.orig  2006-08-03
+12:55:31.000000000 +0200
+++ /httpd-2.2.11/srclib/apr/strings/apr_strings.c       2009-01-14
+23:24:55.000000000 +0100
@@ -244,6 +244,7 @@

 APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base)
 {
+    errno = 0;
 #ifdef APR_INT64_STRFN
     return APR_INT64_STRFN(nptr, endptr, base);
 #else

Regards,

Javi.

> 
> 
> --
> Ian.
> ian.lea@gmail.com
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

-- 
---- Javier Miqueleiz <ja...@SEND.ME.SPAM.miqueleiz.com> ----------

  "Listen to your heart. It knows all things, because it came from the Soul of
   the World, and it will one day return there."

--------------------------------------------------------------------------------

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org