Closed jpSimkins closed 8 years ago
More investigation shows that forever is not mapping to the correct file location.
# sudo forever list
info: Forever processes running
data: uid command script forever pid id logfile uptime
data: [0] portal /usr/bin/node main.js 10345 10452 /var/log/portal.log STOPPED
When I run:
# /usr/bin/node main.js
Error: `/APP_PATH/public_html/build/bundle/programs/server/node_modules/fibers/bin/linux-x64-v8-4.5/fibers.node` is missing. Try reinstalling `node-fibers`?
at Object.<anonymous> (/APP_PATH/public_html/build/bundle/programs/server/node_modules/fibers/fibers.js:16:8)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/APP_PATH/public_html/build/bundle/programs/server/boot.js:1:75)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
error: Forever detected script exited with code: 1
error: Script restart attempt #44
/APP_PATH/public_html/build/bundle/programs/server/node_modules/fibers/fibers.js:16
throw new Error('`'+ modPath+ '.node` is missing. Try reinstalling `node-fibers`?');
I am seeing the exact error I have in my log. I also noticed that the node being loaded is not the correct one. So this issue is not really a problem with forever-service
but more an issue with using nvm
I have manually setup a project and when I invoke it, it runs as expected.
I then, installed
forever
andforever-service
globally.I setup my project by
cd
into the directory (where the main.js file is located) and ranSo far everything is great. I killed my project manually to test this service.
I ran:
service portal start
and got:Starting portal
as expected but the app is not running.I check the log and I see a lot of the same errors:
APP_PATH is the correct path, just removed for posting this.
Why am I getting this error when using
forever-service
but not when I manually invoke my app?So I assumed it was missing the
PATH
and added that to the/etc/init.d/portal
file.I added
Same issue as above. Same error.
I also noted that when I stopped the service, it stated it stopped but when I started it, it was already running.. That may be due to it not running properly so I am ignoring that at this time.
So I deleted the
forever-service
I just created:sudo forever-service delete portal
I then manually started my app to make sure it wasn't an issue with my code and no issues.
So I wanted to make sure I was doing this correctly... I tried again.
This time, I ran
sudo forever-service install portal --script main.js
and got the output below.I then edited the
/etc/init.d/portal
file and addedbelow
And the exact same issue... I am getting numerous log entries of:
So at this point, I must assume it's something wrong with
forever-service
.I hope this helps isolate any issue that may be happening. Or perhaps I missed a step...
The server is running:
These are requirements since we are using meteor.
Thanks