CentOS *** ERROR: Phusion Passenger doesn't seem to be running

前端 未结 2 574
挽巷
挽巷 2021-01-19 09:38

While i\'m deploying my rails application through capistrano to my CentOS server all the time i have been receiving this error:

*** ERROR: Phusion Pas

相关标签:
2条回答
  • 2021-01-19 10:20

    The problem seems to be systemd private temp feature, you can disable that for httpd:

    mkdir /etc/systemd/system/httpd.service.d
    echo "[Service]" >  /etc/systemd/system/httpd.service.d/nopt.conf
    echo "PrivateTmp=false" >> /etc/systemd/system/httpd.service.d/nopt.conf
    systemctl daemon-reload
    systemctl restart httpd
    

    Passenger 5.0 no longer use /tmp for status information so it should work out of box even on private temps.

    0 讨论(0)
  • 2021-01-19 10:21

    Finally i resolved my issue. I have done two things.

    Firstly i created new temp folder in my home directory. Then inside Apache config file i added

    PassengerInstanceRegistryDir /home/userr/instancetemp
    

    Then i pushed this to my env path with

    echo 'PASSENGER_INSTANCE_REGISTRY_DIR=/home/userr/instancetemp' >> ~/.bash_profile
    

    I think this is enough but i added also this path to my capistrano config

    set :default_env, { 
      "PASSENGER_INSTANCE_REGISTRY_DIR" => "/home/userr/instancetemp"
    }
    
    0 讨论(0)
提交回复
热议问题