keymetrics / docker-pm2

🐳 Official Docker Image for PM2 runtime
https://hub.docker.com/r/keymetrics/pm2
MIT License
476 stars 60 forks source link

After latest build which was on 22nd of April, we see error logs in our containers. #79

Closed shako92 closed 4 years ago

shako92 commented 4 years ago

Dockerfile, looks like this: FROM keymetrics/pm2:latest-alpine COPY /dist /src COPY /node_modules /src/node_modules ENV WEB_API_PORT=4000 EXPOSE 4000 WORKDIR /src ENTRYPOINT ["pm2-runtime", "start", "/src/index.js","-i", "2", "--name","gap.operator.gateway"]

Here Is the error we see in containers: 2020-04-23T05:07:58: PM2 log: Launching in no daemon mode, 2020-04-23T05:07:58: PM2 error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1), at Object.writeFileSync (fs.js:1380:5), at module.exports.Daemon.innerStart (/usr/local/lib/node_modules/pm2/lib/Daemon.js:90:8), at /usr/local/lib/node_modules/pm2/lib/Client.js:77:14, at /usr/local/lib/node_modules/pm2/lib/Client.js:319:14, at processTicksAndRejections (internal/process/task_queues.js:79:11), at runNextTicks (internal/process/task_queues.js:66:3), at listOnTimeout (internal/timers.js:518:9), at processTimers (internal/timers.js:492:7), 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency, (Use node --trace-warnings ... to show where the warning was created), 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'find' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'head' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'set' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'test' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'to' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 error: (node:1) Warning: Accessing non-existent property 'which' of module exports inside circular dependency, 2020-04-23T05:07:58: PM2 log: App [gap.operator.gateway:0] starting in -cluster mode-, 2020-04-23T05:07:58: PM2 log: App [gap.operator.gateway:0] online, 2020-04-23T05:07:58: PM2 log: App [gap.operator.gateway:1] starting in -cluster mode-, 2020-04-23T05:07:58: PM2 log: App [gap.operator.gateway:1] online, TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (17), at Object.writeFileSync (fs.js:1380:5), at ProcessContainer (/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:68:8), at Object. (/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:101:3), at Module._compile (internal/modules/cjs/loader.js:1185:30), at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10), at Module.load (internal/modules/cjs/loader.js:1034:32), at Function.Module._load (internal/modules/cjs/loader.js:923:14), at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12), at internal/main/run_main_module.js:17:47, TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (24), at Object.writeFileSync (fs.js:1380:5), at ProcessContainer (/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:68:8), at Object. (/usr/local/lib/node_modules/pm2/lib/ProcessContainer.js:101:3), at Module._compile (internal/modules/cjs/loader.js:1185:30), at Object.Module._extensions..js (internal/modules/cjs/loader.js:1205:10), at Module.load (internal/modules/cjs/loader.js:1034:32), at Function.Module._load (internal/modules/cjs/loader.js:923:14), at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12), at internal/main/run_main_module.js:17:47, API STARTED ON PORT=4000, API STARTED ON PORT=4000, 2020-04-24T05:07:59: PM2 log: [PM2] This PM2 is not UP TO DATE, 2020-04-24T05:07:59: PM2 log: [PM2] Upgrade to version 4.4.0, 2020-04-25T05:07:59: PM2 log: [PM2] This PM2 is not UP TO DATE, 2020-04-25T05:07:59: PM2 log: [PM2] Upgrade to version 4.4.0, 2020-04-26T05:07:59: PM2 log: [PM2] This PM2 is not UP TO DATE, 2020-04-26T05:07:59: PM2 log: [PM2] Upgrade to version 4.4.0,

Unitech commented 4 years ago

Build has been refreshed with latest PM2 supporting Node 14

tgbrfvedcs commented 4 years ago

I have same issue with pm2:latest-alpine.

shako92 commented 4 years ago

So @Unitech this is normal that people see in logs the trace I provided above?

Number16BusShelter commented 4 years ago

Facing the same issue. OSX - pm2:latest-alpine Please supply with info to resolve.

2020-06-19T18:37:01: PM2 error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1)
    at Object.writeFileSync (fs.js:1380:5)
    at module.exports.Daemon.innerStart (/usr/local/lib/node_modules/pm2/lib/Daemon.js:90:8)
    at /usr/local/lib/node_modules/pm2/lib/Client.js:77:14
    at /usr/local/lib/node_modules/pm2/lib/Client.js:319:14
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
    at runNextTicks (internal/process/task_queues.js:66:3)
    at listOnTimeout (internal/timers.js:518:9)
    at processTimers (internal/timers.js:492:7)
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
Number16BusShelter commented 4 years ago

Facing the same issue. OSX - pm2:latest-alpine Please supply with info to resolve.

2020-06-19T18:37:01: PM2 error: TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1)
    at Object.writeFileSync (fs.js:1380:5)
    at module.exports.Daemon.innerStart (/usr/local/lib/node_modules/pm2/lib/Daemon.js:90:8)
    at /usr/local/lib/node_modules/pm2/lib/Client.js:77:14
    at /usr/local/lib/node_modules/pm2/lib/Client.js:319:14
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
    at runNextTicks (internal/process/task_queues.js:66:3)
    at listOnTimeout (internal/timers.js:518:9)
    at processTimers (internal/timers.js:492:7)
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
2020-06-19T18:37:01: PM2 error: (node:1) Warning: Accessing non-existent property 'which' of module exports inside circular dependency

Using pm2:14-alpine did not help. Running with bare pm2 does not cause such a problem. Please, consider resuming the thread.

Kanna727 commented 4 years ago

I have the same issue with pm2:latest-alpine. Also tried pm2:14-alpine