Nick Mathews
2012-Jun-27 15:28 UTC
[libvirt-users] Trouble connecting to XenServer HyperVisor with Java bindings
Hello, I am trying to use the libvirt Java bindings (version 0.4.7) with libvirt version 0.9.12 to connect to a XenServer hypervisor. Virsh is able to connect to my XenServer, but when I try to do the same thing in Java, it won't connect. Here is the debug output: 2012-06-26 19:48:52.259+0000: 26051: info : libvirt version: 0.9.12, package: 1.fc16 (Unknown, 2012-06-26-11:43:53, flynx) 2012-06-26 19:48:52.259+0000: 26051: warning : virLogParseOutputs:993 : Ignoring invalid log output setting. WARNING: no socket to connect to 2012-06-26 19:48:52.275+0000: 26051: debug : virInitialize:414 : register drivers 2012-06-26 19:48:52.277+0000: 26051: debug : virRegisterDriver:775 : driver=0x4dad5a0 name=Test 2012-06-26 19:48:52.277+0000: 26051: debug : virRegisterDriver:799 : registering Test as driver 0 2012-06-26 19:48:52.277+0000: 26051: debug : virRegisterNetworkDriver:592 : registering Test as network driver 0 2012-06-26 19:48:52.277+0000: 26051: debug : virRegisterInterfaceDriver:625 : registering Test as interface driver 0 2012-06-26 19:48:52.277+0000: 26051: debug : virRegisterStorageDriver:658 : registering Test as storage driver 0 2012-06-26 19:48:52.277+0000: 26051: debug : virRegisterDeviceMonitor:691 : registering Test as device driver 0 2012-06-26 19:48:52.277+0000: 26051: debug : virRegisterSecretDriver:724 : registering Test as secret driver 0 2012-06-26 19:48:52.277+0000: 26051: debug : virRegisterNWFilterDriver:757 : registering Test as network filter driver 0 2012-06-26 19:48:52.279+0000: 26051: debug : virRegisterDriver:775 : driver=0x4dae100 name=Xen 2012-06-26 19:48:52.280+0000: 26051: debug : virRegisterDriver:799 : registering Xen as driver 1 2012-06-26 19:48:52.283+0000: 26051: debug : virRegisterDriver:775 : driver=0x4dae960 name=OPENVZ 2012-06-26 19:48:52.283+0000: 26051: debug : virRegisterDriver:799 : registering OPENVZ as driver 2 2012-06-26 19:48:52.283+0000: 26051: debug : virRegisterDriver:775 : driver=0x4daec00 name=VMWARE 2012-06-26 19:48:52.283+0000: 26051: debug : virRegisterDriver:799 : registering VMWARE as driver 3 2012-06-26 19:48:52.283+0000: 26051: debug : virRegisterDriver:775 : driver=0x4dae5a0 name=PHYP 2012-06-26 19:48:52.284+0000: 26051: debug : virRegisterDriver:799 : registering PHYP as driver 4 2012-06-26 19:48:52.284+0000: 26051: debug : virRegisterStorageDriver:658 : registering PHYP as storage driver 1 2012-06-26 19:48:52.285+0000: 26051: debug : virRegisterInterfaceDriver:625 : registering PHYP as interface driver 1 2012-06-26 19:48:52.286+0000: 26051: debug : vboxRegister:137 : VBoxCGlueInit failed, using dummy driver 2012-06-26 19:48:52.286+0000: 26051: debug : virRegisterDriver:775 : driver=0x4daeea0 name=VBOX 2012-06-26 19:48:52.287+0000: 26051: debug : virRegisterDriver:799 : registering VBOX as driver 5 2012-06-26 19:48:52.287+0000: 26051: debug : virRegisterNetworkDriver:592 : registering VBOX as network driver 1 2012-06-26 19:48:52.287+0000: 26051: debug : virRegisterStorageDriver:658 : registering VBOX as storage driver 2 2012-06-26 19:48:52.290+0000: 26051: debug : virRegisterDriver:775 : driver=0x4db0a60 name=ESX 2012-06-26 19:48:52.290+0000: 26051: debug : virRegisterDriver:799 : registering ESX as driver 6 2012-06-26 19:48:52.291+0000: 26051: debug : virRegisterInterfaceDriver:625 : registering ESX as interface driver 2 2012-06-26 19:48:52.292+0000: 26051: debug : virRegisterNetworkDriver:592 : registering ESX as network driver 2 2012-06-26 19:48:52.293+0000: 26051: debug : virRegisterStorageDriver:658 : registering ESX as storage driver 3 2012-06-26 19:48:52.294+0000: 26051: debug : virRegisterDeviceMonitor:691 : registering ESX as device driver 1 2012-06-26 19:48:52.294+0000: 26051: debug : virRegisterSecretDriver:724 : registering ESX as secret driver 1 2012-06-26 19:48:52.294+0000: 26051: debug : virRegisterNWFilterDriver:757 : registering ESX as network filter driver 1 2012-06-26 19:48:52.296+0000: 26051: debug : virRegisterDriver:775 : driver=0x4db0f40 name=Hyper-V 2012-06-26 19:48:52.297+0000: 26051: debug : virRegisterDriver:799 : registering Hyper-V as driver 7 2012-06-26 19:48:52.297+0000: 26051: debug : virRegisterInterfaceDriver:625 : registering Hyper-V as interface driver 3 2012-06-26 19:48:52.298+0000: 26051: debug : virRegisterNetworkDriver:592 : registering Hyper-V as network driver 3 2012-06-26 19:48:52.299+0000: 26051: debug : virRegisterStorageDriver:658 : registering Hyper-V as storage driver 4 2012-06-26 19:48:52.299+0000: 26051: debug : virRegisterDeviceMonitor:691 : registering Hyper-V as device driver 2 2012-06-26 19:48:52.299+0000: 26051: debug : virRegisterSecretDriver:724 : registering Hyper-V as secret driver 2 2012-06-26 19:48:52.300+0000: 26051: debug : virRegisterNWFilterDriver:757 : registering Hyper-V as network filter driver 2 2012-06-26 19:48:52.300+0000: 26051: debug : virRegisterDriver:775 : driver=0x4db07c0 name=XenAPI 2012-06-26 19:48:52.301+0000: 26051: debug : virRegisterDriver:799 : registering XenAPI as driver 8 2012-06-26 19:48:52.305+0000: 26051: debug : virRegisterDriver:775 : driver=0x4dada80 name=remote 2012-06-26 19:48:52.305+0000: 26051: debug : virRegisterDriver:799 : registering remote as driver 9 2012-06-26 19:48:52.305+0000: 26051: debug : virRegisterNetworkDriver:592 : registering remote as network driver 4 2012-06-26 19:48:52.306+0000: 26051: debug : virRegisterInterfaceDriver:625 : registering remote as interface driver 4 2012-06-26 19:48:52.306+0000: 26051: debug : virRegisterStorageDriver:658 : registering remote as storage driver 5 2012-06-26 19:48:52.306+0000: 26051: debug : virRegisterDeviceMonitor:691 : registering remote as device driver 3 2012-06-26 19:48:52.306+0000: 26051: debug : virRegisterSecretDriver:724 : registering remote as secret driver 3 2012-06-26 19:48:52.306+0000: 26051: debug : virRegisterNWFilterDriver:757 : registering remote as network filter driver 3 2012-06-26 19:48:52.395+0000: 26051: debug : virConnectOpenAuth:1455 : name=xenapi://root at 192.168.1.6?no_verify=1, auth=0x8beed7c0, flags=0 2012-06-26 19:48:52.643+0000: 26051: debug : virConnectGetConfigFile:1008 : Loading config file '/etc/libvirt/libvirt.conf' 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1182 : name "xenapi:// root at 192.168.1.6?no_verify=1" to URI components: scheme xenapi server 192.168.1.6 user root port 0 path (null) 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1226 : trying driver 0 (Test) ... 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1232 : driver 0 Test returned DECLINED 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1226 : trying driver 1 (Xen) ... 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1232 : driver 1 Xen returned DECLINED 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1226 : trying driver 2 (OPENVZ) ... 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1232 : driver 2 OPENVZ returned DECLINED 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1226 : trying driver 3 (VMWARE) ... 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1232 : driver 3 VMWARE returned DECLINED 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1226 : trying driver 4 (PHYP) ... 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1232 : driver 4 PHYP returned DECLINED 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1226 : trying driver 5 (VBOX) ... 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1232 : driver 5 VBOX returned DECLINED 2012-06-26 19:48:52.647+0000: 26051: debug : do_open:1226 : trying driver 6 (ESX) ... 2012-06-26 19:48:52.648+0000: 26051: debug : do_open:1232 : driver 6 ESX returned DECLINED 2012-06-26 19:48:52.648+0000: 26051: debug : do_open:1226 : trying driver 7 (Hyper-V) ... 2012-06-26 19:48:52.648+0000: 26051: debug : do_open:1232 : driver 7 Hyper-V returned DECLINED 2012-06-26 19:48:52.649+0000: 26051: debug : do_open:1226 : trying driver 8 (XenAPI) ... 2012-06-26 19:48:52.649+0000: 26051: debug : virAuthGetConfigFilePath:48 : Determining auth config file path 2012-06-26 19:48:52.651+0000: 26051: debug : virAuthGetConfigFilePath:74 : Checking for readability of '/root/.libvirt/auth.conf' 2012-06-26 19:48:52.652+0000: 26051: debug : virAuthGetConfigFilePath:83 : Checking for readability of '/etc/libvirt/auth.conf' 2012-06-26 19:48:52.653+0000: 26051: debug : virAuthGetConfigFilePath:92 : Using auth file '(null)' 2012-06-26 19:48:53.279+0000: 26051: debug : do_open:1232 : driver 8 XenAPI returned SUCCESS 2012-06-26 19:48:53.279+0000: 26051: debug : do_open:1254 : network driver 0 Test returned DECLINED 2012-06-26 19:48:53.279+0000: 26051: debug : do_open:1254 : network driver 1 VBOX returned DECLINED 2012-06-26 19:48:53.279+0000: 26051: debug : do_open:1254 : network driver 2 ESX returned DECLINED 2012-06-26 19:48:53.279+0000: 26051: debug : do_open:1254 : network driver 3 Hyper-V returned DECLINED 2012-06-26 19:48:53.279+0000: 26051: debug : doRemoteOpen:542 : proceeding with name = xenapi:// 2012-06-26 19:48:53.280+0000: 26051: debug : doRemoteOpen:552 : Connecting with transport 0 2012-06-26 19:48:53.280+0000: 26051: debug : virNetTLSContextLocateCredentials:753 : pkipath=(null) isServer=0 tryUserPkiPath=0 2012-06-26 19:48:53.280+0000: 26051: debug : virNetTLSContextLocateCredentials:825 : Using default TLS CA certificate path 2012-06-26 19:48:53.280+0000: 26051: debug : virNetTLSContextLocateCredentials:831 : Using default TLS CA revocation list path 2012-06-26 19:48:53.280+0000: 26051: debug : virNetTLSContextLocateCredentials:837 : Using default TLS key/certificate path 2012-06-26 19:48:53.306+0000: 26051: debug : virNetClientClose:521 : client=(nil) 2012-06-26 19:48:53.306+0000: 26051: debug : do_open:1254 : network driver 4 remote returned ERROR 2012-06-26 19:48:53.306+0000: 26051: debug : do_open:1269 : interface driver 0 Test returned DECLINED 2012-06-26 19:48:53.306+0000: 26051: debug : do_open:1269 : interface driver 1 PHYP returned DECLINED 2012-06-26 19:48:53.307+0000: 26051: debug : do_open:1269 : interface driver 2 ESX returned DECLINED 2012-06-26 19:48:53.307+0000: 26051: debug : do_open:1269 : interface driver 3 Hyper-V returned DECLINED 2012-06-26 19:48:53.307+0000: 26051: debug : doRemoteOpen:542 : proceeding with name = xenapi:// 2012-06-26 19:48:53.307+0000: 26051: debug : doRemoteOpen:552 : Connecting with transport 0 2012-06-26 19:48:53.307+0000: 26051: debug : virNetTLSContextLocateCredentials:753 : pkipath=(null) isServer=0 tryUserPkiPath=0 2012-06-26 19:48:53.307+0000: 26051: debug : virNetTLSContextLocateCredentials:825 : Using default TLS CA certificate path 2012-06-26 19:48:53.307+0000: 26051: debug : virNetTLSContextLocateCredentials:831 : Using default TLS CA revocation list path 2012-06-26 19:48:53.307+0000: 26051: debug : virNetTLSContextLocateCredentials:837 : Using default TLS key/certificate path 2012-06-26 19:48:53.308+0000: 26051: debug : virNetClientClose:521 : client=(nil) 2012-06-26 19:48:53.308+0000: 26051: debug : do_open:1269 : interface driver 4 remote returned ERROR 2012-06-26 19:48:53.308+0000: 26051: debug : do_open:1285 : storage driver 0 Test returned DECLINED 2012-06-26 19:48:53.308+0000: 26051: debug : do_open:1285 : storage driver 1 PHYP returned DECLINED 2012-06-26 19:48:53.308+0000: 26051: debug : do_open:1285 : storage driver 2 VBOX returned DECLINED 2012-06-26 19:48:53.308+0000: 26051: debug : do_open:1285 : storage driver 3 ESX returned DECLINED 2012-06-26 19:48:53.308+0000: 26051: debug : do_open:1285 : storage driver 4 Hyper-V returned DECLINED 2012-06-26 19:48:53.308+0000: 26051: debug : doRemoteOpen:542 : proceeding with name = xenapi:// 2012-06-26 19:48:53.308+0000: 26051: debug : doRemoteOpen:552 : Connecting with transport 0 2012-06-26 19:48:53.308+0000: 26051: debug : virNetTLSContextLocateCredentials:753 : pkipath=(null) isServer=0 tryUserPkiPath=0 2012-06-26 19:48:53.308+0000: 26051: debug : virNetTLSContextLocateCredentials:825 : Using default TLS CA certificate path 2012-06-26 19:48:53.308+0000: 26051: debug : virNetTLSContextLocateCredentials:831 : Using default TLS CA revocation list path 2012-06-26 19:48:53.308+0000: 26051: debug : virNetTLSContextLocateCredentials:837 : Using default TLS key/certificate path 2012-06-26 19:48:53.309+0000: 26051: debug : virNetClientClose:521 : client=(nil) 2012-06-26 19:48:53.309+0000: 26051: debug : do_open:1285 : storage driver 5 remote returned ERROR 2012-06-26 19:48:53.309+0000: 26051: debug : do_open:1301 : node driver 0 Test returned DECLINED 2012-06-26 19:48:53.309+0000: 26051: debug : do_open:1301 : node driver 1 ESX returned DECLINED 2012-06-26 19:48:53.309+0000: 26051: debug : do_open:1301 : node driver 2 Hyper-V returned DECLINED 2012-06-26 19:48:53.309+0000: 26051: debug : doRemoteOpen:542 : proceeding with name = xenapi:// 2012-06-26 19:48:53.309+0000: 26051: debug : doRemoteOpen:552 : Connecting with transport 0 2012-06-26 19:48:53.309+0000: 26051: debug : virNetTLSContextLocateCredentials:753 : pkipath=(null) isServer=0 tryUserPkiPath=0 2012-06-26 19:48:53.309+0000: 26051: debug : virNetTLSContextLocateCredentials:825 : Using default TLS CA certificate path 2012-06-26 19:48:53.309+0000: 26051: debug : virNetTLSContextLocateCredentials:831 : Using default TLS CA revocation list path 2012-06-26 19:48:53.309+0000: 26051: debug : virNetTLSContextLocateCredentials:837 : Using default TLS key/certificate path 2012-06-26 19:48:53.309+0000: 26051: debug : virNetClientClose:521 : client=(nil) 2012-06-26 19:48:53.310+0000: 26051: debug : do_open:1301 : node driver 3 remote returned ERROR 2012-06-26 19:48:53.310+0000: 26051: debug : do_open:1317 : secret driver 0 Test returned DECLINED 2012-06-26 19:48:53.310+0000: 26051: debug : do_open:1317 : secret driver 1 ESX returned DECLINED 2012-06-26 19:48:53.310+0000: 26051: debug : do_open:1317 : secret driver 2 Hyper-V returned DECLINED 2012-06-26 19:48:53.310+0000: 26051: debug : doRemoteOpen:542 : proceeding with name = xenapi:// 2012-06-26 19:48:53.310+0000: 26051: debug : doRemoteOpen:552 : Connecting with transport 0 2012-06-26 19:48:53.310+0000: 26051: debug : virNetTLSContextLocateCredentials:753 : pkipath=(null) isServer=0 tryUserPkiPath=0 2012-06-26 19:48:53.310+0000: 26051: debug : virNetTLSContextLocateCredentials:825 : Using default TLS CA certificate path 2012-06-26 19:48:53.310+0000: 26051: debug : virNetTLSContextLocateCredentials:831 : Using default TLS CA revocation list path 2012-06-26 19:48:53.311+0000: 26051: debug : virNetTLSContextLocateCredentials:837 : Using default TLS key/certificate path 2012-06-26 19:48:53.311+0000: 26051: debug : virNetClientClose:521 : client=(nil) 2012-06-26 19:48:53.311+0000: 26051: debug : do_open:1317 : secret driver 3 remote returned ERROR 2012-06-26 19:48:53.311+0000: 26051: debug : do_open:1333 : nwfilter driver 0 Test returned DECLINED 2012-06-26 19:48:53.311+0000: 26051: debug : do_open:1333 : nwfilter driver 1 ESX returned DECLINED 2012-06-26 19:48:53.311+0000: 26051: debug : do_open:1333 : nwfilter driver 2 Hyper-V returned DECLINED 2012-06-26 19:48:53.311+0000: 26051: debug : doRemoteOpen:542 : proceeding with name = xenapi:// 2012-06-26 19:48:53.311+0000: 26051: debug : doRemoteOpen:552 : Connecting with transport 0 2012-06-26 19:48:53.311+0000: 26051: debug : virNetTLSContextLocateCredentials:753 : pkipath=(null) isServer=0 tryUserPkiPath=0 2012-06-26 19:48:53.311+0000: 26051: debug : virNetTLSContextLocateCredentials:825 : Using default TLS CA certificate path 2012-06-26 19:48:53.312+0000: 26051: debug : virNetTLSContextLocateCredentials:831 : Using default TLS CA revocation list path 2012-06-26 19:48:53.312+0000: 26051: debug : virNetTLSContextLocateCredentials:837 : Using default TLS key/certificate path 2012-06-26 19:48:53.313+0000: 26051: debug : virNetClientClose:521 : client=(nil) 2012-06-26 19:48:53.313+0000: 26051: debug : do_open:1333 : nwfilter driver 3 remote returned ERROR Unable to connect: Cannot read CA certificate '/etc/pki/CA/cacert.pem': No such file or directory Even though the output mentions not finding a CA certificate, that's not the problem. I have a custom ConnectAuth class so the user can give the password before trying to connect and isn't prompted for it. The problem occurs when trying to create the Connect Object. -- Thanks, Nick Mathews -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20120627/cb7a9b4e/attachment.htm>