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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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 Apr 19 15:01:28 2024 UTC