hudson.plugins.libvirt.lib.VirtException: java.lang.reflect.UndeclaredThrowableException

Jenkins JIRA | Debashis Prusty | 1 year ago
  1. 0

    I am able to do a "virsh connect qemu+ssh:" command line and is able to get console. While configuring if do not select "Use Native Java libvirt client" then, then during testing the connection I am getting the below error. org.libvirt.LibvirtException: Cannot recv data: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). : Connection reset by peer At the same time the daemon prints no messages (/var/log/messages at host). But if "Use Native Java libvirt client" is selected then, I could see messages like below at the host. Sep 29 15:20:01 XXX systemd: Starting Session 12256 of user root. Sep 29 15:20:01 XXX systemd: Started Session 12256 of user root. Sep 29 15:20:01 XXX systemd: Failed to reset devices.list on /machine.slice: Invalid argument But in Jenkins, I am getting the error "java.lang.reflect.UndeclaredThrowableException". Sep 29, 2015 3:24:45 PM net.schmizz.sshj.transport.TransportImpl init INFO: Client identity string: SSH-2.0-SSHJ_0_9_0 Sep 29, 2015 3:24:45 PM net.schmizz.sshj.transport.TransportImpl init INFO: Server identity string: SSH-2.0-OpenSSH_6.6.1 Sep 29, 2015 3:24:46 PM net.schmizz.sshj.connection.channel.direct.SessionChannel exec INFO: Will request to exec `netcat -U /var/run/libvirt/libvirt-sock` Sep 29, 2015 3:24:46 PM com.nirima.libvirt.xdr.XDRInvocationHandler invoke INFO: Invoking connectOpen Sep 29, 2015 3:24:46 PM hudson.plugins.libvirt.Hypervisor$DescriptorImpl doTestConnection WARNING: Failed to check hypervisor connection to 10.43.16.25 as root/****** hudson.plugins.libvirt.lib.VirtException: java.lang.reflect.UndeclaredThrowableException at hudson.plugins.libvirt.lib.jlibvirt.JLibVirtConnectImpl.<init>(JLibVirtConnectImpl.java:27) at hudson.plugins.libvirt.lib.ConnectionBuilder.build(ConnectionBuilder.java:87) at hudson.plugins.libvirt.Hypervisor$DescriptorImpl.doTestConnection(Hypervisor.java:455) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)

    Jenkins JIRA | 1 year ago | Debashis Prusty
    hudson.plugins.libvirt.lib.VirtException: java.lang.reflect.UndeclaredThrowableException
  2. 0

    I am able to do a "virsh connect qemu+ssh:" command line and is able to get console. While configuring if do not select "Use Native Java libvirt client" then, then during testing the connection I am getting the below error. org.libvirt.LibvirtException: Cannot recv data: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). : Connection reset by peer At the same time the daemon prints no messages (/var/log/messages at host). But if "Use Native Java libvirt client" is selected then, I could see messages like below at the host. Sep 29 15:20:01 XXX systemd: Starting Session 12256 of user root. Sep 29 15:20:01 XXX systemd: Started Session 12256 of user root. Sep 29 15:20:01 XXX systemd: Failed to reset devices.list on /machine.slice: Invalid argument But in Jenkins, I am getting the error "java.lang.reflect.UndeclaredThrowableException". Sep 29, 2015 3:24:45 PM net.schmizz.sshj.transport.TransportImpl init INFO: Client identity string: SSH-2.0-SSHJ_0_9_0 Sep 29, 2015 3:24:45 PM net.schmizz.sshj.transport.TransportImpl init INFO: Server identity string: SSH-2.0-OpenSSH_6.6.1 Sep 29, 2015 3:24:46 PM net.schmizz.sshj.connection.channel.direct.SessionChannel exec INFO: Will request to exec `netcat -U /var/run/libvirt/libvirt-sock` Sep 29, 2015 3:24:46 PM com.nirima.libvirt.xdr.XDRInvocationHandler invoke INFO: Invoking connectOpen Sep 29, 2015 3:24:46 PM hudson.plugins.libvirt.Hypervisor$DescriptorImpl doTestConnection WARNING: Failed to check hypervisor connection to 10.43.16.25 as root/****** hudson.plugins.libvirt.lib.VirtException: java.lang.reflect.UndeclaredThrowableException at hudson.plugins.libvirt.lib.jlibvirt.JLibVirtConnectImpl.<init>(JLibVirtConnectImpl.java:27) at hudson.plugins.libvirt.lib.ConnectionBuilder.build(ConnectionBuilder.java:87) at hudson.plugins.libvirt.Hypervisor$DescriptorImpl.doTestConnection(Hypervisor.java:455) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)

    Jenkins JIRA | 1 year ago | Debashis Prusty
    hudson.plugins.libvirt.lib.VirtException: java.lang.reflect.UndeclaredThrowableException

    Root Cause Analysis

    1. hudson.plugins.libvirt.lib.VirtException

      java.lang.reflect.UndeclaredThrowableException

      at hudson.plugins.libvirt.lib.jlibvirt.JLibVirtConnectImpl.<init>()
    2. hudson.plugins.libvirt
      Hypervisor$DescriptorImpl.doTestConnection
      1. hudson.plugins.libvirt.lib.jlibvirt.JLibVirtConnectImpl.<init>(JLibVirtConnectImpl.java:27)
      2. hudson.plugins.libvirt.lib.ConnectionBuilder.build(ConnectionBuilder.java:87)
      3. hudson.plugins.libvirt.Hypervisor$DescriptorImpl.doTestConnection(Hypervisor.java:455)
      3 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    4. Stapler
      MetaClass$1.doDispatch
      1. org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      2. org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      3. org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      4. org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
      4 frames