php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74166 IPv6 forced to be enabled
Submitted: 2017-02-25 12:39 UTC Modified: 2017-03-08 19:05 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: thflori at gmail dot com Assigned: pollita (profile)
Status: Closed Package: FPM related
PHP Version: 7.1.2 OS: Alpine Linux 3.5
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: thflori at gmail dot com
New email:
PHP Version: OS:

 

 [2017-02-25 12:39 UTC] thflori at gmail dot com
Description:
------------
The listen directive in fpm pool configuration is described that 9000 should listen on all interfaces and addresses on port 9000. It is not described that you have to have IPv6 address family. But currently fpm stops with this error message when IPv6 is not available:
ERROR: failed to create new listening socket: socket(): Address family not supported by protocol (97)

Expected result:
----------------
I expect that it listens on 0.0.0.0:9000 when only IPv4 is available.

Actual result:
--------------
The fpm process stops and does not listen on any interface / ip address.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-08 07:01 UTC] pollita@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: pollita
 [2017-03-08 07:01 UTC] pollita@php.net
Confirmed.  FPM assumes a bind address of "::" which normally includes both IPv6 ANYADDR and IPV4 mapped ANYADDR, but if your system doesn't have IPV6, then it'll fail as you're experiencing.

In the short term, you can specify a "port" of "0.0.0.0:9000" and it should work fine on your system.

Longer term I'll put together a fix and get this onto 7.0+
 [2017-03-08 19:05 UTC] pollita@php.net
-Status: Verified +Status: Closed
 [2017-03-08 19:05 UTC] pollita@php.net
After some consideration of the impact of the fix and the ease with which it can be worked around via configuration, I've decided to only apply the fix to 7.2

https://github.com/php/php-src/commit/b63c45c69e3a97b05314c6f3328a0ff695e28d36

Using listen=0.0.0.0:9000 in your config should work just fine, however.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 06:01:30 2024 UTC