Re: (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted

jean-frederic clere <[email protected]>
Newsgroups gmane.comp.apache.devel
Message-ID <[email protected]>
On 2/12/25 2:21 PM, Yann Ylavic wrote:
> On Wed, Feb 12, 2025 at 12:38 PM Yann Ylavic <[email protected]> wrote:
>>
>> However it seems that [4] will cause worker->s->is_address_reusable =
>> 0 in [3] (i.e. disable DNS reuse altogether) which is not really
>> expected, and would explain why the pool is cleared in
>> connection_cleanup().
>>
>> [3] https://github.com/apache/httpd/blob/2.4.63/modules/proxy/proxy_util.c#L1989-L2034
>> [4] https://github.com/apache/httpd/blob/2.4.63/modules/proxy/proxy_util.c#L2140-L2159
> 
> I think we need something like the attached patch to not let the
> ->disablereuse=1 in [4] (because of a $-substitution including outside
> hostname[:port]) force ->is_address_reusable=0 in [3] implicitly.
> 
> The rationale is that before 2.4.59 ->is_address_reusable and
> ->disablereuse were kind of the same thing (the former, not
> configurable, was set from the latter), but since 2.4.59
> ->is_address_reusable is about the reusability of backend's DNS
> address (and lifetime, both deduced from the address_ttl= parameter)
> while ->disablereuse is about the reusability of the
> connections/sockets only.

the mod_cluster code does:
worker->s->is_address_reusable = 1;
and doesn't care about  worker->s->disablereuse...

> Except we probably still want to disable address reuse when
> disablereuse=on explicitly (for compatibility), but not for the
> implicit case [4], which is what this patch does.
> Thoughts?
> 
> Jean-Frederic, I don't think it addresses your issue because you
> probably have enablereuse=on already if your ProxyPassMatch used to
> reuse connections before 2.4.59? Connection reuse for ProxyPassMatch
> is possible since 2.4.47, but has always depended on enablereuse=on.
> If you don't use ProxyPassMatch with a $-substitution I don't see why
> something changed in 2.4.59 though..

I guess I have to fix mod_cluster, thanks for help.


-- 
Cheers

Jean-Frederic
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.