We are running the Apache Passenger Module (passenger 6.0.4, Apache 2.4.18), since Passenger 6, all the Machines opening randomly assigned higher ports for each process started by passenger. I am using it to run a ruby on rails application and using ruby 2.3.1 with rbenv version switcher and rails 4.2.9.
i.e.: We have two App instances started by passenger:
~# passenger-status
Version : 6.0.4
Date : Wed Oct 23 09:55:45 +0200 2019
Instance: wCqrhk9f (Apache/2.4.18 (Ubuntu) Phusion_Passenger/6.0.4)
----------- General information -----------
Max pool size : 20
App groups : 1
Processes : 2
Requests in top-level queue : 0
----------- Application groups -----------
/var/www/app/current (production):
App root: /var/www/app/current
Requests in queue: 0
* PID: 8514 Sessions: 0 Processed: 1 Uptime: 15m 37s
CPU: 0% Memory : 98M Last used: 15m 37s ago
* PID: 8533 Sessions: 0 Processed: 0 Uptime: 15m 37s
CPU: 0% Memory : 93M Last used: 15m 37s ago
Additionally there are immediatly two ports opened by passenger:
~# netstat -tulpen | grep current
tcp 0 0 0.0.0.0:32840 0.0.0.0:* LISTEN 1000 492133765 8533/current (forki
tcp 0 0 0.0.0.0:41487 0.0.0.0:* LISTEN 1000 492133704 8514/current (forki
I analysed those ports by using tcpdump and curl, to find out what they are good for, however if I could trust tcpdump, there is not traffic going over those ports and when I send a curl to the ports I get a HTTP/1.1 answer with a 400 error.
I am wondering what those ports are good for and if there is any possibility to advice passenger to not open them or if they are neccessary, to open them only at 127.0.0.1.
Hope anyone here has an Idea :)