Summary: | Load balancer byrequests required when bytraffic chosen | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Eric Wilde <ewilde> |
Component: | mod_proxy_balancer | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | justin.bell |
Priority: | P2 | ||
Version: | 2.4.39 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Eric Wilde
2018-05-12 03:36:33 UTC
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 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 Please try the patch available at: https://svn.apache.org/viewvc?view=revision&revision=1856829 According to my testing, this fixes the issue. This is still present in 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. 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 (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? No other changes. No. What else can I look at? 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? /* 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 (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? yep, compiles just fine (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. This has been backported in 2.4.x in r1864005. This is part of 2.4.40. |