Passenger on Apache fails at Initialize Language Runtime - ruby-on-rails

I am deploying a Ruby on Rails 5.2 app on Ubuntu 16.04 running Apache2 and Passenger 6.0.1 with rvm 1.29.7 in single user mode. I can't seem to get the app to start up with the following failures in the subprocess "Initialize Language Runtime". I've exhausted my search on anyone having a similar problem, so I'm thinking there is something unique to my installation. I'm providing as many details as I think are relevant below, but let me know if you need additional information to help me solve this one:
Here is /var/log/apache2/error.log after I attempt to restart apache:
[Thu Jan 31 03:55:14.310845 2019] [mpm_prefork:notice] [pid 12051] AH00173: SIGHUP received. Attempting to restart
[ N 2019-01-31 03:55:14.3335 14690/T9 age/Cor/CoreMain.cpp:671 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2019-01-31 03:55:14.3337 14690/T1 age/Cor/CoreMain.cpp:1245 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2019-01-31 03:55:14.3338 14690/Tb Ser/Server.h:902 ]: [ApiServer] Freed 0 spare client objects
[ N 2019-01-31 03:55:14.3338 14690/Tb Ser/Server.h:558 ]: [ApiServer] Shutdown finished
[ N 2019-01-31 03:55:14.3339 14690/T9 Ser/Server.h:902 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2019-01-31 03:55:14.3339 14690/T9 Ser/Server.h:558 ]: [ServerThr.1] Shutdown finished
[ N 2019-01-31 03:55:14.3618 19760/T1 age/Wat/WatchdogMain.cpp:1366 ]: Starting Passenger watchdog...
[ N 2019-01-31 03:55:14.3875 19763/T1 age/Cor/CoreMain.cpp:1339 ]: Starting Passenger core...
[ N 2019-01-31 03:55:14.3878 19763/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2019-01-31 03:55:14.3949 19763/T1 age/Cor/CoreMain.cpp:1014 ]: Passenger core online, PID 19763
[Thu Jan 31 03:55:14.415668 2019] [mpm_prefork:notice] [pid 12051] AH00163: Apache/2.4.18 (Ubuntu) Phusion_Passenger/6.0.1 OpenSSL/1.0.2g configured -- resuming normal operations
[Thu Jan 31 03:55:14.415804 2019] [core:notice] [pid 12051] AH00094: Command line: '/usr/sbin/apache2'
[ N 2019-01-31 03:55:14.8130 14690/T1 age/Cor/CoreMain.cpp:1324 ]: Passenger core shutdown finished
[ N 2019-01-31 03:55:16.8669 19763/Tb age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
Here is my environment:
ubuntu#ip-172-31-13-212:~$ env
XDG_SESSION_ID=20
rvm_bin_path=/home/ubuntu/.rvm/bin
TERM=xterm-256color
SHELL=/bin/bash
SSH_CLIENT=173.52.197.236 49586 22
SSH_TTY=/dev/pts/2
rvm_stored_umask=0002
USER=ubuntu
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
rvm_path=/home/ubuntu/.rvm
rvm_prefix=/home/ubuntu
MAIL=/var/mail/ubuntu
PATH=/home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/ubuntu/.rvm/bin:/home/ubuntu/.rvm/bin
rvm_loaded_flag=1
PWD=/home/ubuntu
LANG=en_US.UTF-8
rvm_version=1.29.7-next (master)
SHLVL=1
HOME=/home/ubuntu
LOGNAME=ubuntu
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
SSH_CONNECTION=173.52.197.236 49586 172.31.13.212 22
LESSOPEN=| /usr/bin/lesspipe %s
XDG_RUNTIME_DIR=/run/user/1000
LESSCLOSE=/usr/bin/lesspipe %s %s
rvm_user_install_flag=1
_=/usr/bin/env

I found the answer to this issue thanks to the folks supporting the Passenger opensource project. It turns out that in my virtual host file for Apache, the path I provided for PassengerRuby was pointing to a nonexistent ruby. You can read about it here: https://github.com/phusion/passenger/issues/2179

Related

Apache2 Passenger not updating Ruby on Rails classes on restart

Forgive me as I am a bit new to this but I have inherited an Ruby On Rails web application that runs on Apache2 Passenger. I have tried to make a small change to the application which works succssefully on DEV so I have deployed to our PROD environment. However after deploying and restarting Apache2 none of my changes are taking effect. If I change the
config.cache_classes = true
Setting in the config/environments/production.rb to false then all is fine, however everything I read is that should only be set to false in dev.
This leads me to believe that the cache is not being refreshed once Apache2 is started. Any ideas on what this could be? I don't see any errors in the Apache2 error log (debug level set), below is a snippet from a restart.
[Tue Sep 27 09:30:09.840437 2022] [mpm_event:notice] [pid 6259:tid 139952997727168] AH00491: caught SIGTERM, shutting down
[ N 2022-09-27 09:30:09.8404 6264/T8 age/Cor/CoreMain.cpp:614 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2022-09-27 09:30:09.8405 6264/T1 age/Cor/CoreMain.cpp:1112 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2022-09-27 09:30:09.8406 6264/T1 age/Cor/CoreMain.cpp:1026 ]: Checking whether to disconnect long-running connections for process 6492, application /var/www/fpsmidas (production)
[ N 2022-09-27 09:30:09.8408 6264/T8 Ser/Server.h:903 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8409 6264/T8 Ser/Server.h:559 ]: [ServerThr.1] Shutdown finished
[ N 2022-09-27 09:30:09.8421 6264/Td Ser/Server.h:903 ]: [ServerThr.4] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8421 6264/Td Ser/Server.h:559 ]: [ServerThr.4] Shutdown finished
[ N 2022-09-27 09:30:09.8422 6264/Ta Ser/Server.h:903 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8422 6264/Tc Ser/Server.h:903 ]: [ServerThr.3] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8422 6264/Ta Ser/Server.h:559 ]: [ServerThr.2] Shutdown finished
[ N 2022-09-27 09:30:09.8422 6264/Tc Ser/Server.h:559 ]: [ServerThr.3] Shutdown finished
[ N 2022-09-27 09:30:09.8436 6264/Tf Ser/Server.h:903 ]: [ApiServer] Freed 0 spare client objects
[ N 2022-09-27 09:30:09.8436 6264/Tf Ser/Server.h:559 ]: [ApiServer] Shutdown finished
[ N 2022-09-27 09:30:09.8437 6264/T1 age/Cor/CoreMain.cpp:1026 ]: Checking whether to disconnect long-running connections for process 6492, application /var/www/fpsmidas (production)
[ N 2022-09-27 09:30:09.8586 6264/T8 age/Cor/CoreMain.cpp:614 ]: Signal received. Gracefully shutting down... (send signal 1 more time(s) to force shutdown)
[Tue Sep 27 09:30:09.859619 2022] [core:trace4] [pid 6259] mpm_common.c(429): end of generation 0
[ N 2022-09-27 09:30:10.0068 6264/T1 age/Cor/CoreMain.cpp:1185 ]: Passenger core shutdown finished
[ N 2022-09-27 09:30:10.0867 11570/T1 age/Wat/WatchdogMain.cpp:1297 ]: Starting Passenger watchdog...
[ N 2022-09-27 09:30:10.1067 11574/T1 age/Cor/CoreMain.cpp:1200 ]: Starting Passenger core...
[ N 2022-09-27 09:30:10.1068 11574/T1 age/Cor/CoreMain.cpp:250 ]: Passenger core running in multi-application mode.
[ W 2022-09-27 09:30:10.1142 11574/T1 age/Cor/CoreMain.cpp:927 ]: WARNING: potential privilege escalation vulnerability detected. Phusion Passenger is running as root, and part(s) of the Passenger root path (/opt/passenger-5.3.4) can be changed by non-root user(s):
- /opt/passenger-5.3.4 is not secure: it can be modified by group root
Please either fix up the permissions for the insecure paths, or install Passenger in a different location that can only be modified by root.
[ N 2022-09-27 09:30:10.1142 11574/T1 age/Cor/CoreMain.cpp:935 ]: Passenger core online, PID 11574
[Tue Sep 27 09:30:10.115046 2022] [ssl:trace2] [pid 11556:tid 140281045076928] ssl_engine_rand.c(126): Init: Seeding PRNG with 656 bytes of entropy
[Tue Sep 27 09:30:10.115077 2022] [ssl:info] [pid 11556:tid 140281045076928] AH01887: Init: Initializing (virtual) servers for SSL
[Tue Sep 27 09:30:10.121210 2022] [ssl:info] [pid 11556:tid 140281045076928] AH01876: mod_ssl/2.4.29 compiled against Server: Apache/2.4.29, Library: OpenSSL/1.1.1
[ N 2022-09-27 09:30:10.1332 11574/T7 age/Cor/CoreMain.cpp:614 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2022-09-27 09:30:10.1332 11574/T1 age/Cor/CoreMain.cpp:1112 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2022-09-27 09:30:10.1333 11574/T9 Ser/Server.h:903 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1333 11574/T9 Ser/Server.h:559 ]: [ServerThr.2] Shutdown finished
[ N 2022-09-27 09:30:10.1333 11574/T7 Ser/Server.h:903 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1333 11574/T7 Ser/Server.h:559 ]: [ServerThr.1] Shutdown finished
[ N 2022-09-27 09:30:10.1334 11574/Tf Ser/Server.h:903 ]: [ApiServer] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1334 11574/Tf Ser/Server.h:559 ]: [ApiServer] Shutdown finished
[ N 2022-09-27 09:30:10.1334 11574/Tb Ser/Server.h:903 ]: [ServerThr.3] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1334 11574/Tb Ser/Server.h:559 ]: [ServerThr.3] Shutdown finished
[ N 2022-09-27 09:30:10.1334 11574/Td Ser/Server.h:903 ]: [ServerThr.4] Freed 0 spare client objects
[ N 2022-09-27 09:30:10.1335 11574/Td Ser/Server.h:559 ]: [ServerThr.4] Shutdown finished
[ N 2022-09-27 09:30:10.1640 11599/T1 age/Wat/WatchdogMain.cpp:1297 ]: Starting Passenger watchdog...
[ N 2022-09-27 09:30:10.1807 11602/T1 age/Cor/CoreMain.cpp:1200 ]: Starting Passenger core...
[ N 2022-09-27 09:30:10.1808 11602/T1 age/Cor/CoreMain.cpp:250 ]: Passenger core running in multi-application mode.
[ W 2022-09-27 09:30:10.1883 11602/T1 age/Cor/CoreMain.cpp:927 ]: WARNING: potential privilege escalation vulnerability detected. Phusion Passenger is running as root, and part(s) of the Passenger root path (/opt/passenger-5.3.4) can be changed by non-root user(s):
- /opt/passenger-5.3.4 is not secure: it can be modified by group root
Please either fix up the permissions for the insecure paths, or install Passenger in a different location that can only be modified by root.
[ N 2022-09-27 09:30:10.1883 11602/T1 age/Cor/CoreMain.cpp:935 ]: Passenger core online, PID 11602
[Tue Sep 27 09:30:10.189036 2022] [ssl:trace2] [pid 11597:tid 140281045076928] ssl_engine_rand.c(126): Init: Seeding PRNG with 656 bytes of entropy
[Tue Sep 27 09:30:10.189153 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(401): AH00821: shmcb_init allocated 512000 bytes of shared memory
[Tue Sep 27 09:30:10.189161 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(417): AH00822: for 511912 bytes (512000 including header), recommending 32 subcaches, 88 indexes each
[Tue Sep 27 09:30:10.189165 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(450): AH00824: shmcb_init_memory choices follow
[Tue Sep 27 09:30:10.189167 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(452): AH00825: subcache_num = 32
[Tue Sep 27 09:30:10.189170 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(454): AH00826: subcache_size = 15992
[Tue Sep 27 09:30:10.189173 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(456): AH00827: subcache_data_offset = 2128
[Tue Sep 27 09:30:10.189175 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(458): AH00828: subcache_data_size = 13864
[Tue Sep 27 09:30:10.189178 2022] [socache_shmcb:debug] [pid 11597:tid 140281045076928] mod_socache_shmcb.c(460): AH00829: index_num = 88
[Tue Sep 27 09:30:10.189256 2022] [socache_shmcb:info] [pid 11597:tid 140281045076928] AH00830: Shared memory socache initialised
[Tue Sep 27 09:30:10.189261 2022] [ssl:info] [pid 11597:tid 140281045076928] AH01887: Init: Initializing (virtual) servers for SSL
[Tue Sep 27 09:30:10.191097 2022] [ssl:info] [pid 11597:tid 140281045076928] AH01876: mod_ssl/2.4.29 compiled against Server: Apache/2.4.29, Library: OpenSSL/1.1.1
[Tue Sep 27 09:30:10.191123 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(454): AH010033: Watchdog: Running with WatchdogInterval 1000ms
[Tue Sep 27 09:30:10.191128 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(462): AH02974: Watchdog: found parent providers.
[Tue Sep 27 09:30:10.191132 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(508): AH02977: Watchdog: found child providers.
[Tue Sep 27 09:30:10.191135 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(516): AH02978: Watchdog: Looking for child (_singleton_).
[Tue Sep 27 09:30:10.191139 2022] [watchdog:debug] [pid 11597:tid 140281045076928] mod_watchdog.c(516): AH02978: Watchdog: Looking for child (_default_).
[Tue Sep 27 09:30:10.191655 2022] [core:trace4] [pid 11597:tid 140281045076928] mpm_common.c(533): mpm child 11623 (gen 0/slot 0) started
[Tue Sep 27 09:30:10.191949 2022] [core:trace4] [pid 11597:tid 140281045076928] mpm_common.c(533): mpm child 11624 (gen 0/slot 1) started
[Tue Sep 27 09:30:10.191968 2022] [mpm_event:notice] [pid 11597:tid 140281045076928] AH00489: Apache/2.4.29 (Ubuntu) Phusion_Passenger/5.3.4 OpenSSL/1.1.1 configured -- resuming normal operations
[Tue Sep 27 09:30:10.191973 2022] [mpm_event:info] [pid 11597:tid 140281045076928] AH00490: Server built: 2020-08-12T21:33:25
[Tue Sep 27 09:30:10.191982 2022] [core:notice] [pid 11597:tid 140281045076928] AH00094: Command line: '/usr/sbin/apache2'
[Tue Sep 27 09:30:10.191986 2022] [core:debug] [pid 11597:tid 140281045076928] log.c(1570): AH02639: Using SO_REUSEPORT: yes (1)
[Tue Sep 27 09:30:10.192288 2022] [watchdog:debug] [pid 11623:tid 140281045076928] mod_watchdog.c(565): AH02980: Watchdog: nothing configured?
[Tue Sep 27 09:30:10.192397 2022] [proxy:debug] [pid 11623:tid 140281045076928] proxy_util.c(1785): AH00925: initializing worker proxy:reverse shared
[Tue Sep 27 09:30:10.192412 2022] [proxy:debug] [pid 11623:tid 140281045076928] proxy_util.c(1842): AH00927: initializing worker proxy:reverse local
[Tue Sep 27 09:30:10.192442 2022] [proxy:debug] [pid 11623:tid 140281045076928] proxy_util.c(1877): AH00930: initialized pool in child 11623 for (*) min=0 max=25 smax=25
[Tue Sep 27 09:30:10.192550 2022] [mpm_event:debug] [pid 11623:tid 140280930666240] event.c(2218): AH02471: start_threads: Using epoll (wakeable)
[Tue Sep 27 09:30:10.193150 2022] [watchdog:debug] [pid 11624:tid 140281045076928] mod_watchdog.c(565): AH02980: Watchdog: nothing configured?
[Tue Sep 27 09:30:10.193477 2022] [proxy:debug] [pid 11624:tid 140281045076928] proxy_util.c(1785): AH00925: initializing worker proxy:reverse shared
[Tue Sep 27 09:30:10.193491 2022] [proxy:debug] [pid 11624:tid 140281045076928] proxy_util.c(1842): AH00927: initializing worker proxy:reverse local
[Tue Sep 27 09:30:10.193512 2022] [proxy:debug] [pid 11624:tid 140281045076928] proxy_util.c(1877): AH00930: initialized pool in child 11624 for (*) min=0 max=25 smax=25
[Tue Sep 27 09:30:10.193616 2022] [mpm_event:debug] [pid 11624:tid 140280930666240] event.c(2218): AH02471: start_threads: Using epoll (wakeable)
[ N 2022-09-27 09:30:10.1964 11574/T1 age/Cor/CoreMain.cpp:1185 ]: Passenger core shutdown finished
[ E 2022-09-27 09:30:12.5618 11602/T5 age/Cor/SecurityUpdateChecker.h:505 ]: Security update check failed: SSL connect error while connecting to https://securitycheck.phusionpassenger.com/v1/check.json (if this error persists check your connection security or try upgrading Passenger) (next check in 24 hours)
Any thoughts would be greatly appreciated.
I managed to figure out the problem, when deploying my coding changes I backed up the original file in the same directory just appending a date to it, for example my personnel_controller.rb was renamed to personnel_controller_20220926.rb and the modified personnel_controller.rb from dev was moved over. For whatever reason Rails (or maybe Apache) was still interrupting the old file rather then the new one. Once I moved the old file to a new location outside of the applicaitons directory and restarted Apache all worked fine. I am still new to Ruby on Rails in general so if anyone has an explanation as to why this is I would be curious to know.

Apache unable to start Passenger

I have been trying to setup a Rails application in RHEL 7 using Apache (v 2.4.6), Phusion Passenger (v 5.3.5).
Everything works fine without SSL configuration.
But if I set up virtualhost for 443 port, I get the following error after restarting (service httpd restart) the Apache service.
[Wed Nov 07 18:20:50.215257 2018] [mpm_prefork:notice] [pid 31701] AH00170: caught SIGWINCH, shutting down gracefully
[ N 2018-11-07 18:20:51.2344 31732/T7 age/Cor/CoreMain.cpp:641 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2018-11-07 18:20:51.2344 31732/T1 age/Cor/CoreMain.cpp:1216 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2018-11-07 18:20:51.2345 31732/T1 age/Cor/CoreMain.cpp:1117 ]: Checking whether to disconnect long-running connections for process 3793, application /opt/apps/my_rails_app (production)
[ N 2018-11-07 18:20:51.2347 31732/T9 Ser/Server.h:903 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2018-11-07 18:20:51.2347 31732/T9 Ser/Server.h:559 ]: [ServerThr.2] Shutdown finished
[ N 2018-11-07 18:20:51.2348 31732/T7 Ser/Server.h:903 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2018-11-07 18:20:51.2348 31732/T7 Ser/Server.h:559 ]: [ServerThr.1] Shutdown finished
[ N 2018-11-07 18:20:51.2349 31732/Tc Ser/Server.h:903 ]: [ApiServer] Freed 0 spare client objects
[ N 2018-11-07 18:20:51.2349 31732/Tc Ser/Server.h:559 ]: [ApiServer] Shutdown finished
[ N 2018-11-07 18:20:51.2349 31732/T1 age/Cor/CoreMain.cpp:1117 ]: Checking whether to disconnect long-running connections for process 3793, application /opt/apps/my_rails_app (production)
[ N 2018-11-07 18:20:51.4769 31732/T1 age/Cor/CoreMain.cpp:1295 ]: Passenger core shutdown finished
[ N 2018-11-07 18:20:51.5469 4216/T1 age/Wat/WatchdogMain.cpp:1300 ]: Starting Passenger watchdog...
[ N 2018-11-07 18:20:51.5688 4219/T1 age/Cor/CoreMain.cpp:1310 ]: Starting Passenger core...
[ N 2018-11-07 18:20:51.5689 4219/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2018-11-07 18:20:51.5754 4219/T1 age/Cor/CoreMain.cpp:985 ]: Passenger core online, PID 4219
[Wed Nov 07 18:20:51.576671 2018] [suexec:notice] [pid 4214] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[ N 2018-11-07 18:20:51.5800 4219/T7 age/Cor/CoreMain.cpp:641 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2018-11-07 18:20:51.5800 4219/T1 age/Cor/CoreMain.cpp:1216 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2018-11-07 18:20:51.5801 4219/T7 Ser/Server.h:903 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2018-11-07 18:20:51.5801 4219/T7 Ser/Server.h:559 ]: [ServerThr.1] Shutdown finished
[ N 2018-11-07 18:20:51.5802 4219/Tb Ser/Server.h:903 ]: [ApiServer] Freed 0 spare client objects
[ N 2018-11-07 18:20:51.5802 4219/Tb Ser/Server.h:559 ]: [ApiServer] Shutdown finished
[ N 2018-11-07 18:20:51.5802 4219/Ta Ser/Server.h:903 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2018-11-07 18:20:51.5802 4219/Ta Ser/Server.h:559 ]: [ServerThr.2] Shutdown finished
[Wed Nov 07 18:20:51.598254 2018] [auth_digest:notice] [pid 4214] AH01757: generating secret for digest authentication ...
[ N 2018-11-07 18:20:51.6198 4237/T1 age/Wat/WatchdogMain.cpp:1300 ]: Starting Passenger watchdog...
[ N 2018-11-07 18:20:51.6221 4219/T1 age/Cor/CoreMain.cpp:1295 ]: Passenger core shutdown finished
[ N 2018-11-07 18:20:51.6448 4240/T1 age/Cor/CoreMain.cpp:1310 ]: Starting Passenger core...
[ N 2018-11-07 18:20:51.6449 4240/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2018-11-07 18:20:51.6517 4240/T1 age/Cor/CoreMain.cpp:985 ]: Passenger core online, PID 4240
[Wed Nov 07 18:20:51.653813 2018] [lbmethod_heartbeat:notice] [pid 4214] AH02282: No slotmem from mod_heartmonitor
[Wed Nov 07 18:20:51.658584 2018] [mpm_prefork:notice] [pid 4214] AH00163: Apache/2.4.6 (Red Hat Enterprise Linux) Phusion_Passenger/5.3.5 OpenSSL/1.0.2k-fips configured -- resuming normal operations
[Wed Nov 07 18:20:51.658612 2018] [core:notice] [pid 4214] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[ N 2018-11-07 18:20:54.1476 4240/T5 age/Cor/SecurityUpdateChecker.h:517 ]: Security update check: no update found (next check in 24 hours)
I did not find any particular error message from the logs as above.
Looking forward to your help.
Thanks
EDIT 1
On the web page, I get Forbidden You don't have permission to access / on this server.
ssl_error_log shows the following error:
[Wed Nov 07 19:02:46.529549 2018] [autoindex:error] [pid 14038] [client 138.35.142.252:35811] AH01276: Cannot serve directory /opt/apps/my_rails_app/public/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive
SSL conf file (ssl.conf) looks as below:
<Directory "/opt/apps/my_rails_app/public">
Options ExecCGI FollowSymLinks
Require all granted
Order allow,deny
Allow from all
</Directory>
PassengerAppEnv production
PassengerAppRoot "/opt/apps/my_rails_app/public"
PassengerHighPerformance on

Passenger v5.2.0 inside Alpine v3.7 Docker container - SIGSEGV(11)

I have been working on creating a minimal Rails GraphQL docker container based on Alpine 3.7 running Passenger 5.2.0. Unfortunately, Passenger keeps crashing and I am unsure what the cause is.
This is the head of the Passenger log file
[ N 2018-02-06 16:40:25.3740 14/T1 age/Wat/WatchdogMain.cpp:1252 ]: Starting Passenger watchdog...
[ N 2018-02-06 16:40:25.4056 17/T1 age/Cor/CoreMain.cpp:1242 ]: Starting Passenger core...
[ N 2018-02-06 16:40:25.4059 17/T1 age/Cor/CoreMain.cpp:252 ]: Passenger core running in multi-application mode.
[ N 2018-02-06 16:40:25.4244 17/T1 age/Cor/CoreMain.cpp:977 ]: Passenger core online, PID 17
App 55 stdout:
[ pid=17, timestamp=1517935227 ] Process aborted! signo=SIGSEGV(11), reason=SI_KERNEL, si_addr=0x0, randomSeed=1517935225
And this is the end of the Passenger log file
[ W 2018-02-06 16:27:28.8642 14/T4 age/Wat/AgentWatcher.cpp:97 ]: Passenger core (pid=17) crashed with signal SIGSEGV, restarting it...
2018/02/06 16:27:28 [error] 38#0: *4 upstream prematurely closed connection while reading response header from upstream, client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", upstream: "passenger:unix:/app/current/tmp/passenger.pnTbJGQ/agents.s/core:", host: "0.0.0.0"
[ N 2018-02-06 16:27:28.8808 86/T1 age/Cor/CoreMain.cpp:1242 ]: Starting Passenger core...
[ N 2018-02-06 16:27:28.8812 86/T1 age/Cor/CoreMain.cpp:252 ]: Passenger core running in multi-application mode.
[ N 2018-02-06 16:27:28.9032 86/T1 age/Cor/CoreMain.cpp:977 ]: Passenger core online, PID 86
Lastly, here are the relevant files (including the Passenger log with backtrace, Dockerfile, etc)
https://gist.github.com/nater540/c22414d21bf22a990a474c93936b7c06
If anyone has any suggestions or insight that would be absolutely fantastic!

My ROR+Nginx+Passenger+AWS is sending 502 bad gateway

I am developing android service with ROR+Nginx+passenger and Amazon Web service.
The server goes well, but yesterday the server suddenly got downed.
I've tried to solve the problem, but I couldn't.
Here's my problem.
First, the EC2 instance's log/production.log doesn't write any log.
I can get 502 bad gateway error message in my android app log.
Second, all requests including http, https are responded by 502 badgateway.
Third, my AWS load balancer is logging 50X error.
I guess this problem is about ELB, but I don't know how to solve.
I have ssl certificate, and I have only one EC2 instance.
Any help will be appreciated.
Edited
2017-02-22 00:22:30.9139 25313/7f222067b700 age/Cor/Con/CheckoutSession.cpp:269 ]: [Client 1-356202] Returning HTTP 503 due to: Request queue full (configured max. size: 100)
[ 2017-02-22 00:24:00.3704 25313/7f221ee09700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /home/ec2-user/popcake: An error occurred while starting up the preloader: it did not write a startup response in time.
Error ID: 10045ede
Error details saved to: /tmp/passenger-error-JS1Bnt.html
Message from application: An error occurred while starting up the
preloader: it did not write a startup response in time. Please read this article for more information about this problem.<br>
<h2>Raw process output:</h2>
(empty)
[ 2017-02-22 00:24:00.4527 25313/7f222067b700 age/Cor/Con/CheckoutSession.cpp:285 ]: [Client 1-353433] Cannot checkout session because a spawning error occurred. The identifier of the error is 10045ede. Please see earlier logs for details about the error.
[ 2017-02-22 00:30:29.0872 25313/7f222067b700 age/Cor/CoreMain.cpp:532 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2017-02-22 00:30:29.1173 25313/7f2227bfc840 age/Cor/CoreMain.cpp:901 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2017-02-22 00:30:29.1174 25313/7f221fe7a700 Ser/Server.h:817 ]: [ApiServer] Freed 0 spare client objects
[ 2017-02-22 00:30:29.1174 25313/7f221fe7a700 Ser/Server.h:464 ]: [ApiServer] Shutdown finished
[ 2017-02-22 00:30:29.2400 25318/7f77237e2700 age/Ust/UstRouterMain.cpp:422 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ 2017-02-22 00:30:29.2741 25318/7f772a775840 age/Ust/UstRouterMain.cpp:492 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ 2017-02-22 00:30:29.3043 25318/7f77237e2700 Ser/Server.h:464 ]: [UstRouter] Shutdown finished
[ 2017-02-22 00:30:29.3042 25318/7f7722fe1700 Ser/Server.h:817 ]: [UstRouterApiServer] Freed 0 spare client objects
[ 2017-02-22 00:30:29.3048 25318/7f7722fe1700 Ser/Server.h:464 ]: [UstRouterApiServer] Shutdown finished
[ 2017-02-22 00:30:29.3720 25318/7f772a775840 age/Ust/UstRouterMain.cpp:523 ]: Passenger UstRouter shutdown finished
[ 2017-02-22 00:30:29.4023 25313/7f222067b700 age/Cor/CoreMain.cpp:532 ]: Signal received. Gracefully shutting down... (send signal 1 more time(s) to force shutdown)
If you see the log that you have added it says "Request queue full", basically you have some api's which are long running, because of which 50x is being thrown after the queue was full.
Restarting nginx might fix the issue for now but you need to look at the response times of your apis and see which are slow performing and fix them otherwise it will be a recurring issue and you will have to restart nginx everyday.

(Passenger Agent) Signal received. Gracefully shutting down

I have a rails application that I am deploying on an aws ec2 instance, this is my first time using the Rubber Gem, for which I have followed this tutorial.
After removing the default nginx configurations and after intial deployment (step 5 of the tutorial I have mentioned) when ever I try and access my app using the public IP or DNS I get a 403 Forbidden nginx screen.
On inspecting the error log of nginx on the server this is what I found. I have been stuck on this issue for quite sometime now, any help would be greatly appreciated. Thanks.
tail -f /var/log/nginx/error.log
[ 2015-07-10 05:49:13.7236 13522/7fc24be3a780 age/Wat/Main.cpp:1264 ]: Starting PassengerAgent watchdog...
[ 2015-07-10 05:49:13.7526 13525/7f2f7f588780 age/Hel/Main.cpp:944 ]: Starting PassengerAgent server...
[ 2015-07-10 05:49:13.7529 13525/7f2f7f588780 age/Hel/Main.cpp:237 ]: PassengerAgent server running in multi-application mode.
[ 2015-07-10 05:49:13.7550 13525/7f2f7f588780 age/Hel/Main.cpp:698 ]: PassengerAgent server online, PID 13525
[ 2015-07-10 05:49:13.7851 13530/7f39b592e780 age/Log/Main.cpp:442 ]: Starting PassengerAgent logger...
[ 2015-07-10 05:49:13.7863 13530/7f39b592e780 age/Log/Main.cpp:323 ]: PassengerAgent logger online, PID 13530
[ 2015-07-10 05:49:13.7876 13525/7f2f7f588780 age/Hel/Main.cpp:857 ]: Watchdog seems to be killed; forcing shutdown of all subprocesses
[ 2015-07-10 05:49:13.7877 13525/7f2f79042700 age/Hel/Main.cpp:508 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
2015/07/10 05:49:13 [alert] 9729#0: Required key 'core_address' is missing (-1: Unknown error)
Passenger author here. This error occurs when the Passenger module compiled inside Nginx, does not match the actual Passenger version that is installed. In other words, your installation is broken.
I recommend that you start over completely, on a new and empty server, using the Passenger official walkthrough documentation.

Resources