Launchpad has imported 30 comments from the remote bug at
https://bz.apache.org/bugzilla/show_bug.cgi?id=53218.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2012-05-11T01:32:29+00:00 Mu1059 wrote:

Hi.

I'm tring to change apache from 2.2 to 2.4.2.
And apachectl reports there is error in my configuration file about proxypass.

-----
# /usr/local/apache24/bin/apachectl -t
AH00548: NameVirtualHost has no effect and will be removed in the next release 
/usr/local/apache24/conf/httpd.conf:101
AH00526: Syntax error on line 615 of /usr/local/apache24/conf/httpd.conf:
ProxyPass worker name 
(http://localhost:3128/VirtualHostBase/http/www.hogefuga.com:80/fugafugafile/VirtualHostRoot/++resource++Products.HOGEHOGE.public.stylesheets)
 too long
-----

I read some sorce files and found there is length limit in worker name.
In mod_proxy.h:305 there is define of length of proxy worker name.

----
#define PROXY_WORKER_MAX_NAME_SIZE      96
----

I think in some casees this size is not enough.
In my case (legth is 177 chars.), I doubled this number and works fine.
Would you please increase this size.

Thank you.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/0

------------------------------------------------------------------------
On 2014-02-13T17:29:52+00:00 kiorky wrote:

I confirm the bug and second the importance of this bug to be solved.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/1

------------------------------------------------------------------------
On 2014-02-25T23:58:22+00:00 Masc2279 wrote:

I can also confirm the bug. This version is completely useless have to
downgrade. Even the hack does not work. Just changing the #define
PROXY_WORKER_MAX_NAME_SIZE      96   by itself does nothing at least on
my side even if you place a number beyond what is needed it still says
too long.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/2

------------------------------------------------------------------------
On 2014-02-26T07:02:44+00:00 kiorky wrote:

We got our way using PT rewrites, eg

# /-> vhmonster proxyreverse because of redirects !
RewriteRule ^/(.*)$ 
/VirtualHostBase/http/edit.foo.bar.net:80/Plone/VirtualHostRoot/$1 [L,PT]

# for https://issues.apache.org/bugzilla/show_bug.cgi?id=53218, only use a 
simple worker url
ProxyPass         /         http://127.0.0.1:8083/ retry=1
ProxyPassReverse  /         
http://127.0.0.1:8083/VirtualHostBase/http/edit.foo.bar.net:80/Plone/VirtualHostRoot/
ProxyPassReverse  /zmiroot/ 
http://127.0.0.1:8083/VirtualHostBase/http/edit.foo.bar.net:80/VirtualHostRoot/_vh_zmiroot/

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/3

------------------------------------------------------------------------
On 2014-07-02T22:50:43+00:00 Alan wrote:

I can confirm this bug as well on Kubuntu 14.04 LTS 64-bit running
Apache 2.4.7.  Unfortunately, it is making it impossible for me to serve
Plone pages through Apache, which is preventing me from upgrading my
production servers to 14.04 LTS.  It would be great if this issue could
be addressed soon.  Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/4

------------------------------------------------------------------------
On 2014-07-03T07:43:12+00:00 kiorky wrote:

Alan, you can use rewrites instead of proxypass, even if it is a bug,
this workaround which is more another way to do that  workaround will
let you upgrade.

If you are just setting up a proxy, you may also opt for something like
nginx.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/5

------------------------------------------------------------------------
On 2014-07-27T18:40:51+00:00 Sebastian Himberger wrote:

I second that. Especially with unix domain sockets allowed in mod_proxy
the names can get quite long.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/6

------------------------------------------------------------------------
On 2014-08-29T18:35:06+00:00 V-jiz-h wrote:

I am looking into whether or not that should be a fatal error... we may
be able to get around just reporting it, and still using/accepting a
truncated copy.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/7

------------------------------------------------------------------------
On 2014-09-04T09:21:38+00:00 Rainer Jung wrote:

Maximum worker name length increased by jim to 256 in trunk (and some other 
limits increased as well). Revisions r1540318, r1621367, r1621372, r1621373, 
r1621382.
Proposed for backport to 2.4.x.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/8

------------------------------------------------------------------------
On 2014-09-04T11:24:01+00:00 Rainer Jung wrote:

There's an API compatibility problem with a straight backport proposal.
Backport on hold.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/9

------------------------------------------------------------------------
On 2014-09-04T19:06:18+00:00 kiorky wrote:

256 is not enougth !

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/10

------------------------------------------------------------------------
On 2014-09-08T10:53:46+00:00 Rainer Jung wrote:

There's a workaround available that should be applicable to many
situations: combined ProxyPass with RewriteRule [P] flag:

One can do reverse proxying with mod_proxy ProxyPass but also with
mod_rewrite RewriteRule [P] flag. The former often is "better", because
it uses a pool of persistent connections to the origin server and the
characteristics of the connections can be configured in more detail.

What is possible here, is a combination of both approaches: Use a
"dummy" ProxyPass with short right side URI to configure a pool to the
origin server but RewriteRule for the individual proxy rules containing
the long target URLs. As long as the right side of the ProxyPass matches
thebeginning of the RewriteRule target URL, the proxying will be done
via the connection pool configured with ProxyPass.

An Example:

# This directive must come before the following one in order
# block access to arbitrary URIs on the origin server!
# As an alternative one can also use "RewriteRule /UNUSED - [F]"
ProxyPass /UNUSED !

# Configure a connection pool for the origin server
# http://myserver.example.org:9081
ProxyPass /UNUSED http://myserver.example.org:9081

RewriteEngine On

# Proxy "/long" to a long URI on the origin server,
# [P] flag at end of line is important
RewriteRule /long 
http://myserver.example.org:9081/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/long.html
 [P]

# Proxy "/verylong" to an even longer URI on the origin server,
# again [P] flag at end of line is important
RewriteRule /verylong 
http://myserver.example.org:9081/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc/dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd/verylong.html
 [P]

Pro:

- you can use long origin server URIs
- the requests are still dispatched to a pool of persistent connections
- You can combine this with ProxyPassReverse and similar directives

Con:

- all requests to this origin server will use the same connection pool, not one 
pool per target URI. This might be a con in some cases (less separation), in 
some it might actually be a pro (sharing of resources)
- need a combination of two different syntaxes (harder to understand)
- might not work for any protocol to the origin server (ajp, fcgi, scgi etc.), 
I simply haven't tested it for those.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/11

------------------------------------------------------------------------
On 2014-09-08T10:56:42+00:00 kiorky wrote:

if you had read the bug report, you would notice that i posted myself
this workaround.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/12

------------------------------------------------------------------------
On 2014-09-08T18:10:44+00:00 Rainer Jung wrote:

Sorry. I read much more than this bug report (there's also other
discussion going on) and overlooked your workaround in comment #3 above.

Note though that

- your recipe opens up the origin server for any URI via the ProxyPass
for "/". Often that is not wanted, therefore my recipe contains the
additional and important ProxyPass with a "!". This in turn only makes
sense by using some "/UNUSED" instead of simply "/". This change has
security implications.

- you are using the pass-through flag "PT", I'm using the proxy flag
"P". I didn't try "PT" but "P" seems to be more correct. Your mileage
may vary.

Regards,

Rainer

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/13

------------------------------------------------------------------------
On 2014-09-08T18:58:32+00:00 Rpluem wrote:

Even easier: Create a

<Proxy protocol://server/yourseparationpathprefix>
   SetProxy anyoption
</Proxy>

block in your configuration and you are using a connection pool with
RewriteRule [P]

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/14

------------------------------------------------------------------------
On 2014-12-02T14:20:48+00:00 Chris-christopherschultz wrote:

+1 for increasing the URL length limit for proxy targets.

I ran into this recently with an https:// proxy where the hostname was
long, causing the URLs to exceed this limit. Using the IP address was
not possible because the HTTPS connection refused to handshake because
of a mismatched hostname (IP != cert hostname).

The workaround in my case was to use ProxyPassMatch which is non-ideal
as it adds a regular expression evaluation (multiple, since I have many
ProxyPassMatch directives) to every request, plus I can't be as specific
as I need to when mapping certain URLs and not others.

I would normally use mod_jk, but the client required the use of HTTPS
between the reverse proxy and application server (Tomcat, in this case).

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/15

------------------------------------------------------------------------
On 2018-02-06T02:52:48+00:00 Emailranjithr wrote:

AH02808: Alert! worker name ....too long; truncated to:96 characters

ProxyPass /
https://somehost.test.com:8080/service=com.test.myservice/version%=0.0.1/routeOffer=default/envContext=TEST/subContext=web/services/myservice/

ProxyPassReverse / 
https://somehost.test.com:8080/service=com.test.myservice/version%=0.0.1/routeOffer=default/envContext=TEST/subContext=web/services/myservice/
 

Actual url length is 189 characters. But Proxy pass restricts to 96
characters. How to increase this length ?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/28

------------------------------------------------------------------------
On 2018-02-07T15:39:00+00:00 Graham Leggett wrote:

This was worked around in v2.4.12 by supporting truncation of the
balancer name:

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

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/29

------------------------------------------------------------------------
On 2018-02-07T15:44:00+00:00 Graham Leggett wrote:

Fixed and released in v2.4.12.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/30

------------------------------------------------------------------------
On 2018-02-07T15:58:00+00:00 kiorky wrote:

Sorry but no, the situation is even now worsier than before.

For very long urls, that per se those that you can have when reverse
proxying zope with VHM urls, truncating may make apache reverse proxying
portions of the site that you would not want to expose in the first
place.


Truncating may expose "upper" resources and is not at all a solution.

Either there is an error, if it is not technically possible,
Or the proxy proxy EXACTLY where we pointed it.

There is no reason to automatically & silently make an assumption where
to proxy and even more on a different location...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/31

------------------------------------------------------------------------
On 2018-02-07T16:46:34+00:00 V-jiz-h wrote:

But it is NOT silently. It is logged at APLOG_ERR to allow the admin to
know that it happened and to decide if it is, or is NOT, a problem.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/32

------------------------------------------------------------------------
On 2018-02-07T16:55:21+00:00 kiorky wrote:

(In reply to Jim Jagielski from comment #20)
> But it is NOT silently. It is logged at APLOG_ERR to allow the admin to know
> that it happened and to decide if it is, or is NOT, a problem.

So truncation does not have to happen, and most of the time even fail.

Exposing upper resources is most of the time EVIL...


This commit is at best a workaround, and in my opinion a big and dangerous 
regression.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/33

------------------------------------------------------------------------
On 2018-02-07T17:07:26+00:00 V-jiz-h wrote:

Of course exposing resources unintentionally is EVIL. That is why when
there is the possibility, it is logged so allow the admin, who is the
final arbitrator, to determine if they are exposed or not.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/34

------------------------------------------------------------------------
On 2018-02-07T18:35:47+00:00 kiorky wrote:

The proxypassed ressources, from a security point of view have not to be
exposed in another location, if there is a mismatch, it is a fatal
configuration error.

The introcuded change is a new (security) bug.

It is not relevant to silently warn the Op behind the scene, this must
either proxypass to the aforementioned location or fail, it's as simple
as that...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/35

------------------------------------------------------------------------
On 2018-02-07T22:26:02+00:00 Chris-christopherschultz wrote:

Is there some very sensitive internal structure which cannot be expanded
to include some larger, arbitrary number of characters/bytes for the
worker-name? If not, can we just get a higher limit on the URL length?
Most URL limits in httpd are around 8k characters/bytes, no?

(In reply to Jim Jagielski from comment #22)
> Of course exposing resources unintentionally is EVIL. That is why when there
> is the possibility, it is logged so allow the admin, who is the final
> arbitrator, to determine if they are exposed or not.

Unfortunately, the log is only advisory. httpd continues to start up in
what I would describe generously as a "degraded" condition... one where
a (likely) larger URL space will be proxied than initially intended.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/36

------------------------------------------------------------------------
On 2018-02-08T08:39:52+00:00 Rpluem wrote:


> 
> (In reply to Jim Jagielski from comment #22)
> > Of course exposing resources unintentionally is EVIL. That is why when there
> > is the possibility, it is logged so allow the admin, who is the final
> > arbitrator, to determine if they are exposed or not.
> 
> Unfortunately, the log is only advisory. httpd continues to start up in what
> I would describe generously as a "degraded" condition... one where a
> (likely) larger URL space will be proxied than initially intended.

I would completely agree if this would be the case, but it isn't. The
error messages tells you that the worker name was truncated. This is
unrelated to the request URL that is forwarded. The truncated worker
name only means that if you have multiple ProxyPass directives and if
the truncation of the worker name leads to the same worker name they use
the same connection pool for the backend connections. This is no issue
at all, contrawise: It saves resources on the backend.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/37

------------------------------------------------------------------------
On 2018-02-08T15:01:32+00:00 Chris-christopherschultz wrote:

(In reply to Ruediger Pluem from comment #25)
> > 
> > (In reply to Jim Jagielski from comment #22)
> > > Of course exposing resources unintentionally is EVIL. That is why when 
> > > there
> > > is the possibility, it is logged so allow the admin, who is the final
> > > arbitrator, to determine if they are exposed or not.
> > 
> > Unfortunately, the log is only advisory. httpd continues to start up in what
> > I would describe generously as a "degraded" condition... one where a
> > (likely) larger URL space will be proxied than initially intended.
> 
> I would completely agree if this would be the case, but it isn't. The error
> messages tells you that the worker name was truncated. This is unrelated to
> the request URL that is forwarded. The truncated worker name only means that
> if you have multiple ProxyPass directives and if the truncation of the
> worker name leads to the same worker name they use the same connection pool
> for the backend connections. This is no issue at all, contrawise: It saves
> resources on the backend.

Thanks for that clarification. To re-phrase, the worker name is being
truncated, but incoming URLs will not be truncated for comparison, yes?

Could this become a problem is if the hostname of the origin server is
something insanely long? For example, if I want two workers like http
://super-long-hostname:80/ and http://super-long-hostname:81/ and those
"super-long-hostname" names exceed the worker-name limit, they will be
considered the same worker, yes? That means that requests that should go
to e.g. port 81 might end up instead going to port 80.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/38

------------------------------------------------------------------------
On 2018-02-13T06:39:28+00:00 Rpluem wrote:

(In reply to Christopher Schultz from comment #26)
> (In reply to Ruediger Pluem from comment #25)
> > > 
> > > (In reply to Jim Jagielski from comment #22)
> > > > Of course exposing resources unintentionally is EVIL. That is why when 
> > > > there
> > > > is the possibility, it is logged so allow the admin, who is the final
> > > > arbitrator, to determine if they are exposed or not.
> > > 
> > > Unfortunately, the log is only advisory. httpd continues to start up in 
> > > what
> > > I would describe generously as a "degraded" condition... one where a
> > > (likely) larger URL space will be proxied than initially intended.
> > 
> > I would completely agree if this would be the case, but it isn't. The error
> > messages tells you that the worker name was truncated. This is unrelated to
> > the request URL that is forwarded. The truncated worker name only means that
> > if you have multiple ProxyPass directives and if the truncation of the
> > worker name leads to the same worker name they use the same connection pool
> > for the backend connections. This is no issue at all, contrawise: It saves
> > resources on the backend.
> 
> Thanks for that clarification. To re-phrase, the worker name is being
> truncated, but incoming URLs will not be truncated for comparison, yes?

Correct.

> 
> Could this become a problem is if the hostname of the origin server is
> something insanely long? For example, if I want two workers like
> http://super-long-hostname:80/ and http://super-long-hostname:81/ and those
> "super-long-hostname" names exceed the worker-name limit, they will be
> considered the same worker, yes? That means that requests that should go to
> e.g. port 81 might end up instead going to port 80.

Yes, this would be a problem. There is a similar PR (PR62085) on this.
But due to ABI constraints this is not easy to fix in a stable version.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/39

------------------------------------------------------------------------
On 2018-02-14T13:58:59+00:00 Chris-christopherschultz wrote:

(In reply to Ruediger Pluem from comment #27)
> (In reply to Christopher Schultz from comment #26)
> > Could this become a problem is if the hostname of the origin server is
> > something insanely long? For example, if I want two workers like
> > http://super-long-hostname:80/ and http://super-long-hostname:81/ and those
> > "super-long-hostname" names exceed the worker-name limit, they will be
> > considered the same worker, yes? That means that requests that should go to
> > e.g. port 81 might end up instead going to port 80.
> 
> Yes, this would be a problem. There is a similar PR (PR62085) on this.
> But due to ABI constraints this is not easy to fix in a stable version.

How about adding a new ProxyPass parameter called "workername" where you
can explicitly set the worker name to something both short AND unique?
Or is that best requested as a new enhancement?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/40

------------------------------------------------------------------------
On 2019-09-20T21:36:17+00:00 Chris-christopherschultz wrote:

*** This bug has been confirmed by popular vote. ***

Reply at:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1668474/comments/41


** Bug watch added: Apache Software Foundation Bugzilla #53218
   http://issues.apache.org/bugzilla/show_bug.cgi?id=53218

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1668474

Title:
  AH00526 when using long ProxyPass worker name

To manage notifications about this bug go to:
https://bugs.launchpad.net/apache2/+bug/1668474/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to