Could not connect to any server !
Closed this issue · 9 comments
Hello ! Here's my pve-monitor.conf;
Example Cluster definition
node example
node srv02 {
address 192.168.128.12
port 8006 # Optional, default is 8006
monitor_account root
monitor_password potato
realm pam # Optional, default is pve
# test
mem 80 90 # optional, not monitored if not defined
cpu 80 95 # optional
disk 80 90 # optional
}
openvz example
openvz example {
mem 80 90
cpu 80 95
disk 80 90
}
qemu example
qemu msvm {
mem 80 90
cpu 80 95
disk 80 90
}
storage example
storage local {
disk 80 90
node srv02
}
from debian jessie box (192.168.128.210) i can ping and telnet on 8006 192.168.128.12 but when i run any command from: /usr/bin/perl pve-monitor.pl --conf /etc/nagios3/pve-monitor.conf i always obtain "Could not connect to any server !" Thanks to help
root@nagios:~/pve-monitor-stable-1.0# /usr/bin/perl pve-monitor.pl --conf /etc/nagios3/pve-monitor.conf --nodes --debug
Setting timeout to 5
Loaded node srv02
Loaded openvz example
Loaded qemu msvm
Loaded storage local
Trying 192.168.128.12...
DEBUG: login not successful
DEBUG: 500 Can't connect to 192.168.128.12:8006 (certificate verify failed)
Hi,
This problem was solved some times ago. Check out the latest versiion which should word fine !
https://github.com/dpiquet/pve-monitor/archive/Stable-1.05.tar.gz
Unfortunatly, i just try this latest version and i have the same error.
I don't know if there's a link but, i had to install Net::Proxmox::VE using cpan because git clone git://github.com/dpiquet/proxmox-ve-api-perl.git &cp -R proxmox-ve-api-perl/lib/Net/Proxmox /usr/lib/perl5/Net/ giving me error .... Can't locate Net/Proxmox/VE.pm in @inc (you may need to install the Net::Proxmox::VE module) Thanks
Hi Having the same issue after upgrading to Ubuntu 15.04 - my guess is that it is due to unsigned SSL certs and the new version of perl being much more strict.
Here's a snippet of strace
read(3, "\26\3\1\3\275", 5) = 5
read(3, "\v\0\3\271\0\3\266\0\3\2630\202\3\2570\202\2\227\240\3\2\1\2\2\1\0040\r\6\t*\206H\206\367\r\1\1\5\5\0000r1$0"\6\3U\4\3\f\33Proxmox Virtual Environment1)0'\6\3U\4\v\f 7f67a6b065ce95563689861fdf56c53c1\0370\35\6\3U\4\n\f\26PVE Cluster Manager CA0\36\27\r141217152238Z\27\r241214152238Z0[1\0310\27\6\3U\4\v\23\20PVE Cluster Node1$0"\6\3U\4\n\23\33Proxmox Virtual Environment"..., 957) = 957
stat("/usr/lib/ssl/certs/dcc57f4d.0", 0x7ffe2ee0bd90) = -1 ENOENT (No such file or directory)
write(3, "\25\3\1\0\2\0020", 7) = 7
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7f8eccf1f2f0}, {SIG_DFL, [], SA_RESTORER, 0x7f8eccf1f2f0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
rt_sigaction(SIGPIPE, {SIG_DFL, [], SA_RESTORER, 0x7f8eccf1f2f0}, {SIG_IGN, [], SA_RESTORER, 0x7f8eccf1f2f0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
close(3) = 0
write(1, "DEBUG: login not successful\n", 28) = 28
Just confirmed that it is the snakeoil certs causing the issue. Changed one of the nodes to use the load balancer hostname, which has a matching cert and it worked fine.
I also found that the port setting for nodes is actually ignored and always tries 8006. This was fixed by adding port to the following in line 730 of pve--monitor.pl
$pve = Net::Proxmox::VE->new(
host => $host,
port => $port,
username => $username,
password => $password,
debug => $arguments{debug},
realm => $realm,
timeout => $arguments{timeout},
);
I have solved the issue "Can't locate Net/Proxmox/VE.pm in @inc (you may need to install the Net::Proxmox::VE module)" on my server but i still have the "Could not connect to any server !"
Is it possible to resolve this issue?
Hi all,
I have just released a new version of pve-monitor which uses the Net::Proxmox::VE cpan module instead of my own fork.
If you installed the cpan version of this module, please use the latest (1.06) version of pve-monitor. It should address the issues you experienced. Reopen this bug if you still have problems with the new version.