passenger fails to start when restarting web server - passenger

I am seeing a weird passenger error when restarting httpd in /var/log/httpd/error_log:
[ N 2019-01-14 13:34:38.1896 30817/T1 age/Wat/WatchdogMain.cpp:1366 ]: Starting Passenger watchdog...
[ N 2019-01-14 13:34:38.2390 30820/T1 age/Cor/CoreMain.cpp:1339 ]: Starting Passenger core...
[ N 2019-01-14 13:34:38.2393 30820/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2019-01-14 13:34:38.2991 30820/T1 age/Cor/CoreMain.cpp:1014 ]: Passenger core online, PID 30820
[Mon Jan 14 13:34:38.306645 2019] [mpm_prefork:notice] [pid 30775] AH00163: Apache/2.4.6 (CentOS) Phusion_Passenger/6.0.0 configured -- resuming normal operations
[Mon Jan 14 13:34:38.306705 2019] [core:notice] [pid 30775] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[ N 2019-01-14 13:34:38.7734 30780/T1 age/Cor/TelemetryCollector.h:531 ]: Message from Phusion: End time can not be before or equal to begin time
[ N 2019-01-14 13:34:38.8869 30780/T1 age/Cor/CoreMain.cpp:1324 ]: Passenger core shutdown finished
The second to last line appears to be what's giving me an issue.
My best guess is that this was caused by reverting my VM to a snapshot, but I can't find any way to get passenger to run.

Old question but this is the only place I've seen the same mistake I got, In my case the problem was that I turned on a force_ssl config in my rails app when I was accepting requests on port 80. So, if you have a rails app and have this message the solution might be to comment next line on production.rb
config.force_ssl = true

Related

xampp apache is not starting after php update from 7.2 to 7.4

I tried to update PHP7.2 to PHP7.4 for my XAMPP Apache on Windows 10. Now Apache is not starting.
The log error is:
[Fri Jul 23 10:47:04.645093 2021] [mpm_winnt:notice] [pid 15604:tid 764] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Fri Jul 23 10:47:07.981978 2021] [mpm_winnt:notice] [pid 5588:tid 704] AH00364: Child: All worker threads have exited.
[Fri Jul 23 10:47:10.535573 2021] [mpm_winnt:notice] [pid 15604:tid 764] AH00430: Parent: Child process 5588 exited successfully.
The error message from apache is:
10:47:39 AM [Apache] Error: Apache shutdown unexpectedly.
10:47:39 AM [Apache] This may be due to a blocked port, missing dependencies,
10:47:39 AM [Apache] improper privileges, a crash, or a shutdown by another method.
10:47:39 AM [Apache] Press the Logs button to view error logs and check
10:47:39 AM [Apache] the Windows Event Viewer for more clues
10:47:39 AM [Apache] If you need more help, copy and post this
10:47:39 AM [Apache] entire log window on the forums
I followed this tutorial:
https://medium.com/oceanize-geeks/how-to-upgrade-lower-version-to-latest-php-version-in-xampp-on-windows-f7be9a70bbb0
PHP configuration
# # PHP-Module setup
#
LoadFile "C:/xampp/php/php7ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"
<IfModule php7_module>
PHPINIDir "C:/xampp/php"
</IfModule>

Passenger on EasyApache 4/CentOS/cPanel will not start Rails app

