unifiZabbix icon indicating copy to clipboard operation
unifiZabbix copied to clipboard

Item [:ssh.run[ifconfig]] error: Cannot access public key file /var/lib/zabbix/.ssh/{$UNIFI_PUB_KEY}

Open Kelly12612 opened this issue 2 years ago • 1 comments

I'm having a hard time determining if this is one of the issues you mention in the troubleshooting section, or something else. This is in an Ubuntu 22.04 x86_64 VM running in VirtualBox on a windows machine. Some things, such as ifconfig for the UDMP seem to be failing:

from zabbix_server.log: 9512:20220718:214054.307 zbx_setproctitle() title:'history syncer #3 [processed 0 values, 0 triggers in 0.000022 sec, idle 1 sec]' 9533:20220718:214054.319 ssh_run() supported authentication methods: password, publickey 9533:20220718:214054.319 End of ssh_run():NOTSUPPORTED 9533:20220718:214054.319 Item [:ssh.run[ifconfig]] error: Cannot access public key file /var/lib/zabbix/.ssh/{$UNIFI_PUB_KEY} 9533:20220718:214054.319 End of get_value():NOTSUPPORTED 9533:20220718:214054.319 End of zbx_trapper_item_test_run():FAIL 9533:20220718:214054.319 zbx_trapper_item_test() json.buffer:'{"response":"success","data":{"error":"Cannot access public key file /var/lib/zabbix/.ssh/{$UNIFI_PUB_KEY}"}}' 9533:20220718:214054.319 End of zbx_trapper_item_test()

I opened the permissions on the .ssh directory more than normal, but it didn't help:

9512:20220718:214054.307 zbx_setproctitle() title:'history syncer #3 [processed 0 values, 0 triggers in 0.000022 sec, idle 1 sec]' 9533:20220718:214054.319 ssh_run() supported authentication methods: password, publickey 9533:20220718:214054.319 End of ssh_run():NOTSUPPORTED 9533:20220718:214054.319 Item [:ssh.run[ifconfig]] error: Cannot access public key file /var/lib/zabbix/.ssh/{$UNIFI_PUB_KEY} 9533:20220718:214054.319 End of get_value():NOTSUPPORTED 9533:20220718:214054.319 End of zbx_trapper_item_test_run():FAIL 9533:20220718:214054.319 zbx_trapper_item_test() json.buffer:'{"response":"success","data":{"error":"Cannot access public key file /var/lib/zabbix/.ssh/{$UNIFI_PUB_KEY}"}}' 9533:20220718:214054.319 End of zbx_trapper_item_test()

ssh as the zabbix user to the udmp seems to work fine, without a password:

9512:20220718:214054.307 zbx_setproctitle() title:'history syncer #3 [processed 0 values, 0 triggers in 0.000022 sec, idle 1 sec]' 9533:20220718:214054.319 ssh_run() supported authentication methods: password, publickey 9533:20220718:214054.319 End of ssh_run():NOTSUPPORTED 9533:20220718:214054.319 Item [:ssh.run[ifconfig]] error: Cannot access public key file /var/lib/zabbix/.ssh/{$UNIFI_PUB_KEY} 9533:20220718:214054.319 End of get_value():NOTSUPPORTED 9533:20220718:214054.319 End of zbx_trapper_item_test_run():FAIL 9533:20220718:214054.319 zbx_trapper_item_test() json.buffer:'{"response":"success","data":{"error":"Cannot access public key file /var/lib/zabbix/.ssh/{$UNIFI_PUB_KEY}"}}' 9533:20220718:214054.319 End of zbx_trapper_item_test()

Not sure exactly what's wrong yet...... (obviously, or you wouldn't be reading this! ;;-} )

Kelly12612 avatar Jul 19 '22 02:07 Kelly12612

Looks to me like the {$UNIFI_PUB_KEY} macro is not set..

patricegautier avatar Aug 04 '22 19:08 patricegautier

closing in absence of activity..

patricegautier avatar Sep 28 '22 17:09 patricegautier