最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Node.js Forever.js uptime stopped - Stack Overflow

programmeradmin2浏览0评论

I'm running a node script on my EC2 instance. I 'm using forever.js to run it because I'd like to run it even when I disconnect from my SSH connection.

I run:

forever start app.js

and then list running processes using:

forever list

and for uptime is says STOPPED no matter what I do.

ubuntu@ip-xx-xxx-xxx-xxx:~$ forever list
info:    Forever processes running
data:        uid  command             script          forever pid   id logfile                        uptime  
data:    [0] 79f1 /usr/local/bin/node app.js 17099   17100    /home/ubuntu/.forever/79f1.log STOPPED 

I'm running a node script on my EC2 instance. I 'm using forever.js to run it because I'd like to run it even when I disconnect from my SSH connection.

I run:

forever start app.js

and then list running processes using:

forever list

and for uptime is says STOPPED no matter what I do.

ubuntu@ip-xx-xxx-xxx-xxx:~$ forever list
info:    Forever processes running
data:        uid  command             script          forever pid   id logfile                        uptime  
data:    [0] 79f1 /usr/local/bin/node app.js 17099   17100    /home/ubuntu/.forever/79f1.log STOPPED 
Share Improve this question asked Aug 11, 2015 at 0:08 tim petersontim peterson 24.3k63 gold badges184 silver badges302 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 13

You could just run forever logs yourfile.js to see logs. If you need to be sure that you are seen the right logs.

I checked the log file mentioned (duh!) /home/ubuntu/.forever/79f1.log and that had the error.

Turns out, it was a simple path error in my app.js script. I was using a file which wasn't in the same directory from which I ran forever start app.js. So it actually had nothing to do with forever.js, but was a simple path error where node couldn't find a file. Thank goodness for log files!

发布评论

评论列表(0)

  1. 暂无评论