phusion / passenger-docker

Docker base images for Ruby, Python, Node.js and Meteor web apps
MIT License
2.78k stars 408 forks source link

Passenger watchdog is unable to start since 2.4 #351

Closed bb closed 1 year ago

bb commented 1 year ago

Since upgrading the image from 2.3.1 to 2.4.0, there are issues with Watchdog. We tested passenger-ruby30 and passenger-ruby31. Passenger does not start up at all. The

nginx: [alert] Unable to start the Phusion Passenger(R) watchdog because it encountered the following error during startup: Cannot create a subdirectory inside instance registry directory /var/run/passenger-instreg: No such file or directory (errno=2) (-1: Unknown error)
Dec 20 14:13:15 b1b995d3e6df cron[119]: (CRON) INFO (pidfile fd = 3)
Dec 20 14:13:15 b1b995d3e6df cron[119]: (CRON) INFO (Running @reboot jobs)
[ N 2022-12-20 14:13:15.3560 123/T1 age/Wat/WatchdogMain.cpp:1377 ]: Starting Passenger watchdog...
[ W 2022-12-20 14:13:15.3563 123/T1 age/Wat/WatchdogMain.cpp:1075 ]: WARNING: unable to perform privilege escalation vulnerability detection:

 - Security check skipped on /var/run/passenger-instreg: stat() failed: No such file or directory (errno=2)
2022/12/20 14:13:15 [alert] 118#118: Unable to start the Phusion Passenger(R) watchdog because it encountered the following error during startup: Cannot create a subdirectory inside instance registry directory /var/run/passenger-instreg: No such file or directory (errno=2) (-1: Unknown error)

Any request to the Rails app fails with HTTP status 403:

[error] 127#127: *1 directory index of "/home/app/webapp/public/" is forbidden, client: 172.22.0.xxx, server: , request: "GET / HTTP/1.1", host: "example.org"
CamJN commented 1 year ago

oh bother, thanks for the report. as a workaround for now, create the path /var/run/passenger-instreg in your dockerfile, i'll create a release with this fixed soon.

scratchoo commented 1 year ago

Just used this image for the first time and got the same issue, I was about to lose my mind as I would never thought its a bug... the workaround @CamJN provided works! thanks

Moneshs commented 1 year ago

@CamJN When will the issue get fixed? Its totally affecting our environment

CamJN commented 1 year ago

@Moneshs the fix is rolling out now.

Moneshs commented 1 year ago

@CamJN Thanks for the fix

bb commented 1 year ago

The new images work again. Thank you for fixing it so quickly and also for the even quicker workaround hint, Camden!