Cannot connect to pm2.io/Keymetrics - Error while trying to retrieve endpoints : connect ETIMEDOUT
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 43.3k
- Forks
- 2.7k
- PR merge metrics
- No merged PRs in 30d
Description
What's going wrong?
pm2 is running fine however a few months ago I lost the ability to monitor the apps at app.keymetrics.io.
I have installed latest pm2, deleted ~/.pm2 folder and started from scratch, but problem persists.
app.keymetrics.io dashboard shows display as if app has not been connected yet, with instructions how to link. Same on app.pm2.io.
pm2 link or pm2 plus produces console output:
[PM2.IO][WARNING] Not managed to connect to PM2 Plus, retrying in background.
agent.log:
2021-06-16T17:46:49.927Z interactor:daemon Shutdown request received via RPC
2021-06-16T17:46:49.927Z interactor:daemon Exiting Interactor
2021-06-16T17:46:49.927Z interactor:interface Disconnect all transporters
2021-06-16T17:46:49.942Z interactor:daemon RPC server closed
2021-06-16T17:46:50.573Z interactor:daemon MACHINE_NAME=server.solident.com.br-29ab
2021-06-16T17:46:50.577Z interactor:daemon PUBLIC_KEY=wo8ufvy0k9mqg84
2021-06-16T17:46:50.577Z interactor:daemon ROOT_URL=https://root.keymetrics.io
2021-06-16T17:46:50.577Z interactor:interface New transporter interface
2021-06-16T17:46:50.578Z interactor:interface Bind [websocket] transport to transporter interface
2021-06-16T17:46:50.613Z interactor:daemon [PM2 Agent] Launching agent
2021-06-16T17:46:50.614Z interactor:daemon Launching Interactor RPC server (bind to /root/.pm2/interactor.sock)
2021-06-16T17:46:51.594Z interactor:interface Connecting to: {"reverse":"https://freenode-1.keymetrics.io:43554","ws":"wss://freenode-1.keymetrics.io/interaction/public","push":"https://freenode-1.keymetrics.io:80","web":"https://freenode-1.keymetrics.io:443","realtime":"https://freenode-1.keymetrics.io:443"}
2021-06-16T17:48:58.840Z interactor:daemon Error while trying to retrieve endpoints : connect ETIMEDOUT 51.159.0.117:443
2021-06-16T17:48:58.841Z interactor:daemon Retrying to retrieve endpoints...
2021-06-16T17:49:00.031Z interactor:interface Connecting to: {"reverse":"https://freenode-1.keymetrics.io:43554","ws":"wss://freenode-1.keymetrics.io/interaction/public","push":"https://freenode-1.keymetrics.io:80","web":"https://freenode-1.keymetrics.io:443","realtime":"https://freenode-1.keymetrics.io:443"}
2021-06-16T17:51:07.222Z interactor:daemon Error while trying to retrieve endpoints : connect ETIMEDOUT 51.159.0.117:443
2021-06-16T17:51:07.222Z interactor:daemon Retrying to retrieve endpoints...
2021-06-16T17:51:08.346Z interactor:interface Connecting to: {"reverse":"https://freenode-1.keymetrics.io:43554","ws":"wss://freenode-1.keymetrics.io/interaction/public","push":"https://freenode-1.keymetrics.io:80","web":"https://freenode-1.keymetrics.io:443","realtime":"https://freenode-1.keymetrics.io:443"}
2021-06-16T17:53:15.606Z interactor:daemon Error while trying to retrieve endpoints : connect ETIMEDOUT 51.159.0.117:443
2021-06-16T17:53:15.606Z interactor:daemon Retrying to retrieve endpoints...
2021-06-16T17:53:16.982Z interactor:interface Connecting to: {"reverse":"https://freenode-1.keymetrics.io:43554","ws":"wss://freenode-1.keymetrics.io/interaction/public","push":"https://freenode-1.keymetrics.io:80","web":"https://freenode-1.keymetrics.io:443","realtime":"https://freenode-1.keymetrics.io:443"}
How could we reproduce this issue?
Supporting information
--- PM2 report ----------------------------------------------------------------
Date : Wed Jun 16 2021 14:57:34 GMT-0300 (Brasilia Standard Time)
===============================================================================
--- Daemon -------------------------------------------------
pm2d version : 5.1.0
node version : 10.24.0
node path : /opt/cpanel/ea-nodejs10/bin/pm2
argv : /opt/cpanel/ea-nodejs10/bin/node,/opt/cpanel/ea-nodejs10/lib/node_modules/pm2/lib/Daemon.js
argv0 : node
user : root
uid : 0
gid : 0
uptime : 11min
===============================================================================
--- CLI ----------------------------------------------------
local pm2 : 5.1.0
node version : 10.24.0
node path : /opt/cpanel/ea-nodejs10/bin/pm2
argv : /opt/cpanel/ea-nodejs10/bin/node,/opt/cpanel/ea-nodejs10/bin/pm2,report
argv0 : node
user : root
uid : 0
gid : 0
===============================================================================
--- System info --------------------------------------------
arch : x64
platform : linux
type : Linux
cpus : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
cpus nb : 6
freemem : 4059295744
totalmem : 8200531968
home : /root
===============================================================================
--- PM2 list -----------------------------------------------
┌─────┬──────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼──────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ app │ default │ 1.0.0 │ fork │ 17768 │ 11m │ 0 │ online │ 0.3% │ 48.1mb │ root │ enabled │
│ 1 │ index │ default │ 1.0.0 │ fork │ 17774 │ 11m │ 0 │ online │ 0.4% │ 69.9mb │ root │ enabled │
└─────┴──────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
===============================================================================
--- Daemon logs --------------------------------------------
/root/.pm2/pm2.log last 20 lines:
PM2 | 2021-06-16T14:46:06: PM2 log: Time : Wed Jun 16 2021 14:46:06 GMT-0300 (Brasilia Standard Time)
PM2 | 2021-06-16T14:46:06: PM2 log: PM2 version : 5.1.0
PM2 | 2021-06-16T14:46:06: PM2 log: Node.js version : 10.24.0
PM2 | 2021-06-16T14:46:06: PM2 log: Current arch : x64
PM2 | 2021-06-16T14:46:06: PM2 log: PM2 home : /root/.pm2
PM2 | 2021-06-16T14:46:06: PM2 log: PM2 PID file : /root/.pm2/pm2.pid
PM2 | 2021-06-16T14:46:06: PM2 log: RPC socket file : /root/.pm2/rpc.sock
PM2 | 2021-06-16T14:46:06: PM2 log: BUS socket file : /root/.pm2/pub.sock
PM2 | 2021-06-16T14:46:06: PM2 log: Application log path : /root/.pm2/logs
PM2 | 2021-06-16T14:46:06: PM2 log: Worker Interval : 30000
PM2 | 2021-06-16T14:46:06: PM2 log: Process dump file : /root/.pm2/dump.pm2
PM2 | 2021-06-16T14:46:06: PM2 log: Concurrent actions : 2
PM2 | 2021-06-16T14:46:06: PM2 log: SIGTERM timeout : 1600
PM2 | 2021-06-16T14:46:06: PM2 log: ===============================================================================
PM2 | 2021-06-16T14:46:06: PM2 log: [Watch] Start watching app
PM2 | 2021-06-16T14:46:06: PM2 log: App [app:0] starting in -fork mode-
PM2 | 2021-06-16T14:46:06: PM2 log: [Watch] Start watching index
PM2 | 2021-06-16T14:46:06: PM2 log: App [index:1] starting in -fork mode-
PM2 | 2021-06-16T14:46:06: PM2 log: App [app:0] online
PM2 | 2021-06-16T14:46:06: PM2 log: App [index:1] online
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file or test is named. Start by tracing the PM2 Plus connection used by pm2 link or pm2 plus, then reproduce the timeout and inspect agent.log for endpoint retrieval behavior; done means identifying why the Keymetrics connection fails and restoring monitoring connectivity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100