{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/PM2/issues/1547","labels_url":"https://api.github.com/repos/Unitech/PM2/issues/1547/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/PM2/issues/1547/comments","events_url":"https://api.github.com/repos/Unitech/PM2/issues/1547/events","html_url":"https://github.com/Unitech/PM2/issues/1547","id":102514166,"number":1547,"title":"PM2 restart loop - possible to show what caused \"change\" to trigger?","user":{"login":"jimlei","id":4523053,"avatar_url":"https://avatars.githubusercontent.com/u/4523053?v=3","gravatar_id":"","url":"https://api.github.com/users/jimlei","html_url":"https://github.com/jimlei","followers_url":"https://api.github.com/users/jimlei/followers","following_url":"https://api.github.com/users/jimlei/following{/other_user}","gists_url":"https://api.github.com/users/jimlei/gists{/gist_id}","starred_url":"https://api.github.com/users/jimlei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimlei/subscriptions","organizations_url":"https://api.github.com/users/jimlei/orgs","repos_url":"https://api.github.com/users/jimlei/repos","events_url":"https://api.github.com/users/jimlei/events{/privacy}","received_events_url":"https://api.github.com/users/jimlei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-22T08:15:04Z","updated_at":"2015-08-23T02:08:46Z","closed_at":null,"body":"Trying to start a new sailsjs app on a newly installed (vagrant) ubuntu 14.04 box but it gets stuck in an infinite \"change detected - reloading\" loop. It's quite frustrating to not know what triggered it. Hope there is some attribute somewhere to show a more verbose log of what's going on.\r\n\r\nnode v0.12.7\r\nnpm 2.11.3\r\npm2 0.14.7\r\n\r\n```sh\r\npm2 start processes.json --watch\r\n```\r\n\r\n```json\r\n{\r\n    \"apps\":\r\n    [\r\n        {\r\n            \"name\"        : \"api\",\r\n            \"script\"      : \"app.js\",\r\n            \"args\"        : [],\r\n            \"node_args\"   : \"--harmony\",\r\n            \"instances\"   : 0,\r\n            \"max_memory_restart\": \"300M\",\r\n            \"exec_mode\"   : \"cluster\",\r\n            \"autorestart\" : true,\r\n            \"merge_logs\"  : true,\r\n            \"watch_options\": {\r\n                \"followSymlinks\": false,\r\n                \"usePolling\": true,\r\n                \"interval\": 400\r\n            },\r\n            \"ignoreWatch\" : [\"[\\\\/\\\\\\\\]\\\\./\", \"logs\", \"node_modules\", \".tmp\", \".idea\", \".vagrant\"],\r\n            \"error_file\"  : \"./logs/error.log\",\r\n            \"out_file\"    : \"./logs/out.log\",\r\n            \"pid_file\"    : \"./logs/app.pid\"\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n```sh\r\nPM2 Change detected for app name: api - restarting\r\nPM2 Stopping app:api id:0\r\nPM2 App name:api id:0 disconnected\r\nPM2 App name:api id:0 exited with code SIGTERM\r\nPM2 Process with pid 3209 killed\r\nPM2 Starting execution sequence in -cluster mode- for app name:api id:0\r\nPM2 App name:api id:0 online\r\nPM2 Change detected for app name: api - restarting\r\nPM2 Stopping app:api id:0\r\nPM2 App name:api id:0 disconnected\r\nPM2 App name:api id:0 exited with code SIGTERM\r\nPM2 Process with pid 3214 killed\r\nPM2 Starting execution sequence in -cluster mode- for app name:api id:0\r\nPM2 App name:api id:0 online\r\nPM2 Change detected for app name: api - restarting\r\nPM2 Stopping app:api id:0\r\nPM2 App name:api id:0 disconnected\r\nPM2 App name:api id:0 exited with code SIGTERM\r\nPM2 Process with pid 3219 killed\r\nPM2 Starting execution sequence in -cluster mode- for app name:api id:0\r\nPM2 App name:api id:0 online\r\nPM2 Change detected for app name: api - restarting\r\nPM2 Stopping app:api id:0\r\nPM2 App name:api id:0 disconnected\r\nPM2 App name:api id:0 exited with code SIGTERM\r\nPM2 Process with pid 3224 killed\r\nPM2 Starting execution sequence in -cluster mode- for app name:api id:0\r\nPM2 App name:api id:0 online\r\n```"},"comment":{"url":"https://api.github.com/repos/Unitech/PM2/issues/comments/133771634","html_url":"https://github.com/Unitech/PM2/issues/1547#issuecomment-133771634","issue_url":"https://api.github.com/repos/Unitech/PM2/issues/1547","id":133771634,"user":{"login":"cazgp","id":658873,"avatar_url":"https://avatars.githubusercontent.com/u/658873?v=3","gravatar_id":"","url":"https://api.github.com/users/cazgp","html_url":"https://github.com/cazgp","followers_url":"https://api.github.com/users/cazgp/followers","following_url":"https://api.github.com/users/cazgp/following{/other_user}","gists_url":"https://api.github.com/users/cazgp/gists{/gist_id}","starred_url":"https://api.github.com/users/cazgp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazgp/subscriptions","organizations_url":"https://api.github.com/users/cazgp/orgs","repos_url":"https://api.github.com/users/cazgp/repos","events_url":"https://api.github.com/users/cazgp/events{/privacy}","received_events_url":"https://api.github.com/users/cazgp/received_events","type":"User","site_admin":false},"created_at":"2015-08-23T02:08:46Z","updated_at":"2015-08-23T02:08:46Z","body":"I'm getting exactly the same errors, and it's cluster mode specific. `pm2 logs`:\r\n\r\n```\r\nM2: 2015-08-23 02:04:55: Starting execution sequence in -cluster mode- for app name:load-balancer id:0\r\nPM2: node.js:720\r\nPM2:     var cwd = process.cwd();\r\nPM2:                       ^\r\nPM2: Error: ENOENT, no such file or directory\r\nPM2:     at Error (native)\r\nPM2:     at Function.startup.resolveArgv0 (node.js:720:23)\r\nPM2:     at startup (node.js:63:13)\r\nPM2:     at node.js:814:3\r\nPM2: 2015-08-23 02:04:55: App name:load-balancer id:0 disconnected\r\nPM2: 2015-08-23 02:04:55: App name:load-balancer id:0 exited with code 1\r\n```"}}