Closed alexbbb closed 9 years ago
The warning does not occur when I use node 0.10.36 with forever 0.14.1 and forever-service 0.4.4 on Raspbian wheezy, but the service fails to auto start on reboot. When I manually execute the command (as root):
service myservice start
everything works, but I wonder why it does not start automatically. Nothing gets shown in the log, even if I redicet the forever output to the service log file. Tried also with a crontab job:
@reboot /usr/local/bin/forever start -c /usr/local/bin/node path/to/my/app.js
but the service does not get started.
This my source code:
var express = require('express');
var app = express();
app.get('/', function(req, res){
res.send('hello world');
});
app.listen(3000);
Finally I've found where the problem was! After seeing dmesg log I've discovered that the init.d script was unable to find forever at boot on Raspbian. Probabily the PATH variable gets set or updated after that the script gets launched at boot, so to make it work I've simply added:
# Add node, npm and forever path
export PATH=/usr/local/bin:$PATH
before:
# Check if any of $pid (could be plural) are running
@alexbbb For specifying path for forever you can use -p or --foreverPath command line option with forever-service.
Are all your issues resolved? If not, I would recommend posting new issue for each unique issue.
@arvind-agarwal thank you The issue of service not starting at boot isn't solved on Raspbian by setting the forever absolute path using the command line option (-p or --foreverPath). If I don't explicitly export PATH like in my previous post, the service does not start. node.js is in the same path (/usr/local/bin) and probabily is not found by forever at boot, so it doesn't work. If I manually start the service, it works.
When using forever-service with node 0.12 and forever 0.14.1, the warning message I posted still gets shown, so on my RaspberryPi I've decided to use node 0.10.36 for the moment.
Made a separate issue for the automatic start of the service on boot: #21 . Leave this one for the warning message
@alexbbb Is the above warning, preventing you from using forever-service with node 0.12 on raspbian? I am unable to test it in raspbian currently.
@arvind-agarwal I'll do some tests on my Raspberry Model B using the latest Raspbian and node 0.12 as soon as I can and I'll report the results here
Finally I got some time and tested the latest version of forever-service with node.js 0.12.1 on my raspberry Pi 2. Apart the warning message, everything is working without errors.
Thanks for checking, I will close the issue for now in that case.
When I executed:
on my RaspberryPi Model B (512MB RAM) running on Raspbian with kernel 3.12.28+ #709 PREEMPT, node.js 0.12 installed from http://node-arm.herokuapp.com/node_latest_armhf.deb and forever 0.14.1 I got this error:
Tried it also on a Debian 7.8.0 32 bit on another box, but everything works fine and no errors are shown. On the raspberry the service does not automatically start on boot even if it's present in the rc.d levels, but it works if I start it manually. I'll try with other node.js versions also and I will report it here.