On a new server, CentOS/EasyApache 4, I created a single account and set up a new Rails 6.0.2 app. I first installed Passenger 6.0.4 using the EasyApache interface and was unable to start the Rails app.
Web application could not be started by the Phusion Passenger application server
But there was no error mentioned in the Apache error log. (And nothing in the Rails log since it didn't start.) I increased the log level but still nothing I could identify. Certainly no error that matches the error ID shown on the page.
I removed that version of Passenger and instead installed it as a gem -- I first tried installing as my app user but got "not secure" permissions errors on the application directories -- so I installed RVM and Passenger as root user.
Each time, no matter how I install, I still get the same error screen but no error in the logs. Passenger seems to be running, it seems to be playing nice with Apache. I can launch the Rails app in console in production, and I can make database calls.
Not sure where to go to look for details. Below is the Apache error log, starting with the last time I rebooted Apache. Not sure if Passenger is starting up, shutting down and starting again? I've never had to look before, so I don't know if this is normal. But in the end, it looks to be running. And there is no error registered after this, even though I've hit the site several times and gotten error screens. Thanks for any help.
[Fri May 01 14:07:43.442039 2020] [mpm_prefork:notice] [pid 12050] AH00169: caught SIGTERM, shutting down
[ N 2020-05-01 14:07:43.4543 12056/T8 age/Cor/CoreMain.cpp:671 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2020-05-01 14:07:43.4543 12056/T1 age/Cor/CoreMain.cpp:1246 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2020-05-01 14:07:43.4544 12056/T8 Ser/Server.h:902 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2020-05-01 14:07:43.4545 12056/T8 Ser/Server.h:558 ]: [ServerThr.1] Shutdown finished
[ N 2020-05-01 14:07:43.4546 12056/Tc Ser/Server.h:902 ]: [ApiServer] Freed 0 spare client objects
[ N 2020-05-01 14:07:43.4546 12056/Tc Ser/Server.h:558 ]: [ApiServer] Shutdown finished
[ N 2020-05-01 14:07:43.4547 12056/T9 Ser/Server.h:902 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2020-05-01 14:07:43.4547 12056/T9 Ser/Server.h:558 ]: [ServerThr.2] Shutdown finished
[ N 2020-05-01 14:07:43.9554 12056/T1 age/Cor/CoreMain.cpp:1325 ]: Passenger core shutdown finished
[ N 2020-05-01 14:07:44.0784 18605/T1 age/Wat/WatchdogMain.cpp:1373 ]: Starting Passenger watchdog...
[ N 2020-05-01 14:07:44.0950 18608/T1 age/Cor/CoreMain.cpp:1340 ]: Starting Passenger core...
[ N 2020-05-01 14:07:44.0951 18608/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2020-05-01 14:07:44.1015 18608/T1 age/Cor/CoreMain.cpp:1015 ]: Passenger core online, PID 18608
[Fri May 01 14:07:44.102969 2020] [:notice] [pid 18603] ModSecurity for Apache/2.9.3 (http://www.modsecurity.org/) configured.
[Fri May 01 14:07:44.103122 2020] [:notice] [pid 18603] ModSecurity: APR compiled version="1.7.0"; loaded version="1.7.0"
[Fri May 01 14:07:44.103127 2020] [:notice] [pid 18603] ModSecurity: PCRE compiled version="8.32 "; loaded version="8.32 2012-11-30"
[Fri May 01 14:07:44.103129 2020] [:notice] [pid 18603] ModSecurity: LUA compiled version="Lua 5.1"
[Fri May 01 14:07:44.103131 2020] [:notice] [pid 18603] ModSecurity: YAJL compiled version="2.0.4"
[Fri May 01 14:07:44.103133 2020] [:notice] [pid 18603] ModSecurity: LIBXML compiled version="2.9.7"
[Fri May 01 14:07:44.103141 2020] [:notice] [pid 18603] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[ N 2020-05-01 14:07:44.1052 18608/T8 age/Cor/CoreMain.cpp:671 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2020-05-01 14:07:44.1052 18608/T1 age/Cor/CoreMain.cpp:1246 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2020-05-01 14:07:44.1053 18608/Tb Ser/Server.h:902 ]: [ServerThr.2] Freed 0 spare client objects
[ N 2020-05-01 14:07:44.1053 18608/Tb Ser/Server.h:558 ]: [ServerThr.2] Shutdown finished
[ N 2020-05-01 14:07:44.1053 18608/T8 Ser/Server.h:902 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2020-05-01 14:07:44.1053 18608/T8 Ser/Server.h:558 ]: [ServerThr.1] Shutdown finished
[ N 2020-05-01 14:07:44.1054 18608/Tc Ser/Server.h:902 ]: [ApiServer] Freed 0 spare client objects
[ N 2020-05-01 14:07:44.1054 18608/Tc Ser/Server.h:558 ]: [ApiServer] Shutdown finished
[Fri May 01 14:07:44.130060 2020] [:notice] [pid 18628] mod_ruid2/0.9.8 enabled
[ N 2020-05-01 14:07:44.1508 18631/T1 age/Wat/WatchdogMain.cpp:1373 ]: Starting Passenger watchdog...
[ N 2020-05-01 14:07:44.1733 18634/T1 age/Cor/CoreMain.cpp:1340 ]: Starting Passenger core...
[ N 2020-05-01 14:07:44.1735 18634/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2020-05-01 14:07:44.1800 18634/T1 age/Cor/CoreMain.cpp:1015 ]: Passenger core online, PID 18634
[Fri May 01 14:07:44.184432 2020] [mpm_prefork:notice] [pid 18628] AH00163: Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4 Phusion_Passenger/6.0.4 configured -- resuming normal operations
[Fri May 01 14:07:44.184457 2020] [core:notice] [pid 18628] AH00094: Command line: '/usr/sbin/httpd'
[ N 2020-05-01 14:07:44.6441 18608/T1 age/Cor/TelemetryCollector.h:531 ]: Message from Phusion: End time can not be before or equal to begin time
[ N 2020-05-01 14:07:44.6750 18608/T1 age/Cor/CoreMain.cpp:1325 ]: Passenger core shutdown finished
[ N 2020-05-01 14:07:46.7458 18634/T4 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)

docker installation of openproject: Phusion passenger fails to start after installation

I am trying to install openproject using docker on centos7.6 but Phusion passenger fails to start after installation. Error is suggesting it failed to parse response.
The preloader process sent an unparseable response:. I don't know how to fix this issue.
stdout:
-----> Database setup finished.
On first installation, the default admin credentials are login: admin, password: admin
-----> Launching supervisord...
2019-05-08 08:14:46,313 CRIT Supervisor running as root (no user in config file)
2019-05-08 08:14:46,318 INFO supervisord started with pid 1
2019-05-08 08:14:47,321 INFO spawned: 'postgres' with pid 155
2019-05-08 08:14:47,325 INFO spawned: 'apache2' with pid 156
2019-05-08 08:14:47,328 INFO spawned: 'web' with pid 157
2019-05-08 08:14:47,331 INFO spawned: 'worker' with pid 158
2019-05-08 08:14:47,351 INFO spawned: 'postfix' with pid 159
2019-05-08 08:14:47,360 INFO spawned: 'memcached' with pid 160
2019-05-08 08:14:47.634 UTC [172] LOG: database system was shut down at 2019-05-08 08:14:44 UTC
2019-05-08 08:14:47,634 INFO success: postfix entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2019-05-08 08:14:47.649 UTC [172] LOG: MultiXact member wraparound protections are now enabled
2019-05-08 08:14:47.653 UTC [155] LOG: database system is ready to accept connections
2019-05-08 08:14:47.663 UTC [177] LOG: autovacuum launcher started
2019-05-08 08:14:48,670 INFO success: postgres entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-08 08:14:48,670 INFO success: apache2 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-08 08:14:48,670 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-08 08:14:48,670 INFO success: worker entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2019-05-08 08:14:48,670 INFO success: memcached entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
2019-05-08 08:14:50,198 INFO exited: postfix (exit status 0; expected)
--> Downloading a Phusion Passenger agent binary for your platform
--> Installing Nginx 1.15.8 engine
--------------------------
[passenger_native_support.so] trying to compile for the current user (app) and Ruby interpreter...
(set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
Compilation successful. The logs are here:
/tmp/passenger_native_support-15tsfhk.log
[passenger_native_support.so] successfully loaded.
=============== Phusion Passenger Standalone web server started ===============
PID file: /app/tmp/pids/passenger.8080.pid
Log file: /app/log/passenger.8080.log
Environment: production
Accessible via: http://0.0.0.0:8080/
You can stop Phusion Passenger Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
[ N 2019-05-08 08:15:01.7338 404/Tb age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
Forcefully loading the application. Use :environment to avoid eager loading.
[auth_saml] Missing settings from '/app/config/plugins/auth_saml/settings.yml', skipping omniauth registration.
hook registered
App 439 output: [auth_saml] Missing settings from '/app/config/plugins/auth_saml/settings.yml', skipping omniauth registration.
App 439 output: hook registered
Creating scope :order_by_name. Overwriting existing method Sprint.order_by_name.
App 439 output: Creating scope :order_by_name. Overwriting existing method Sprint.order_by_name.
[Worker(host:d0b3748f627a pid:158)] Starting job worker
2019-05-08T08:15:45+0000: [Worker(host:d0b3748f627a pid:158)] Starting job worker
App 439 output: /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:108:in `fork': Cannot allocate memory - fork(2) (Errno::ENOMEM)
App 439 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:108:in `handle_spawn_command'
App 439 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:78:in `accept_and_process_next_client'
App 439 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:167:in `run_main_loop'
App 439 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/helper-scripts/rack-preloader.rb:207:in `<module:App>'
App 439 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
App 439 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/helper-scripts/rack-preloader.rb:29:in `<main>'
[ E 2019-05-08 08:15:46.6971 404/Tc age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /app: The preloader process sent an unparseable response:
Error ID: d7825364
Error details saved to: /tmp/passenger-error-wjSTKF.html
[ E 2019-05-08 08:15:46.7028 404/T8 age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is d7825364. Please see earlier logs for details about the error.
[ W 2019-05-08 08:34:24.7967 404/Tk age/Cor/Spa/SmartSpawner.h:572 ]: An error occurred while spawning an application process: Cannot connect to Unix socket '/tmp/passenger.PKROzbY/apps.s/preloader.hyl9g8': No such file or directory (errno=2)
[ W 2019-05-08 08:34:24.7968 404/Tk age/Cor/Spa/SmartSpawner.h:574 ]: The application preloader seems to have crashed, restarting it and trying again...
App 543 output: [auth_saml] Missing settings from '/app/config/plugins/auth_saml/settings.yml', skipping omniauth registration.
App 543 output: hook registered
App 543 output: Creating scope :order_by_name. Overwriting existing method Sprint.order_by_name.
App 543 output: /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:108:in `fork': Cannot allocate memory - fork(2) (Errno::ENOMEM)
App 543 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:108:in `handle_spawn_command'
App 543 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:78:in `accept_and_process_next_client'
App 543 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:167:in `run_main_loop'
App 543 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/helper-scripts/rack-preloader.rb:207:in `<module:App>'
App 543 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
App 543 output: from /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/helper-scripts/rack-preloader.rb:29:in `<main>'
[ E 2019-05-08 08:34:52.2521 404/Tk age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /app: The preloader process sent an unparseable response:
Error ID: c2ce0823
Error details saved to: /tmp/passenger-error-bpsfAC.html
[ E 2019-05-08 08:34:52.2570 404/T8 age/Cor/Con/CheckoutSession.cpp:276 ]: [Client 1-2] Cannot checkout session because a spawning error occurred. The identifier of the error is c2ce0823. Please see earlier logs for details about the error.
Thanks.
The import line in the log is this one:
App 439 output: /app/vendor/bundle/ruby/2.6.0/gems/passenger-6.0.1/src/ruby_supportlib/phusion_passenger/preloader_shared_helpers.rb:108:in `fork': Cannot allocate memory - fork(2) (Errno::ENOMEM)
This means your container is unable to allocate necessary memory. It could be that your system is in a OOM state and things are being killed or due to some other restriction on the daemon that prevents it from allocating additional memory
For reference:
https://success.docker.com/article/docker-daemon-error-cannot-allocate-memory

sudo apachectl -k start not work on MacOS HIGH SIERRA

I've run sudo apachectl -k start , but the httpd process wasn't created.
And when I've run apachectl configtest on terminal, it shows me Syntax OK.
Also I run other commands:
sudo apachectl -k restart => httpd not running, trying to start.
sudo apachectl -k stop => httpd (pid 1369?) not running
More info about apache error_log file: LogLevel debug
[Mon Nov 27 01:15:00.390588 2017] [unique_id:info] [pid 1572] AH01566: using ip addr 192.***.*.**
[Mon Nov 27 01:15:01.004998 2017] [ssl:info] [pid 1572] AH01887: Init: Initializing (virtual) servers for SSL
[Mon Nov 27 01:15:01.008629 2017] [ssl:info] [pid 1572] AH01876: mod_ssl/2.4.25 compiled against Server: Apache/2.4.25, Library: OpenSSL/1.0.2j
[Mon Nov 27 01:15:01.046466 2017] [unique_id:info] [pid 1574] AH01566: using ip addr 192.***.**.*
[Mon Nov 27 01:15:02.000248 2017] [ssl:warn] [pid 1574] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Nov 27 01:15:02.000473 2017] [ssl:info] [pid 1574] AH01887: Init: Initializing (virtual) servers for SSL
Maybe you have replaced the default ruby.
Open you terminal and enter:
sudo ln -s /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby /usr/bin/ruby
It works for me. Hope it helps.
I have same issue, looks like apachectl is somehow broken after High Sierra update. Right now the solution for me is to control Apache daemon directly by launchctl:
sudo launchctl kickstart -r system/org.apache.httpd
Well, I've just updated the apache using brew. Then I configured my apache again and now everything works well.

Apache crash on launch - W2008 Server

I installed Xampp on my Windows Server 2008. It worked fine, untill I decided to install some updates.
Now Apache doesn't start any more and I get these errors;
[Wed Aug 29 23:31:20.328125 2012] [core:warn] [pid 1540:tid 312] AH00098: pid file
C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Aug 29 23:31:20.968750 2012] [ssl:warn] [pid 1540:tid 312] AH01873: Init:Session Cache is not configured [hint: SSLSessionCache]
I'm trying to install Cacti on the server to monitor everything... Don't think it's relevant, but just saying
If you still need it:
http://httpd.apache.org/docs/2.4/upgrading.html#post_234
Apache 2.4 will not start with added SSL support on windows until additional module (compare to Apache 2.2 configuration) was enabled: socache_shmcb_module
This additional info is at the beginning of the httpd-ssl.conf, but it takes time to read it :)
# Required modules: mod_log_config, mod_setenvif, mod_ssl, socache_shmcb_module (for default value of SSLSessionCache)

Resources