Reputation: 61
I have been trying to deploy my Rails app by using Phusion Passenger and Apache on CentOS 7. I am following the tutorial available on the Phusion Passenger website, but I am stuck.
When I start Apache, and I access the application by using a browser I get: 500 Internal Server Error. The following error was found in the error log file in /etc/httpd/logs/error_log:
[ 2017-03-15 22:57:15.5385 18290/7f4c6eb61880 apa/Hooks.cpp:690 ]: Unexpected error in mod_passenger: Cannot connect to Unix socket '/tmp/passenger.8zZ83f3/agents.s/core': Permission denied (errno=13)
Backtrace:
in 'int Passenger::connectToServer(const Passenger::StaticString&, const char*, unsigned int)' (IOUtils.cpp:459)
in 'Passenger::FileDescriptor Hooks::connectToCore()' (Hooks.cpp:273)
in 'int Hooks::handleRequest(request_rec*)' (Hooks.cpp:561)
So far I tried:
But none of these seem to work. I am using Phusion Passenger 5.1.2 and Apache 2.4.6.
Also, this is what I get by running
$ sudo /usr/bin/passenger-config validate-install
This is the output when I run
$ sudo /user/sbin/passenger-memory-status
Version: 5.1.2
Date : 2017-03-16 07:42:59 -0500
---------- Apache processes ----------
PID PPID VMSize Private Name
--------------------------------------
18237 1 227.0 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND
18286 18237 229.0 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND
18287 18237 229.0 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND
18288 18237 229.0 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND
18289 18237 229.0 MB 0.3 MB /usr/sbin/httpd -DFOREGROUND
18290 18237 229.0 MB 0.3 MB /usr/sbin/httpd -DFOREGROUND
18300 18237 229.0 MB 0.2 MB /usr/sbin/httpd -DFOREGROUND
### Processes: 7
### Total private dirty RSS: 1.73 MB
-------- Nginx processes --------
### Processes: 0
### Total private dirty RSS: 0.00 MB
----- Passenger processes -----
PID VMSize Private Name
-------------------------------
18264 417.0 MB 1.0 MB Passenger watchdog
18267 649.9 MB 3.2 MB Passenger core
18275 427.3 MB 3.0 MB Passenger ust-router
### Processes: 3
### Total private dirty RSS: 7.11 MB
Upvotes: 0
Views: 716
Reputation: 61
I solved the problem by running the following command:
$ sudo chcon -R -v -t httpd_sys_rw_content_t /tmp
I don't know if other things can be impacted by changing the permissions over the whole folder. Do you guys think this might be a problem?
As an alternative, I can also set PassengerInstanceRegistryDir to a different location, and run the above mentioned command once again.
Upvotes: 1