You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2018/05/12 03:36:33 UTC

[Bug 62372] New: Load balancer byrequests required when bytraffic chosen

https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

            Bug ID: 62372
           Summary: Load balancer byrequests required when bytraffic
                    chosen
           Product: Apache httpd-2
           Version: 2.4.33
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy_balancer
          Assignee: bugs@httpd.apache.org
          Reporter: ewilde@bsmdevelopment.com
  Target Milestone: ---

I have an Apache httpd configuration file that includes:

  ProxySet lbmethod=bytraffic

Under httpd-2.4.29, this directive works fine, providing the config file also
contains:

  LoadModule lbmethod_bytraffic_module \
    modules/mod_lbmethod_bytraffic.so

However, upon upgrading to httpd-2.4.33, with absolutely no other changes to
anything, this same config file fails with:

  [proxy:crit] ... AH02432: Cannot find LB Method: byrequests

The problem can be fixed by adding this line to the config file:

  LoadModule lbmethod_byrequests_module \
    modules/mod_lbmethod_byrequests.so

This is new behavior.  The byrequests load balancer method was never required
up until now.  It looks like somebody may have inadvertently added an incorrect
requirement for byrequests when the "lbmethod=bytraffic" directive is included
in the config file.  It would be nice if this could be fixed, so that one does
not have to build and include the byrequests load balancer method along with
the bytraffic method, if all they want to use is bytraffic.

If, on the other hand, this is now a legitimate requirement, it would be nice
to document the fact that mod_lbmethod_byrequests.so is also required when you
use the bytraffic method.

The build was from the 2.4.33 source, on CentOS 7, 1708, x86_64, using:

  ./configure --prefix=/usr/share/httpd-2.4 \
    --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr \
    --with-ssl=/usr/local \
    --enable-proxy --enable-rewrite --enable-ssl

The complete balancer definition from the config file is:

  <Proxy balancer://ics>
    BalancerMember http://10.100.0.248:8280
    BalancerMember http://10.100.0.247:8280 status=+H
    Require all granted
    ProxySet lbmethod=bytraffic
  </Proxy>

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

justin.bell@cnoinc.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |justin.bell@cnoinc.com

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #8 from justin.bell@cnoinc.com ---
No other changes. No.

What else can I look at?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #2 from justin.bell@cnoinc.com ---
I see the same issue

ProxySet lbmethod=bytraffic

[Mon Apr 01 16:23:51.969976 2019] [proxy:crit] [pid 98302:tid 140326682965760]
AH02432: Cannot find LB Method: byrequests
[Mon Apr 01 16:23:51.970618 2019] [proxy_balancer:emerg] [pid 98302:tid
140326682965760] (22)Invalid argument: AH01183: Cannot share balancer

./httpd -v
Server version: Apache/2.4.38 (Unix)
Server built:   Mar  8 2019 16:56:45

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #7 from Christophe JAILLET <ch...@wanadoo.fr> ---
(In reply to justin.bell from comment #6)
> well, compilation fails with that patch
> 
> proxy_util.c:770: error: conflicting types for ‘ap_proxy_checkproxyblock’
> mod_proxy.h:651: note: previous declaration of
> ‘ap_proxy_checkproxyblock’ was here

Looking at the patch itself in comment #3, having such a compilation error is
really unlikely.
Their must be another issue somewhere else.
Did you apply any other changes?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #10 from justin.bell@cnoinc.com ---
/* Return TRUE if string "str2" occurs literally in "str1" */
static int proxy_match_word(struct dirconn_entry *This, request_rec *r)
{
    const char *host = proxy_get_host_of_request(r);
    return host != NULL && ap_strstr_c(host, This->name) != NULL;
}

/* Backwards-compatible interface. */
PROXY_DECLARE(int) ap_proxy_checkproxyblock(request_rec *r, proxy_server_conf
*conf,
                             apr_sockaddr_t *uri_addr)
{
    return ap_proxy_checkproxyblock2(r, conf, uri_addr->hostname, uri_addr);
}

#define MAX_IP_STR_LEN (46)




This is all downloaded from the Apache httpd website

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #1 from justin.bell@cnoinc.com ---
I see the same issue

ProxySet lbmethod=bytraffic

[Mon Apr 01 16:23:51.969976 2019] [proxy:crit] [pid 98302:tid 140326682965760]
AH02432: Cannot find LB Method: byrequests
[Mon Apr 01 16:23:51.970618 2019] [proxy_balancer:emerg] [pid 98302:tid
140326682965760] (22)Invalid argument: AH01183: Cannot share balancer

./httpd -v
Server version: Apache/2.4.38 (Unix)
Server built:   Mar  8 2019 16:56:45

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

justin.bell@cnoinc.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.4.33                      |2.4.39

--- Comment #4 from justin.bell@cnoinc.com ---
This is still present in

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #6 from justin.bell@cnoinc.com ---
well, compilation fails with that patch

proxy_util.c:770: error: conflicting types for ‘ap_proxy_checkproxyblock’
mod_proxy.h:651: note: previous declaration of ‘ap_proxy_checkproxyblock’
was here

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #5 from Ken Logan <kl...@proteus.co> ---
It appears that the reason mod_lbmethod_byrequests.so is required is because
the configuration setting for lbmethod was not taking effect and the default
method of requests was being used.

This is slightly different than the original report which was just about now
needing mod_lbmethod_byrequests.so to be loaded even if not using it... in
essence, it seems everyone is always using byrequests for the versions affected
by this bug.

The patch looks like it addresses both problems.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

Christophe JAILLET <ch...@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #14 from Christophe JAILLET <ch...@wanadoo.fr> ---
This has been backported in 2.4.x in r1864005.

This is part of 2.4.40.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #11 from Christophe JAILLET <ch...@wanadoo.fr> ---
(In reply to justin.bell from comment #6)
> well, compilation fails with that patch
> 
> proxy_util.c:770: error: conflicting types for ‘ap_proxy_checkproxyblock’
> mod_proxy.h:651: note: previous declaration of
> ‘ap_proxy_checkproxyblock’ was here

Really weird to me.
Does compilation pass without the patch?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #9 from Christophe JAILLET <ch...@wanadoo.fr> ---
This is really weird.

Could you cut'n'paste definition and declaration of "ap_proxy_checkproxyblock"
(i.e. the lines reported by the compiler) + the few ones before and after them?

What version of the code are you patching?
Did you get it from httpd.a.o repository or was it provided by a distro?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #13 from Christophe JAILLET <ch...@wanadoo.fr> ---
(In reply to justin.bell from comment #12)
> yep, compiles just fine

I applied r1856829 on top of latest 2.4.x and it compiles like a charm.
Really, the patch can not be related to your issue.

What compiler and version are you using?

I'll propose r1856829 for backport as it should be part of 2.4.x.
This will give a wider audience.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #3 from Jim Jagielski <ji...@apache.org> ---
Please try the patch available at:

   https://svn.apache.org/viewvc?view=revision&revision=1856829

According to my testing, this fixes the issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


[Bug 62372] Load balancer byrequests required when bytraffic chosen

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=62372

--- Comment #12 from justin.bell@cnoinc.com ---
yep, compiles just fine

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org