{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/pm2/issues/2496","repository_url":"https://api.github.com/repos/Unitech/pm2","labels_url":"https://api.github.com/repos/Unitech/pm2/issues/2496/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/pm2/issues/2496/comments","events_url":"https://api.github.com/repos/Unitech/pm2/issues/2496/events","html_url":"https://github.com/Unitech/pm2/issues/2496","id":187535149,"number":2496,"title":"When --node_args option is passed, /usr/lib/node_modules/pm2/lib/ProcessContainerFork.js is run","user":{"login":"suzuki-shunsuke","id":13323303,"avatar_url":"https://avatars.githubusercontent.com/u/13323303?v=3","gravatar_id":"","url":"https://api.github.com/users/suzuki-shunsuke","html_url":"https://github.com/suzuki-shunsuke","followers_url":"https://api.github.com/users/suzuki-shunsuke/followers","following_url":"https://api.github.com/users/suzuki-shunsuke/following{/other_user}","gists_url":"https://api.github.com/users/suzuki-shunsuke/gists{/gist_id}","starred_url":"https://api.github.com/users/suzuki-shunsuke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suzuki-shunsuke/subscriptions","organizations_url":"https://api.github.com/users/suzuki-shunsuke/orgs","repos_url":"https://api.github.com/users/suzuki-shunsuke/repos","events_url":"https://api.github.com/users/suzuki-shunsuke/events{/privacy}","received_events_url":"https://api.github.com/users/suzuki-shunsuke/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-06T01:24:13Z","updated_at":"2016-11-06T11:40:06Z","closed_at":"2016-11-06T02:16:09Z","body":"#### Expected behaviour\r\n\r\nWhen the following command is executed, the script \"app/app.js\" is run.\r\n\r\n```\r\n$ pm2 start app/app.js --node-args=\"--inspect --debug-brk\"\r\n```\r\n\r\n#### Actual behaviour\r\n\r\n/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js is run.\r\n\r\n```\r\n$ ps aux\r\nPID   USER     TIME   COMMAND\r\n    1 root       0:00 sh\r\n   45 root       0:00 sh\r\n  132 root       0:00 PM2 v2.0.12: God Daemon (/root/.pm2)\r\n  142 root       0:00 node --inspect --debug-brk /usr/lib/node_modules/pm2/lib/ProcessContainerFork.js\r\n  153 root       0:00 ps aux\r\n```\r\n\r\n#### Steps to reproduce\r\n\r\n```\r\n$ git clone https://github.com/suzuki-shunsuke/express-example --single-branch --branch not-work-pm2-node_args\r\n$ cd express-example\r\n$ docker run -ti -v $PWD:/app keymetrics/pm2-docker-alpine sh\r\n\r\n# npm i\r\n# pm2 start app/app.js --node-args=\"--inspect --debug-brk\"\r\n```\r\n\r\n#### Software versions used\r\n\r\nI have used the Docker.\r\n\r\n```\r\nHost OS: Arch Linux (Linux arch 4.8.2-1-ARCH #1 SMP PREEMPT Mon Oct 17 08:11:46 CEST 2016 x86_64 GNU/Linux)\r\nDocker Image: keymetrics/pm2-docker-alpine:latest\r\nDocker: 1.12.2\r\nnode.js: 6.6.0\r\nPM2: 2.0.12\r\n```\r\n\r\n#### PM2 Log output\r\n\r\n```\r\n$ tail -n 50 ~/.pm2/pm2.log\r\n2016-11-06 00:49:32: --- Stopping PM2 --------------------------------------------------------------\r\n2016-11-06 00:49:32: Time                 : Sun Nov 06 2016 00:49:32 GMT+0000 (UTC)\r\n2016-11-06 00:49:32: ===============================================================================\r\n2016-11-06 00:49:32: RPC closed\r\n2016-11-06 00:49:32: PUB closed\r\n2016-11-06 00:49:32: PM2 successfully stopped\r\n2016-11-06 00:51:18: ===============================================================================\r\n2016-11-06 00:51:18: --- New PM2 Daemon started ----------------------------------------------------\r\n2016-11-06 00:51:18: Time                 : Sun Nov 06 2016 00:51:18 GMT+0000 (UTC)\r\n2016-11-06 00:51:18: PM2 version          : 2.0.12\r\n2016-11-06 00:51:18: Node.js version      : 6.6.0\r\n2016-11-06 00:51:18: Current arch         : x64\r\n2016-11-06 00:51:18: PM2 home             : /root/.pm2\r\n2016-11-06 00:51:18: PM2 PID file         : /root/.pm2/pm2.pid\r\n2016-11-06 00:51:18: RPC socket file      : /root/.pm2/rpc.sock\r\n2016-11-06 00:51:18: BUS socket file      : /root/.pm2/pub.sock\r\n2016-11-06 00:51:18: Application log path : /root/.pm2/logs\r\n2016-11-06 00:51:18: Process dump file    : /root/.pm2/dump.pm2\r\n2016-11-06 00:51:18: Concurrent actions   : 4\r\n2016-11-06 00:51:18: SIGTERM timeout      : 1600\r\n2016-11-06 00:51:18: ===============================================================================\r\n2016-11-06 00:51:48: Starting execution sequence in -fork mode- for app name:app id:0\r\n2016-11-06 00:51:48: App name:app id:0 online\r\n2016-11-06 00:53:48: Stopping app:app id:0\r\n2016-11-06 00:53:48: App [app] with id [0] and pid [91], exited with code [0] via signal [SIGINT]\r\n2016-11-06 00:53:48: [HandleExit] PM2 is being killed, stopping restart procedure...\r\n2016-11-06 00:53:49: ===============================================================================\r\n2016-11-06 00:53:49: --- Stopping PM2 --------------------------------------------------------------\r\n2016-11-06 00:53:49: Time                 : Sun Nov 06 2016 00:53:49 GMT+0000 (UTC)\r\n2016-11-06 00:53:49: ===============================================================================\r\n2016-11-06 00:53:49: RPC closed\r\n2016-11-06 00:53:49: PUB closed\r\n2016-11-06 00:53:49: PM2 successfully stopped\r\n2016-11-06 00:54:05: ===============================================================================\r\n2016-11-06 00:54:05: --- New PM2 Daemon started ----------------------------------------------------\r\n2016-11-06 00:54:05: Time                 : Sun Nov 06 2016 00:54:05 GMT+0000 (UTC)\r\n2016-11-06 00:54:05: PM2 version          : 2.0.12\r\n2016-11-06 00:54:05: Node.js version      : 6.6.0\r\n2016-11-06 00:54:05: Current arch         : x64\r\n2016-11-06 00:54:05: PM2 home             : /root/.pm2\r\n2016-11-06 00:54:05: PM2 PID file         : /root/.pm2/pm2.pid\r\n2016-11-06 00:54:05: RPC socket file      : /root/.pm2/rpc.sock\r\n2016-11-06 00:54:05: BUS socket file      : /root/.pm2/pub.sock\r\n2016-11-06 00:54:05: Application log path : /root/.pm2/logs\r\n2016-11-06 00:54:05: Process dump file    : /root/.pm2/dump.pm2\r\n2016-11-06 00:54:05: Concurrent actions   : 4\r\n2016-11-06 00:54:05: SIGTERM timeout      : 1600\r\n2016-11-06 00:54:05: ===============================================================================\r\n2016-11-06 00:54:05: Starting execution sequence in -fork mode- for app name:app id:0\r\n2016-11-06 00:54:05: App name:app id:0 online\r\n```"},"comment":{"url":"https://api.github.com/repos/Unitech/pm2/issues/comments/258675468","html_url":"https://github.com/Unitech/pm2/issues/2496#issuecomment-258675468","issue_url":"https://api.github.com/repos/Unitech/pm2/issues/2496","id":258675468,"user":{"login":"vmarchaud","id":2820968,"avatar_url":"https://avatars.githubusercontent.com/u/2820968?v=3","gravatar_id":"","url":"https://api.github.com/users/vmarchaud","html_url":"https://github.com/vmarchaud","followers_url":"https://api.github.com/users/vmarchaud/followers","following_url":"https://api.github.com/users/vmarchaud/following{/other_user}","gists_url":"https://api.github.com/users/vmarchaud/gists{/gist_id}","starred_url":"https://api.github.com/users/vmarchaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmarchaud/subscriptions","organizations_url":"https://api.github.com/users/vmarchaud/orgs","repos_url":"https://api.github.com/users/vmarchaud/repos","events_url":"https://api.github.com/users/vmarchaud/events{/privacy}","received_events_url":"https://api.github.com/users/vmarchaud/received_events","type":"User","site_admin":false},"created_at":"2016-11-06T11:40:06Z","updated_at":"2016-11-06T11:40:06Z","body":"`ProcessContainerFork` is always run when starting a node app, like its name mean its container that will contains your application."}}
{"actor":{"display_login":"vmarchaud"}}