dpiquet / pve-monitor

pve-monitor is a tool to monitor hypervisor and virtual machines in a proxmox cluster
37 stars 24 forks source link

500 SSL negotiation failed #16

Closed fcocor closed 9 years ago

fcocor commented 9 years ago

I tried to install the plugin and I get this error when run from console

perl /usr/lib/nagios/plugins/pve-monitor.pl --conf /etc/nagios3/pve-monitor.conf --nodes --debug Loaded node proxmox1.XXXX.com Loaded node proxmox2 Trying 192.168.1.201... DEBUG: login not successful DEBUG: 500 SSL negotiation failed: Trying 192.168.1.202... DEBUG: login not successful DEBUG: 500 SSL negotiation failed:

This is the configuration file:

node proxmox1.XXXX.com { address 192.168.1.201 port 8006 # Optional, default is 8006 monitor_account nagios monitor_password XXXXXXX realm pve # Optional, default is pam mem 80 90 # optional, not monitored if not defined cpu 80 95 # optional disk 80 90 # optional }

node proxmox2 { address 192.168.1.202 port 8006 # Optional, default is 8006 monitor_account nagios monitor_password XXXXXXX realm pve # Optional, default is pam mem 80 90 # optional, not monitored if not defined cpu 80 95 # optional disk 80 90 # optional }

I have a Proxmox 3.3-5

thanks for your work!

dpiquet commented 9 years ago

Hi fcocor

Thanks for reporting this issue. Could you give me some details about your monitoring server so I can help you? Especially operating system and SSL librairies versions ?

fcocor commented 9 years ago

Hi dpiquet

The SO installed is Debian squeeze 6.0.11 and ssl libraries versions are:

libcrypt-ssleay-perl 0.57-2 libio-socket-ssl-perl 1.33-1+squeeze1 libnet-ssleay-perl 1.36-1 libssl-dev 0.9.8o-4squeeze14 libssl0.9.8 0.9.8o-4squeeze14 openssl 0.9.8o-4squeeze14 openssl-blacklist 0.5-2 ssl-cert 1.0.28

dpiquet commented 9 years ago

Hi,

I just fixed an issue in proxmox-ve-api-perl library. Updating to the latest version should fix the problem you are experiencing.

Thanks for reporting this and please tell me if the fix works for on this thread so we can close it.

fcocor commented 9 years ago

Hello,

I downloaded the library again from git, but the problem persists. I've downloaded through the git command that you describe in the wiki. Is it right?

regards

dpiquet commented 9 years ago

Yes it is, but you might experience a different problem that the one i solved.

Could run the plugin with ssl debugging output and paste the results here so I have more info to solve the problem ?

Run the code like this: perl -MIO::Socket::SSL=debug4 pve-monitor.pl --conf pve-monitor.conf --nodes

fcocor commented 9 years ago

Ok, this is the command output:

Setting timeout to 5 Loaded node proxmox1 Loaded node proxmox2 Trying 192.168.1.201... DEBUG: .../IO/Socket/SSL.pm:1464: new ctx 24515440 DEBUG: .../IO/Socket/SSL.pm:332: socket not yet connected DEBUG: .../IO/Socket/SSL.pm:334: socket connected DEBUG: .../IO/Socket/SSL.pm:347: ssl handshake not started DEBUG: .../IO/Socket/SSL.pm:390: Net::SSLeay::connect -> 0 DEBUG: .../IO/Socket/SSL.pm:438: connection failed - connect returned 0 DEBUG: .../IO/Socket/SSL.pm:1201: SSL connect attempt failed because of handshake problemserror:00000000:lib(0):func(0):reason(0)

DEBUG: .../IO/Socket/SSL.pm:1500: free ctx 24515440 open=24515440 DEBUG: .../IO/Socket/SSL.pm:1508: OK free ctx 24515440 DEBUG: .../IO/Socket/SSL.pm:1201: IO::Socket::INET configuration failederror:00000000:lib(0):func(0):reason(0)

DEBUG: login not successful DEBUG: 500 Can't connect to 192.168.1.201:8006 (SSL connect attempt failed because of handshake problemserror:00000000:lib(0):func(0):reason(0)) Trying 192.168.1.202... DEBUG: .../IO/Socket/SSL.pm:1464: new ctx 24241504 DEBUG: .../IO/Socket/SSL.pm:332: socket not yet connected DEBUG: .../IO/Socket/SSL.pm:334: socket connected DEBUG: .../IO/Socket/SSL.pm:347: ssl handshake not started DEBUG: .../IO/Socket/SSL.pm:390: Net::SSLeay::connect -> 0 DEBUG: .../IO/Socket/SSL.pm:438: connection failed - connect returned 0 DEBUG: .../IO/Socket/SSL.pm:1201: SSL connect attempt failed because of handshake problemserror:00000000:lib(0):func(0):reason(0)

DEBUG: .../IO/Socket/SSL.pm:1500: free ctx 24241504 open=24241504 DEBUG: .../IO/Socket/SSL.pm:1508: OK free ctx 24241504 DEBUG: .../IO/Socket/SSL.pm:1201: IO::Socket::INET configuration failederror:00000000:lib(0):func(0):reason(0)

DEBUG: login not successful DEBUG: 500 Can't connect to 192.168.1.202:8006 (SSL connect attempt failed because of handshake problemserror:00000000:lib(0):func(0):reason(0))

regards

dpiquet commented 9 years ago

Thanks for the additional infos. I could reproduce the bug and fix it in my test environment. I released another version of proxmox-ve-api-perl. This time, everything should finally work.

Could you keep me informed if the fix worked for you as well (and close this bug report if so) ?

Regards

fcocor commented 9 years ago

Hi,

Already working now!

thank you very much

dpiquet commented 9 years ago

Glad to hear it.