Some of the recent upgrades broke my Rails webservers' startup. I don't know which one made it, either apache or rvm or passenger. My servers were working the same way, and the issue I want to solve is FreeBSD or system related even if it's connected to some upstream change.
The problem is that after rebooting any of the servers the Rails websites start displaying Internal server error. Running /usr/local/etc/rc.d/apache22 restart solves the problem every time. It goes wrong only after reboot.
The reason can be seen in the apache error log:
This is inside the wrapper script:
It seems to me that /usr/bin/env can not see bash when apache is starting from rc.d at bootup. It works fine after I restart apache as root. What is the difference between running the rc script manually and the bootup process? I know that cron, for example, has very limited environment, however, the same config has been working for Rails for years until some recent updates. (Now I have this problem on a fresh testing install too so I can't tell why.)
I never modify PATH values in root's profile files neither the /etc/login.* things. I want to fix this an elegant way and make it permanent fix which survives upgrades.
Thank you.
The problem is that after rebooting any of the servers the Rails websites start displaying Internal server error. Running /usr/local/etc/rc.d/apache22 restart solves the problem every time. It goes wrong only after reboot.
The reason can be seen in the apache error log:
Code:
env: bash: No such file or directory
This is inside the wrapper script:
Code:
#!/usr/bin/env bash
It seems to me that /usr/bin/env can not see bash when apache is starting from rc.d at bootup. It works fine after I restart apache as root. What is the difference between running the rc script manually and the bootup process? I know that cron, for example, has very limited environment, however, the same config has been working for Rails for years until some recent updates. (Now I have this problem on a fresh testing install too so I can't tell why.)
I never modify PATH values in root's profile files neither the /etc/login.* things. I want to fix this an elegant way and make it permanent fix which survives upgrades.
Thank you.