roadrunner-server / roadrunner

🤯 High-performance PHP application server, process manager written in Go and powered with plugins
https://docs.roadrunner.dev
MIT License
7.92k stars 411 forks source link

Why is listening only ipv6 port? Ipv4 support? #129

Closed 4n70w4 closed 5 years ago

4n70w4 commented 5 years ago

composer req spiral/roadrunner symfony/psr-http-message-bridge

wget https://github.com/spiral/roadrunner/releases/download/v1.3.5/roadrunner-1.3.5-linux-amd64.tar.gz

tar xvzf roadrunner-1.3.5-linux-amd64.tar.gz

Copy .rr.yml and worker.php from https://github.com/spiral/roadrunner/wiki/Symfony-Framework

http:
  address: 0.0.0.0:8080
  maxRequest: 10
  workers:
    command: "php /var/www/app/current/worker.php"
  pool:
    numWorkers: 4

./roadrunner-1.3.5-linux-amd64/rr serve -v -d

DEBU[0000] [static]: disabled DEBU[0000] [rpc]: started DEBU[0000] [http]: started

netstat -tulpn | grep 8080

tcp6 0 0 :::8080 :::* LISTEN -

If run as root:

netstat -tulpn | grep roadr

tcp 0 0 127.0.0.1:6001 0.0.0.0: LISTEN 1291/./roadrunner-1 tcp6 0 0 :::8080 ::: LISTEN 1291/./roadrunner-1

uname -a

Linux php 4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

wget http://localhost:8080/

--2019-02-25 13:09:32--  http://localhost:8080/
Resolving localhost (localhost)... 127.0.0.1, ::1
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58 [application/json]
Saving to: ‘index.html’

100%[==============================================================================>] 58          --.-K/s   in 0s

2019-02-25 13:09:33 (10.6 MB/s) - ‘index.html’ saved [58/58]

In log:

INFO[0090] 127.0.0.1 {843ms} 200 GET http://localhost:8080/

Alex-Bond commented 5 years ago

Did you try to run wget http://127.0.0.1:8080/ ?

wolfy-j commented 5 years ago

It must listen to both ipv4 and ipv6. I can clearly observe server respond by both ipv6 and ipv4 on my local test rig.

screenshot_1

FYI,

maxRequest: 10

it is about maximum request body size, in next release, we will rename this option to avoid confusion. Use pool.maxJobs instead.

4n70w4 commented 5 years ago

Oh, false alarm, sorry. Indeed, the tcp6 line in netstat includes both ipv4 and ipv6. But at first glance misleading.

bramcordie commented 3 years ago

I ended up here, looking for ipv6 support. The discussion here is no longer relevant since roadrunner 2 which at the moment only supports ipv4.