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

error while running command : pm2-zabbix --monitor #36

Open
03sameerh opened this issue Mar 20, 2019 · 3 comments
Open

error while running command : pm2-zabbix --monitor #36

03sameerh opened this issue Mar 20, 2019 · 3 comments

Comments

@03sameerh
Copy link

Hi team,
I got below error while running
pm2-zabbix --monitor command , can anyone please help to resolve this issue.
please find error logs:

{"name":"pm2-zabbix","hostname":"Dev-210-APP","pid":70413,"level":50,"event":"PM2ZabbixMonitor#PM2StatusSent","error":{"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/devops//usr/local/share/.pm2/pm2.pid"},"msg":"Failed to send PM2 status: Error: ENOENT: no such file or directory, open '/home/devops//usr/local/share/.pm2/pm2.pid'","time":"2019-03-20T14:10:06.108Z","v":0}
{"name":"pm2-zabbix","hostname":"Dev-210-APP","pid":70413,"level":50,"event":"PM2ZabbixMonitor#processListSendingError","error":{"killed":false,"code":2,"signal":null,"cmd":"/usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -"},"msg":"Failed to send process list with stats to server: Error: Command failed: /usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -\n","time":"2019-03-20T14:10:06.431Z","v":0}

@03sameerh
Copy link
Author

any update

@xfengfeng
Copy link

I have the same problem.

{"name":"pm2-zabbix","hostname":"localhost.localdomain","pid":367,"level":50,"event":"PM2ZabbixMonitor#PM2StatusSent","error":{"killed":false,"code":1,"signal":null,"cmd":"/usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -"},"msg":"Failed to send PM2 status: Error: Command failed: /usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -\n","time":"2019-04-02T05:03:34.230Z","v":0}
{"name":"pm2-zabbix","hostname":"localhost.localdomain","pid":367,"level":50,"event":"PM2ZabbixMonitor#processListSendingError","error":{"killed":false,"code":1,"signal":null,"cmd":"/usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -"},"msg":"Failed to send process list with stats to server: Error: Command failed: /usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -\n","time":"2019-04-02T05:03:34.273Z","v":0}

@rkaw92
Copy link
Member

rkaw92 commented Apr 8, 2019

Hi,
These are actually two separate issues.
@xfengfeng Code 1 means there's a connectivity problem - the client (zabbix_sender) cannot connect to the server. Check your zabbix_agentd config and whether you can ping the Zabbix server's IP. If the problem persists despite a correct network configuration, please open a separate issue instead of adding to an unrelated issue, thanks.

@03sameerh Are you running the latest version of pm2-zabbix? This looks like a path handling problem. We've had a buggy implementation of path handling in the past, but now we use the same logic as pm2, so this should not normally happen. What's your PM2_HOME?

Try taking a look at the upstream path resolution logic: https://github.com/Unitech/pm2/blob/a3f5e1068b7fa0f022abd4259d139753430dbf7d/paths.js#L10

Does it match what you're seeing?

I've noticed there is another error in your pasted log - error code 2 from zabbix_sender. This means the target Items do not exist on the server - see https://github.com/greatcare/pm2-zabbix/blob/master/Troubleshooting.md

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

3 participants