Thx for the bug report... I'll investigate. On Nov 15, 2013, at 8:11 PM, Kyle Johnson <[email protected]> wrote:
> I've been attempting to test the uds support on 2.4.x with the uds patch > (<http://people.apache.org/~jim/patches/uds-2.4.patch>). > > I'm assuming HTTP works (it would appear based on the mailing list that the > author has been tested it with HTTP). However, when I try using fcgi the > socket appears to be lost somewhere. > > Example config line: > > > > > ProxyPass / unix:/var/run/php/php-fpm.sock|fcgi://localhost/www/ > > > > > And the error log with debugging on (browsing to http://localhost/index.php): > > [proxy:debug] [pid 30127:tid 140367020521216] proxy_util.c(1773): AH00925: > initializing worker unix:/var/run/php/php-fpm.sock|fcgi://localhost/www/ > shared > [proxy:debug] [pid 30127:tid 140367020521216] proxy_util.c(1815): AH00927: > initializing worker unix:/var/run/php/php-fpm.sock|fcgi://localhost/www/ local > [[proxy:debug] [pid 30127:tid 140367020521216] proxy_util.c(1850): AH00930: > initialized pool in child 30127 for (localhost) min=0 max=64 smax=64 > [proxy_fcgi:debug] [pid 30116:tid 140366778955520] mod_proxy_fcgi.c(73): > [client 66.192.178.3:54534] AH01060: set r->filename to > proxy:fcgi://localhost:8000/www/index.php > [proxy:debug] [pid 30116:tid 140366778955520] mod_proxy.c(1104): [client > 66.192.178.3:54534] AH01143: Running scheme fcgi handler (attempt 0) > [proxy_fcgi:debug] [pid 30116:tid 140366778955520] mod_proxy_fcgi.c(764): > [client 66.192.178.3:54534] AH01076: url: fcgi://localhost:8000/www/index.php > proxyname: (null) proxyport: 0 > [proxy_fcgi:debug] [pid 30116:tid 140366778955520] mod_proxy_fcgi.c(774): > [client 66.192.178.3:54534] AH01078: serving URL > //localhost:8000/www/index.php > [proxy:debug] [pid 30116:tid 140366778955520] proxy_util.c(2101): AH00942: > FCGI: has acquired connection for (*) > [proxy:debug] [pid 30116:tid 140366778955520] proxy_util.c(2176): [client > 66.192.178.3:54534] AH00944: connecting //localhost:8000/www/index.php to > localhost:8000 > [proxy:debug] [pid 30116:tid 140366778955520] proxy_util.c(2311): [client > 66.192.178.3:54534] AH00947: connected /www/index.php to localhost:8000 > [proxy:error] [pid 30116:tid 140366778955520] (111)Connection refused: > AH00957: FCGI: attempt to connect to 127.0.0.1:8000 (*) failed > [proxy_fcgi:error] [pid 30116:tid 140366778955520] [client > 66.192.178.3:54534] AH01079: failed to make connection to backend: localhost > [proxy:debug] [pid 30116:tid 140366778955520] proxy_util.c(2139): AH00943: > FCGI: has released connection for (*) > > If I switch from fcgi to http, I get a log that's a bit different and see > some lines which lead me to believe the uds is simply lost somewhere in the > fcgi setup that it isn't in the http setup (this errors out as the socket is > expecting fcgi, not http): > > ProxyPass / unix:/var/run/php/php-fpm.sock|http://localhost/www/ > > [proxy:debug] [pid 30707:tid 139930058049280] proxy_util.c(1773): AH00925: > initializing worker unix:/var/run/php/php-fpm.sock|http://localhost/www/ > shared > [proxy:debug] [pid 30707:tid 139930058049280] proxy_util.c(1815): AH00927: > initializing worker unix:/var/run/php/php-fpm.sock|http://localhost/www/ local > [proxy:debug] [pid 30707:tid 139930058049280] proxy_util.c(1850): AH00930: > initialized pool in child 30707 for (localhost) min=0 max=64 smax=64 > [proxy:debug] [pid 30721:tid 139929963685632] mod_proxy.c(1104): [client > 66.192.178.3:54544] AH01143: Running scheme http handler (attempt 0) > [proxy:debug] [pid 30721:tid 139929963685632] proxy_util.c(2101): AH00942: > HTTP: has acquired connection for (localhost) > [proxy:debug] [pid 30721:tid 139929963685632] proxy_util.c(2115): AH02545: > HTTP: has determined UDS as /var/run/php/php-fpm.sock > [proxy:debug] [pid 30721:tid 139929963685632] proxy_util.c(2176): [client > 66.192.178.3:54544] AH00944: connecting http://localhost/www/index.php to > localhost:80 > [proxy:debug] [pid 30721:tid 139929963685632] proxy_util.c(2311): [client > 66.192.178.3:54544] AH00947: connected /www/index.php to localhost:80 > [proxy:error] [pid 30721:tid 139929963685632] (2)No such file or directory: > AH02454: HTTP: attempt to connect to Unix domain socket > /var/run/php/php-fpm.sock (localhost) failed > [proxy:error] [pid 30721:tid 139929963685632] AH00959: > ap_proxy_connect_backend disabling worker for (localhost) for 60s > [proxy_http:error] [pid 30721:tid 139929963685632] [client > 66.192.178.3:54544] AH01114: HTTP: failed to make connection to backend: > localhost > [proxy:debug] [pid 30721:tid 139929963685632] proxy_util.c(2139): AH00943: > HTTP: has released connection for (localhost) > > Note in this case the line "HTTP: has determined UDS as > /var/run/php/php-fpm.sock" which is missing from the fcgi case. > > Digging through the code is proving difficult for me to trace where the path > for fcgi breaks down vs http. > > > As an aside, I'm fairly certain that in the case of a fcgi something to the > effect of: > unix:/var/run/php/php-fpm.sock|fcgi:///www/ > > ... should be a valid configuration, however this results in the following > error: > > [proxy_fcgi:error] [pid 31259:tid 140608094070528] [client > 66.192.178.3:54554] AH01059: error parsing URL //: Invalid host/port > > -- > Kyle Johnson >
