New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pm2 not working on ubuntu, error "no such file or directory" #455
Comments
Did you solved it ? |
No :( |
Can you try
?
|
We had same issue, and it seems to be solved after changing our deployment script. We have been deleting the whole directory before copying new version. Now we delete only the content of this directory; copy new version of app and run pm2 gracefulReload |
Can pm2 survive deleting then re-adding all file contents from a directory it is watching and then safely reload? Or would I need to do this everytime (the above didn't work for me):
|
Also having this issue. |
give us data to reproduce please. |
I've switched to On Sat, Jun 21, 2014 at 10:44 AM, soyuka notifications@github.com wrote:
|
Hi: I run into this error too with node.js 10.30. It may be the system is so busy and somehow things starts to fail. (no process can be spawned). myaccount@jmyhost:~/node_modules/pm2$ node -e "console.log(process.config)" node.js:815 |
Yes, this is exactly the issue. Thank you. |
same issue?
|
Have the same issue, rolling back to |
any updates? |
I have this issue as well. My script runs fine when using node directly. Running
Running the latest pm2
|
im having the same issue has anyone resolved this? |
Installing nodejs through apt-get causes this problem since the binary is renamed from node -> nodejs. |
I figures it out . My issue was the econsystem5.json needs to be in the project root folder |
For anyone still having this issue: it seems to be because apt-get installs the node binary as 'nodejs' and pm2 is looking for 'node'. Linking node to nodejs solved the issue for me.
|
What's your config file ? |
Correct you need to sym link nodejs to node Sent from my iPhone
|
Config file!? What config file? I just |
I'm not in front of my machine but there is a ecosystem5.js file you can set the cwd I had the same problem |
in ecosystem.json change |
So... what's the solution? Tried everything but still failing. Trying to deploy a Meteor app |
Anyone found the solution??? |
Hope this helps someone else. Try starting pm2 from a different directory. I was starting my script from my /home/ directory on the system. But navigating to the root directory of my project and THEN starting script seemed to fix the issue. |
I ran into this issue too. ** It finally worked after run ** |
Same issue:
|
|
@Unitech - thanks for the reply. I added the debug and on the instance where I get the error, the paths are different. Some additional context, I have 3 services managed by PM2, one of which fails to start ( {
"apps": [
{
"name": "crawler",
"cwd": "/home/ubuntu/crawler/",
"script": "./app.js",
"exec_interpreter": "node",
"merge_logs": true,
"node_args": "--max_old_space_size=3072",
"env": {
"NODE_ENV": "production"
}
},
{
"name": "build",
"cwd": "/home/ubuntu/crawler/",
"script": "./build.js",
"exec_interpreter": "node",
"merge_logs": true,
"node_args": "--max_old_space_size=1024",
"env": {
"NODE_ENV": "production"
}
},
{
"name": "word2vec", <-- errors
"cwd": "/home/ubuntu/w2v/",
"script": "./bin/app.js",
"exec_interpreter": "node",
"merge_logs": true,
"node_args": "--max_old_space_size=2048",
"env": {
"NODE_ENV": "production"
}
}
]
} My As per the error, the
Running the debug as you suggested from the
The code that loads the config file (nothing to do with PM2 config) is as follows:
Appreciate any thoughts or guidance. |
I guess that |
@Unitech - thanks for the suggestion. Yes, I tried that (along with many other options) however it still fails. I wont pollute this thread further but will report back here once I find the solution. |
For anyone else in a similar position, this was finally resolved (after many many hours!) by simply running:
|
I'm deploying my project using git and when I try to init, I get:
In the same dir, if I run
ls -la
I can see all project files. It works fine with forever or nodemon. What can be happening?The text was updated successfully, but these errors were encountered: