I feel sure that someone, somewhere changed something on the server but I cannot identify what occurred. Keep in mind the service was working perfectly prior to the beginning of this week. (NOTE: this is specific to one server as this same service is running just fine on 4 other servers.)
I have the following service to run a PHP script
start on filesystem and net-device-up IFACE=eth0 respawn #exec echo OARSUDP ran at `date` >> /var/log/oarsudp.log script sudo -u root /usr/bin/php -f /home/src/www-server/services/job_info_parser.php end script
If I attempt to start it I get a message -
sudo service oarsudp start oarsudp start/running, process 2604
If I immediately check the status I get -
sudo service oarsudp status oarsudp stop/waiting
Things I tried...
I add the
exec line to send a comment to the log. It only works when the
script tags and its contents are commented out.
I ran the PHP line inside the script tag from the command line and it works perfectly, throwing no errors.
I have confirmed the permissions are correct inside of
/etc/init/ (user root, group root, permissions 644).
I have tried changing the name of the service, just because I read a post about some conflicting names and I was grasping at straws.
It appears that the service attempts to respawn, sending out the log message in the
exec several times before the service dies.
I just located Upstart's logs and they state -
"Could not open input file: /home/src/www-server/services/job_info_parser.php".
I have tried changing permissions, group and owner but nothing worked.
Has anyone ever seen a service script stop working like this? If so, what was the cause and how can I fix it? Or am I being a total idiot, having introduced a problem within the script or service myself?