authentication failed: Failed to create SASL client context: -1 (generic failure)

今天遇到這個問題
root@cnmc-kvm-test:/etc/libvirt# virsh -c qemu+tcp://192.168.1.5/system nodeinfo
libvir: RPC 錯誤 : authentication failed: Failed to create SASL client context: -1 (generic failure)
錯誤: authentication failed: Failed to create SASL client context: -1 (generic failure)
錯誤: 無法連上 hypervisor

問題似乎不在 client ,因爲 server 也有問題:
root@cnmc-kvm-test:/etc/sasl2# sasl-sample-server
sasl-sample-server: Allocating sasl connection state: generic failure

看了 archive.cyrus-sasl 上的討論,他說他看到 DNS 活動就在錯誤發生之前。我就靈機一動,因爲這臺 server 沒有 FQDN ,會不會是 DNS 的問題,於是我把 hostname 手動加到 /etc/hosts 當中:

192.168.1.5 cnmc-kvm-test

結果果真就好了!

得到的教訓是以後只要是 server ,DNS 都要先設定好…

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 變更 )

Twitter picture

You are commenting using your Twitter account. Log Out / 變更 )

Facebook照片

You are commenting using your Facebook account. Log Out / 變更 )

Google+ photo

You are commenting using your Google+ account. Log Out / 變更 )

連結到 %s