Zabbix 3.0の暗号化通信での通信エラー
Zabbix 3.0に新しく実装された暗号化通信の設定をしたのですが、以下のエラーが検出されデータの取得ができなくなりました。
Received empty response from Zabbix Agent at [xxx.xxx.xxx.xxx]. Assuming that agent dropped connection because of access permissions.
設定を変更した箇所としては
/etc/zabbix/zabbix_agentd.conf 及び zabbix_server.conf中の証明書が保存されているパスを示すための
TLSCAFile=/var/lib/zabbix/zabbix_ca_file
TLSCertFile=/var/lib/zabbix/zabbix.crt
TLSKeyFile=/var/lib/zabbix/zabbix.key
のみとなっております。
私の環境は下記のとおりです。
Server及びAgent (同じ仮想マシン上でServer Agentが動いています)
IP:xxx.xxx.xxx.xxx
OS:Centos7.2
Zabbix:3.0.4
備考
firewallやselinuxなどは停止中
zabbix_get zabbix_sender を用いて証明書を指定して通信した所、問題なく通信可能であった。
zabbix_get -s xxx.xxx.xxx.xxx -k agent.version --tls-connect cert --tls-ca-file /var/lib/zabbix/zabbix_ca_file --tls-cert-file /var/lib/zabbix/zabbix.crt --tls-key-file /var/lib/zabbix/zabbix.key
3.0.4
よろしくお願いします。
TNK - 投稿数: 4769
エージェント側のログには何か記録されていませんか?
ご提示頂いた恐らくサーバ側のログから推測できるのは、エージェ
ントに接続後、応答が無い(空の応答)状態が発生しているようです。
zabbix_agentd.conf内のServerの値が適切ではない場合にも発生す
ることがあるので、一度、エージェント側のDebugLevelを4などに
してログを確認してみてください。
あと、Webインターフェース上でのホストの設定変更が書かれてい
ませんが、どのように設定されましたか?
you24 - 投稿数: 7
TNK様
返信が遅れてしまい申し訳ありません。
エージェント側のログ(DebugLevelは4)は以下の内容が記述されておりました。
27393:20160913:145653.239 End of update_cpustats()
27393:20160913:145653.239 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145654.231 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145654.232 End of send_buffer():SUCCEED
27397:20160913:145654.232 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145654.239 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145654.241 In update_cpustats()
27393:20160913:145654.241 End of update_cpustats()
27393:20160913:145654.241 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145655.232 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145655.232 End of send_buffer():SUCCEED
27397:20160913:145655.232 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145655.241 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145655.241 In update_cpustats()
27393:20160913:145655.241 End of update_cpustats()
27393:20160913:145655.241 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145656.233 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145656.233 End of send_buffer():SUCCEED
27397:20160913:145656.233 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145656.242 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145656.242 In update_cpustats()
27393:20160913:145656.242 End of update_cpustats()
27393:20160913:145656.242 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145657.233 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145657.233 End of send_buffer():SUCCEED
27397:20160913:145657.233 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145657.242 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145657.242 In update_cpustats()
27393:20160913:145657.242 End of update_cpustats()
27393:20160913:145657.242 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145658.234 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145658.234 End of send_buffer():SUCCEED
27397:20160913:145658.234 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145658.243 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145658.243 In update_cpustats()
27393:20160913:145658.243 End of update_cpustats()
27393:20160913:145658.243 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145659.234 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145659.234 End of send_buffer():SUCCEED
27397:20160913:145659.235 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145659.243 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145659.243 In update_cpustats()
27393:20160913:145659.243 End of update_cpustats()
27393:20160913:145659.243 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145700.235 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145700.235 End of send_buffer():SUCCEED
27397:20160913:145700.235 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145700.244 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145700.246 In update_cpustats()
27393:20160913:145700.246 End of update_cpustats()
27393:20160913:145700.246 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145701.235 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145701.235 End of send_buffer():SUCCEED
27397:20160913:145701.235 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145701.246 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145701.246 In update_cpustats()
27393:20160913:145701.246 End of update_cpustats()
27393:20160913:145701.246 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145702.236 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145702.236 End of send_buffer():SUCCEED
27397:20160913:145702.236 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145702.247 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145702.247 In update_cpustats()
27393:20160913:145702.247 End of update_cpustats()
27393:20160913:145702.247 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145703.236 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145703.236 End of send_buffer():SUCCEED
27397:20160913:145703.236 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145703.247 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145703.247 In update_cpustats()
27393:20160913:145703.247 End of update_cpustats()
27393:20160913:145703.247 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145704.237 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145704.237 End of send_buffer():SUCCEED
27397:20160913:145704.237 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145704.248 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145704.248 In update_cpustats()
27393:20160913:145704.248 End of update_cpustats()
27393:20160913:145704.248 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145705.237 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145705.237 End of send_buffer():SUCCEED
27397:20160913:145705.237 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145705.248 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145705.248 In update_cpustats()
27393:20160913:145705.248 End of update_cpustats()
27393:20160913:145705.248 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145706.238 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145706.238 End of send_buffer():SUCCEED
27397:20160913:145706.238 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145706.249 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145706.249 In update_cpustats()
27393:20160913:145706.249 End of update_cpustats()
27393:20160913:145706.249 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160913:145707.238 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160913:145707.238 End of send_buffer():SUCCEED
27397:20160913:145707.238 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160913:145707.249 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160913:145707.249 In update_cpustats()
27393:20160913:145707.249 End of update_cpustats()
27393:20160913:145707.249 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
ダッシュボード上での設定としましては、すでに稼働していたエージェントの暗号化タブで、証明書のチェックボックスにチェックを入れました
TNK - 投稿数: 4769
ご提示頂いたログは定期的に値を収集しているログだけしかないよ
うです。
Zabbixサーバー側から接続しようとしてエラーとなっているタイミ
ングのログを取得することはできませんか?
you24 - 投稿数: 7
以下のコマンドをサーバ側から打った後に取得したログになります。
zabbix_get -s xxx.xxx.xxx.xxx -k agent.version --tls-connect cert --tls-ca-file /var/lib/zabbix/zabbix_ca_file --tls-cert-file /var/lib/zabbix/zabbix.crt --tls-key-file /var/lib/zabbix/zabbix.key
27396:20160914:142956.078 peer certificate issuer:"CN=Zabbix CA,O=Default Company Ltd,ST=Kyoto,C=JP" subject:"CN=Zabbix,O=Default Company Ltd,ST=Kyoto,C=JP"
27396:20160914:142956.078 End of zbx_tls_accept():SUCCEED (established TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256)
27396:20160914:142956.078 __zbx_zbx_setproctitle() title:'listener #3 [processing request]'
27396:20160914:142956.078 Requested [agent.version]
27396:20160914:142956.078 Sending back [3.0.4]
27396:20160914:142956.079 __zbx_zbx_setproctitle() title:'listener #3 [waiting for connection]'
27393:20160914:142956.366 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160914:142956.367 In update_cpustats()
27393:20160914:142956.367 End of update_cpustats()
27393:20160914:142956.367 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160914:142956.760 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160914:142956.760 End of send_buffer():SUCCEED
27397:20160914:142956.760 __zbx_zbx_setproctitle() title:'active checks #1 [processing active checks]'
27397:20160914:142956.760 In process_active_checks() server:'127.0.0.1' port:10051
27397:20160914:142956.761 End of process_active_checks()
27397:20160914:142956.761 In get_min_nextcheck()
27397:20160914:142956.761 End of get_min_nextcheck():-1
27397:20160914:142956.761 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160914:142957.367 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160914:142957.367 In update_cpustats()
27393:20160914:142957.368 End of update_cpustats()
27393:20160914:142957.368 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
27397:20160914:142957.761 In send_buffer() host:'127.0.0.1' port:10051 entries:0/100
27397:20160914:142957.761 End of send_buffer():SUCCEED
27397:20160914:142957.761 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
27393:20160914:142958.368 __zbx_zbx_setproctitle() title:'collector [processing data]'
27393:20160914:142958.368 In update_cpustats()
27393:20160914:142958.368 End of update_cpustats()
27393:20160914:142958.368 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
you24 - 投稿数: 7
ログ中でおそらくサーバ側からと思われるログを見つけましたので、記載いたします。
27396:20160911:035022.262 failed to accept an incoming connection: from xxx.xxx.xxx.xxx: unencrypted connections are not allowed
TNK - 投稿数: 4769
先にご提供頂いたのはzabbix_getで成功したときのログですね。
今度は、
ですから、「unencrypted」(暗号なし)で接続しにきているのだと
思われます。
ホストの暗号化タブの設定を再度ご確認ください。
you24 - 投稿数: 7
TNK様
ご指摘の通り、暗号化タブを再確認した所、ホストへの接続項目の設定を失念しておりました。
この部分を暗号化にした所、問題なく接続できるようになりました。
ありがとうございました。