You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2024/10/24 23:20:18 UTC

[Bug 69410] New: Reverse proxy gives error 22 (invalid argument) when connecting to target site

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

            Bug ID: 69410
           Summary: Reverse proxy gives error 22 (invalid argument) when
                    connecting to target site
           Product: APR
           Version: 1.7.5
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: major
          Priority: P2
         Component: APR
          Assignee: bugs@apr.apache.org
          Reporter: g.teley@teley.nl
  Target Milestone: ---

After upgrading apr from 1.7.3.1.6.3_1 -> 1.7.5.1.6.3 on FreeBSD
14.1-RELEASE-p5 all websites located in FreeBSD jails returned "503 Service
Unavailable".
Sites served, other than through reverse proxy, worked fine.

Settings for the VHOST were:
        ProxyRequests Off
        ProxyPreserveHost On
        ProxyPass / http://192.168.1.105:80/ retry=0 timeout=3600 Keepalive=On
        ProxyPassReverse / http://192.168.1.105:80/
        RequestHeader set X_FORWARDED_PROTO 'https'

Setting the LogLevel to 'debug' showed:
[proxy:error] [pid 11308] (22)Invalid argument: AH00957: http: attempt to
connect to 192.168.1.105:80 (192.168.1.105:80) failed

After a roll-back to version 1.7.3.1.6.3_1 everything worked fine again.

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


[Bug 69410] Reverse proxy gives error 22 (invalid argument) when connecting to target site

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

Jung-uk Kim <jk...@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jkim@FreeBSD.org

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


[Bug 69410] Reverse proxy gives error 22 (invalid argument) when connecting to target site

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

--- Comment #4 from Jung-uk Kim <jk...@FreeBSD.org> ---
Created attachment 39934
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=39934&action=edit
Fix poll(2) usage for FreeBSD

FreeBSD does not allow negative timeout other than INFTIM(-1).

https://man.freebsd.org/cgi/man.cgi?query=poll&sektion=2&manpath=FreeBSD+14.1-RELEASE

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


[Bug 69410] Reverse proxy gives error 22 (invalid argument) when connecting to target site

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

Jung-uk Kim <jk...@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39934|0                           |1
        is obsolete|                            |

--- Comment #6 from Jung-uk Kim <jk...@FreeBSD.org> ---
Created attachment 39941
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=39941&action=edit
Fix poll(2) usage for FreeBSD

Although it did not directly affect me, we need to proactively patch
poll/unix/poll.c to mitigate possible issues with poll(2).

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


[Bug 69410] Reverse proxy gives error 22 (invalid argument) when connecting to target site

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

--- Comment #1 from Ruediger Pluem <rp...@apache.org> ---
There are no obvious changes to the network code in APR between 1.7.3 and
1.7.5. Maybe patches added by the FreeBSD team changed. Please open a ticket
with them.

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


[Bug 69410] Reverse proxy gives error 22 (invalid argument) when connecting to target site

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

Bernard Spil <br...@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://bugs.freebsd.org/bu
                   |                            |gzilla/show_bug.cgi?id=2821
                   |                            |37

--- Comment #5 from Bernard Spil <br...@freebsd.org> ---
(In reply to Ruediger Pluem from comment #1)
> There are no obvious changes to the network code in APR between 1.7.3 and
> 1.7.5. Maybe patches added by the FreeBSD team changed. Please open a ticket
> with them.

FreeBSD port maintainer here. Patch was provided by FreeBSD base/ports
committer jkim@freebsd.org.

This patch has now been added to the FreeBSD port apr-1.7.5.1.6.3_3 see
https://cgit.freebsd.org/ports/commit/?id=efc00d9fd418d84a1f88c3b74a2d07bd41df7f91

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


[Bug 69410] Reverse proxy gives error 22 (invalid argument) when connecting to target site

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

--- Comment #2 from Jung-uk Kim <jk...@FreeBSD.org> ---
I just experienced a similar issue.  I found reverting this commit fixed the
problem:

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

Note we use kqueue(2) and it has nanosecond resolution.  So, I believe there's
a bad interaction with the commit.

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


[Bug 69410] Reverse proxy gives error 22 (invalid argument) when connecting to target site

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

--- Comment #3 from Jung-uk Kim <jk...@FreeBSD.org> ---
I narrowed it down and found reverting the patch for support/unix/waitid.c is
just enough to fix the behavior for me.

https://svn.apache.org/viewvc/apr/apr/branches/1.7.x/support/unix/waitio.c?r1=1893277&r2=1909335&view=patch

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