VMware {code} Community
yolaiyoqu
Contributor
Contributor

VDDK open disk failed when using nbdssl

I am testing the vddk library. The version is 6.5.

When I run the sample program to connect to an esxi server 6.5 to get disk info using the following command:

./vix-disklib-sample -info -host 192.168.1.158 -user root -password 123456 -thumb "FB:49:03:E3:32:04:17:81:D6:66:F6:13:8A:1A:29:1E:E2:98:40:95" "[datastore1] win7_x64/win7_x64.vmdk"

It fails with error: Error: [vixDiskLibSample.cpp:673]  36b9 The server refused connection.

But it works fine with esxi server 6.0 using the same command.

For the log, i think it may be caused by certificate, so I regenerate the certificate, but the error is the same.

Has someone met the same issue? Please help. thanks.

The error logs:

2017-05-09T09:21:07.692Z| vthread-4| I125: 2017-05-09T09:21:07.692Z VixDiskLibVim: VixDiskLibVim_Exit: Clean up.

2017-05-09T09:21:06.286Z| vthread-4| I125: Log for VMware Virtual Disk Development Kit pid=2373 version=6.5.0 build=build-4604867 option=Release
2017-05-09T09:21:06.286Z| vthread-4| I125: The process is 64-bit.
2017-05-09T09:21:06.286Z| vthread-4| I125: Host codepage=UTF-8 encoding=UTF-8
2017-05-09T09:21:06.286Z| vthread-4| I125: Host is Linux 4.4.0-72-generic Ubuntu 16.04.2 LTS
2017-05-09T09:21:06.403Z| vthread-4| I125: OBJLIB-LIB: Objlib initialized.
2017-05-09T09:21:06.403Z| vthread-4| I125: VixDiskLib: Advanced transport module not loaded.
2017-05-09T09:21:06.403Z| vthread-4| I125: VixDiskLib: Using transport modes from DiskLib: file:nbdssl:nbd.
2017-05-09T09:21:06.403Z| vthread-4| I125: VMware VixDiskLib (6.5) Release build-4604867
2017-05-09T09:21:06.403Z| vthread-4| I125: DictionaryLoad: Cannot open file "/etc/vmware/config": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: [msg.dictionary.load.openFailed] Cannot open file "/etc/vmware/config": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: PREF Optional preferences file not found at /etc/vmware/config. Using default values.
2017-05-09T09:21:06.403Z| vthread-4| I125: DictionaryLoad: Cannot open file "/usr/lib/vmware/settings": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: [msg.dictionary.load.openFailed] Cannot open file "/usr/lib/vmware/settings": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: PREF Optional preferences file not found at /usr/lib/vmware/settings. Using default values.
2017-05-09T09:21:06.403Z| vthread-4| I125: DictionaryLoad: Cannot open file "/usr/lib/vmware/config": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: [msg.dictionary.load.openFailed] Cannot open file "/usr/lib/vmware/config": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: PREF Optional preferences file not found at /usr/lib/vmware/config. Using default values.
2017-05-09T09:21:06.403Z| vthread-4| I125: DictionaryLoad: Cannot open file "/home/yoyo/.vmware/config": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: [msg.dictionary.load.openFailed] Cannot open file "/home/yoyo/.vmware/config": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: PREF Optional preferences file not found at /home/yoyo/.vmware/config. Using default values.
2017-05-09T09:21:06.403Z| vthread-4| I125: DictionaryLoad: Cannot open file "/home/yoyo/.vmware/preferences": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: [msg.dictionary.load.openFailed] Cannot open file "/home/yoyo/.vmware/preferences": No such file or directory.
2017-05-09T09:21:06.403Z| vthread-4| I125: PREF Optional preferences file not found at /home/yoyo/.vmware/preferences. Using default values.
2017-05-09T09:21:06.406Z| vthread-4| I125: lib/ssl: OpenSSL using FIPS_drbg for RAND
2017-05-09T09:21:06.406Z| vthread-4| I125: lib/ssl: protocol list tls1.2
2017-05-09T09:21:06.406Z| vthread-4| I125: lib/ssl: protocol list tls1.2 (openssl flags 0x17000000)
2017-05-09T09:21:06.406Z| vthread-4| I125: lib/ssl: cipher list !aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.422Z VixDiskLibVim: VixDiskLibVim_Init: Initialization is completed.
2017-05-09T09:21:06.423Z| vthread-4| I125: VixDiskLib: VixDiskLib_Connect: Establish connection.
2017-05-09T09:21:06.423Z| vthread-4| I125: VixDiskLib: Resolve host.
2017-05-09T09:21:06.423Z| vthread-4| I125: VixDiskLib: VixDiskLib_OpenEx: Open a disk.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z VixDiskLibVim: VixDiskLibVim_GetNfcTicket: Get NFC ticket for [datastore1] win7_x64/win7_x64.vmdk.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z DictionaryLoad: Cannot open file "/etc/vmware/config": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z [msg.dictionary.load.openFailed] Cannot open file "/etc/vmware/config": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z PREF Optional preferences file not found at /etc/vmware/config. Using default values.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z DictionaryLoad: Cannot open file "/usr/lib/vmware/settings": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z [msg.dictionary.load.openFailed] Cannot open file "/usr/lib/vmware/settings": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z PREF Optional preferences file not found at /usr/lib/vmware/settings. Using default values.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z DictionaryLoad: Cannot open file "/usr/lib/vmware/config": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z [msg.dictionary.load.openFailed] Cannot open file "/usr/lib/vmware/config": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z PREF Optional preferences file not found at /usr/lib/vmware/config. Using default values.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z DictionaryLoad: Cannot open file "/home/yoyo/.vmware/config": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z [msg.dictionary.load.openFailed] Cannot open file "/home/yoyo/.vmware/config": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z PREF Optional preferences file not found at /home/yoyo/.vmware/config. Using default values.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z DictionaryLoad: Cannot open file "/home/yoyo/.vmware/preferences": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z [msg.dictionary.load.openFailed] Cannot open file "/home/yoyo/.vmware/preferences": No such file or directory.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z PREF Optional preferences file not found at /home/yoyo/.vmware/preferences. Using default values.
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z lib/ssl: OpenSSL using FIPS_drbg for RAND
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z lib/ssl: protocol list tls1.2
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z lib/ssl: protocol list tls1.2 (openssl flags 0x17000000)
2017-05-09T09:21:06.423Z| vthread-4| I125: 2017-05-09T09:21:06.423Z lib/ssl: cipher list !aNULL:kECDH+AESGCM:ECDH+AESGCM:RSA+AESGCM:kECDH+AES:ECDH+AES:RSA+AES
2017-05-09T09:21:07.436Z| vthread-4| I125: 2017-05-09T09:21:07.436Z VixDiskLibVim: VixDiskLibVim_FreeNfcTicket: Free NFC ticket.
2017-05-09T09:21:07.436Z| vthread-4| I125: NBD_ClientOpen: attempting to create connection to ha-nfcssl://[datastore1] win7_x64/win7_x64.vmdk@192.168.1.158:902
2017-05-09T09:21:07.585Z| vthread-4| I125: CnxConnectAuthd: Returning false because CnxAuthdProtoConnect failed
2017-05-09T09:21:07.585Z| vthread-4| I125: Cnx_Connect: Returning false because CnxConnectAuthd failed
2017-05-09T09:21:07.585Z| vthread-4| I125: Cnx_Connect: Error message: 550 User not authorized for host agent contact
2017-05-09T09:21:07.585Z| vthread-4| W115: [NFC ERROR] NfcNewAuthdConnectionEx: Failed to connect to peer. Error: 550 User not authorized for host agent contact
2017-05-09T09:21:07.692Z| vthread-4| W115: SSL: Unknown SSL Error
2017-05-09T09:21:07.692Z| vthread-4| I125: SSL Error: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
2017-05-09T09:21:07.692Z| vthread-4| W115: SSL: connect failed (1)
2017-05-09T09:21:07.692Z| vthread-4| I125: CnxAuthdConnect: Returning false because SSL_ConnectAndVerify failed
2017-05-09T09:21:07.692Z| vthread-4| I125: CnxConnectAuthd: Returning false because CnxAuthdConnect failed
2017-05-09T09:21:07.692Z| vthread-4| I125: Cnx_Connect: Returning false because CnxConnectAuthd failed
2017-05-09T09:21:07.692Z| vthread-4| I125: Cnx_Connect: Error message: The remote host certificate has these problems:
2017-05-09T09:21:07.692Z| vthread-4| I125+
2017-05-09T09:21:07.692Z| vthread-4| I125+ * Host name does not match the subject name(s) in certificate.
2017-05-09T09:21:07.692Z| vthread-4| I125+
2017-05-09T09:21:07.692Z| vthread-4| I125+ * self signed certificate in certificate chain
2017-05-09T09:21:07.692Z| vthread-4| W115: [NFC ERROR] NfcNewAuthdConnectionEx: Failed to connect to peer. Error: The remote host certificate has these problems:
2017-05-09T09:21:07.692Z| vthread-4| W115+
2017-05-09T09:21:07.692Z| vthread-4| W115+ * Host name does not match the subject name(s) in certificate.
2017-05-09T09:21:07.692Z| vthread-4| W115+
2017-05-09T09:21:07.692Z| vthread-4| W115+ * self signed certificate in certificate chain
2017-05-09T09:21:07.692Z| vthread-4| I125: NBD_ClientOpen: Couldn't connect to 192.168.1.158:902 The remote host certificate has these problems:
2017-05-09T09:21:07.692Z| vthread-4| I125+
2017-05-09T09:21:07.692Z| vthread-4| I125+ * Host name does not match the subject name(s) in certificate.
2017-05-09T09:21:07.692Z| vthread-4| I125+
2017-05-09T09:21:07.692Z| vthread-4| I125+ * self signed certificate in certificate chain
2017-05-09T09:21:07.692Z| vthread-4| I125: DISKLIB-DSCPTR: : "ha-nfcssl://[datastore1] win7_x64/win7_x64.vmdk@192.168.1.158:902" : Failed to open NBD extent.
2017-05-09T09:21:07.692Z| vthread-4| I125: DISKLIB-LINK  : "ha-nfcssl://[datastore1] win7_x64/win7_x64.vmdk@192.168.1.158:902" : failed to open (NBD_ERR_NETWORK_CONNECT). 
2017-05-09T09:21:07.692Z| vthread-4| I125: DISKLIB-CHAIN : "ha-nfcssl://[datastore1] win7_x64/win7_x64.vmdk@192.168.1.158:902" : failed to open (NBD_ERR_NETWORK_CONNECT).
2017-05-09T09:21:07.692Z| vthread-4| I125: DISKLIB-LIB   : Failed to open 'ha-nfcssl://[datastore1] win7_x64/win7_x64.vmdk@192.168.1.158:902' with flags 0x1e NBD_ERR_NETWORK_CONNECT (2338).
2017-05-09T09:21:07.692Z| vthread-4| E110: VixDiskLib: Detected DiskLib error 2338 (NBD_ERR_NETWORK_CONNECT).
2017-05-09T09:21:07.692Z| vthread-4| E110: VixDiskLib: Failed to open disk ha-nfcssl://[datastore1] win7_x64/win7_x64.vmdk@192.168.1.158:902?root/nawangebeim. Error 14009 (The server refused connection) (DiskLib error 2338: NBD_ERR_NETWORK_CONNECT) at 4737.
2017-05-09T09:21:07.692Z| vthread-4| E110: VixDiskLib: VixDiskLib_OpenEx: Cannot open disk [datastore1] win7_x64/win7_x64.vmdk. Error 14009 (The server refused connection) (DiskLib error 2338: NBD_ERR_NETWORK_CONNECT) at 4964.
2017-05-09T09:21:07.692Z| vthread-4| E110: VixDiskLib: VixDiskLib_Open: Cannot open disk [datastore1] win7_x64/win7_x64.vmdk. Error 14009 (The server refused connection) at 5002.
2017-05-09T09:21:07.692Z| vthread-4| I125: VixDiskLib: VixDiskLib_Disconnect: Disconnect.
2017-05-09T09:21:07.692Z| vthread-4| I125: VixDiskLib: VixDiskLib_Exit: Unmatched Init calls so far: 1.
2017-05-09T09:21:07.692Z| vthread-4| I125: 2017-05-09T09:21:07.692Z VixDiskLibVim: VixDiskLibVim_Exit: Clean up.

0 Kudos
3 Replies
gangan2000
Contributor
Contributor

Hi Yolaiyqu,

Did you resolve this issue? I am getting the same errors. Using VDDK 5.5.0 U2 to connect ESXi 6.5.

Thanks in Advance.

0 Kudos
yolaiyoqu
Contributor
Contributor

It's a pity we haven't resolve it.
0 Kudos
cpatidar
VMware Employee
VMware Employee

yolaiyoqugangan2000

This could be network problem. As we could see other logs (hostd, vmauthd.. etc) to cross verify the log entries with the different sets of logs, at the time when issue was reproduced. Hence its would be difficult to judge the a root cause of this issue.

-----------

2017-05-09T09:21:07.692Z| vthread-4| I125: CnxAuthdConnect: Returning false because SSL_ConnectAndVerify failed

2017-05-09T09:21:07.692Z| vthread-4| I125: CnxConnectAuthd: Returning false because CnxAuthdConnect failed

2017-05-09T09:21:07.692Z| vthread-4| I125: Cnx_Connect: Returning false because CnxConnectAuthd failed

-----------

Would be great if you can file a SR with SDK support.

Thanks

0 Kudos