Skip to content
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

Cron failed to restart apps, Error: write EPIPE #5035

Closed
Allain55 opened this issue Mar 29, 2021 · 3 comments
Closed

Cron failed to restart apps, Error: write EPIPE #5035

Allain55 opened this issue Mar 29, 2021 · 3 comments

Comments

@Allain55
Copy link

What's going wrong?

I have a cron_restart set in an ecosystem.config file for a few weeks now. This worked as it should until now but on Sunday the restart failed and no app was restarted after killing them.

Log:

2021-03-28T06:58:00: PM2 log: Stopping app:vbt id:1
2021-03-28T06:58:00: PM2 log: Stopping app:dkt id:0
2021-03-28T06:58:00: PM2 log: App name:dkt id:0 disconnected
2021-03-28T06:58:00: PM2 log: App name:vbt id:1 disconnected
2021-03-28T06:58:00: PM2 log: App [dkt:0] exited with code [0] via signal [SIGINT]
2021-03-28T06:58:00: PM2 log: App [vbt:1] exited with code [0] via signal [SIGINT]
2021-03-28T06:58:00: PM2 log: pid=29823 msg=process killed
2021-03-28T06:58:00: PM2 log: pid=29658 msg=process killed
2021-03-28T06:58:00: PM2 log: App [dkt:0] starting in -cluster mode-
2021-03-28T06:58:00: PM2 log: App [vbt:1] starting in -cluster mode-
2021-03-28T06:58:05: PM2 log: App [dkt:0] online
2021-03-28T06:58:22: PM2 log: App [vbt:1] online

2021-03-28T06:58:27: PM2 error: Error: write EPIPE
at ChildProcess.target._send (node:internal/child_process:849:20)
at ChildProcess.target.send (node:internal/child_process:722:19)
at sendHelper (node:internal/cluster/utils:27:15)
at send (node:internal/cluster/master:359:10)
at node:internal/cluster/master:325:5
at Server.done (node:internal/cluster/round_robin_handle:55:7)
at Object.onceWrapper (node:events:484:28)
at Server.emit (node:events:390:22)
at Server.EventEmitter.emit (node:domain:532:15)
at emitListeningNT (node:net:1344:10)
2021-03-28T06:58:27: PM2 log: ===============================================================================
2021-03-28T06:58:27: PM2 log: --- PM2 global error caught ---------------------------------------------------
2021-03-28T06:58:27: PM2 log: Time                 : Sun Mar 28 2021 06:58:27 GMT+0000 (Coordinated Universal Time)
2021-03-28T06:58:27: PM2 error: write EPIPE
2021-03-28T06:58:27: PM2 error: Error: write EPIPE
at ChildProcess.target._send (node:internal/child_process:849:20)
at ChildProcess.target.send (node:internal/child_process:722:19)
at sendHelper (node:internal/cluster/utils:27:15)
at send (node:internal/cluster/master:359:10)
at Worker.disconnect (node:internal/cluster/master:365:3)
at Worker.destroy (node:internal/cluster/master:378:10)
at Worker.<anonymous> (/home/ubuntu/.nvm/versions/node/v15.10.0/lib/node_modules/pm2/lib/God.js:262:30)
    at Object.onceWrapper (node:events:485:26)
    at Worker.emit (node:events:378:20)
    at Worker.EventEmitter.emit (node:domain:470:12)

2021-03-28T06:58:27: PM2 log: ===============================================================================
2021-03-28T06:58:27: PM2 error: [PM2] Resurrecting PM2
2021-03-28T06:58:27: PM2 log: App name:det id:3 disconnected
2021-03-28T06:58:27: PM2 log: App [dkt:0] exited with code [1] via signal [SIGINT]
2021-03-28T06:58:27: PM2 log: App [dkt:0] starting in -cluster mode-
2021-03-28T06:58:27: PM2 log: App name:dkt id:0 disconnected
2021-03-28T06:58:33: PM2 log: App [dkt:0] online
2021-03-28T06:58:35: PM2 error: Cancelling versioning data parsing

%%% result of npm install %%%

2021-03-28T06:59:11: PM2 log: PM2 successfully forked

After manul restart:

2021-03-28T13:07:34: PM2 log: ===============================================================================
2021-03-28T13:07:34: PM2 log: --- New PM2 Daemon started ----------------------------------------------------
2021-03-28T13:07:34: PM2 log: Time                 : Sun Mar 28 2021 13:07:34 GMT+0000 (Coordinated Universal Time)
2021-03-28T13:07:34: PM2 log: PM2 version          : 4.5.5
2021-03-28T13:07:34: PM2 log: Node.js version      : 15.12.0
2021-03-28T13:07:34: PM2 log: Current arch         : x64
2021-03-28T13:07:34: PM2 log: PM2 home             : /home/ubuntu/.pm2
2021-03-28T13:07:34: PM2 log: PM2 PID file         : /home/ubuntu/.pm2/pm2.pid
2021-03-28T13:07:34: PM2 log: RPC socket file      : /home/ubuntu/.pm2/rpc.sock
2021-03-28T13:07:34: PM2 log: BUS socket file      : /home/ubuntu/.pm2/pub.sock
2021-03-28T13:07:34: PM2 log: Application log path : /home/ubuntu/.pm2/logs
2021-03-28T13:07:34: PM2 log: Worker Interval      : 30000
2021-03-28T13:07:34: PM2 log: Process dump file    : /home/ubuntu/.pm2/dump.pm2
2021-03-28T13:07:34: PM2 log: Concurrent actions   : 2
2021-03-28T13:07:34: PM2 log: SIGTERM timeout      : 1600
2021-03-28T13:07:34: PM2 log: ===============================================================================

How could we reproduce this issue?

No idea. Today the restart worked properly

Supporting information

    --- Daemon logs --------------------------------------------
    /home/ubuntu/.pm2/pm2.log last 20 lines:
    PM2        | │ id  │ name      │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
    PM2        | ├─────┼───────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
    PM2        | │ 0   │ dkt       │ default     │ 0.0.0   │ cluster │ 9072     │ 29s    │ 0    │ online    │ 0%       │ 140.9mb  │ ubuntu   │ disabled │
    PM2        | │ 1   │ vbt       │ default     │ 0.0.0   │ cluster │ 9078     │ 29s    │ 0    │ online    │ 0%       │ 145.1mb  │ ubuntu   │ disabled │
    PM2        | └─────┴───────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
@Unitech
Copy link
Owner

Unitech commented Feb 17, 2022

Published on 5.2.0

npm install pm2@latest -g
pm2 update

@Unitech Unitech closed this as completed Feb 17, 2022
@XzyZachary
Copy link

Published on 5.2.0

npm install pm2@latest -g
pm2 update

I have updated it, but it still seems to cause this problem. Do I need to update to the latest every time? I see that the latest is 5.2.2. I want to know why.

@jayaprakash369
Copy link

jayaprakash369 commented Jan 10, 2023

I am facing the same error. My pm2 services are killed automatically and when it tries to restart the pm2 services, it shows PM2 error: Error: write EPIPE error. I don't know why the pm2 services are killed automatically while checking the logs showing as EPIPE error. Can anyone tell me the solution? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants