java.lang.NullPointerException

Jenkins JIRA | michael d | 4 years ago
  1. 0

    Steps to reproduce : * Create a new cloud in jenkins settings * Create a new slave to use the cloud configured earlier with a machine name * And a snapshot name to revert to on launch (force vm launch = true) * Test the configuration and get "Virtual Machine found successfully" * Launch the slave and nothing is written to the log. just the animated sphere is rolling but nothing there * Note: This happens only when setting a snapshot. without a snapshot everything works fine. Check with Jenkins log file and see the following loop: {noformat}INFO: [vsphere] Starting Virtual Machine... Mar 6, 2013 10:24:21 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Reverting to snapshot:michael Mar 6, 2013 10:26:21 AM hudson.slaves.SlaveComputer tryReconnect INFO: Attempting to reconnect vsphere{noformat} Looking at vsphere events, I can see the user logs in and logs out, If I look into the specific machine events list I don't see anything. Also tried, as suggested by plugin owner, to Set the slave to no snapshot. Get it running and connected. Then, while connected, set the snapshot to a valid value. Also, set the "What to do when the slave is disconnected" to "Shutdown and Revert". Then disconnect the slave (kill the slave agent or hit Disconnect in Jenkins). See if both the power down AND revert commands are sent to the VM by looking at the vSphere task list. Results: from Jenkins log file i see : {noformat}INFO: [vsphere] Running disconnect procedure... Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Shutting down Virtual Machine... Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Powering down hard Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Got an exception Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] com.vmware.vim25.RestrictedVersion Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Printed exception Mar 6, 2013 10:19:50 AM hudson.remoting.Channel$2 handle SEVERE: Failed to execute command close (channel vsphere) java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at java.util.Formatter.parse(Formatter.java:2458) at java.util.Formatter.format(Formatter.java:2414) at java.util.Formatter.format(Formatter.java:2367) at java.lang.String.format(String.java:2769) at hudson.util.StreamTaskListener.fatalError(StreamTaskListener.java:153) at org.jenkinsci.plugins.vSphereCloudLauncher.afterDisconnect(vSphereCloudLauncher.java:335) at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:419) at hudson.remoting.Channel.terminate(Channel.java:749) at hudson.remoting.Channel$CloseCommand.execute(Channel.java:850) at hudson.remoting.Channel$2.handle(Channel.java:435) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60) Mar 6, 2013 10:19:50 AM hudson.remoting.Channel$2 handle SEVERE: This command is created here Command close created at at hudson.remoting.Command.<init>(Command.java:56) at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:844) at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:842) at hudson.remoting.Channel.close(Channel.java:909) at hudson.remoting.Channel.close(Channel.java:892) at hudson.remoting.Channel$CloseCommand.execute(Channel.java:849) at hudson.remoting.Channel$2.handle(Channel.java:435) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60) Mar 6, 2013 10:20:21 AM hudson.slaves.SlaveComputer tryReconnect INFO: Attempting to reconnect vsphere Mar 6, 2013 10:20:21 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Starting Virtual Machine... Mar 6, 2013 10:20:21 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Reverting to snapshot:michael{noformat} From the vsphere event list i don't see the shut down event or the snapshot

    Jenkins JIRA | 4 years ago | michael d
    java.lang.NullPointerException
  2. 0

    Steps to reproduce : * Create a new cloud in jenkins settings * Create a new slave to use the cloud configured earlier with a machine name * And a snapshot name to revert to on launch (force vm launch = true) * Test the configuration and get "Virtual Machine found successfully" * Launch the slave and nothing is written to the log. just the animated sphere is rolling but nothing there * Note: This happens only when setting a snapshot. without a snapshot everything works fine. Check with Jenkins log file and see the following loop: {noformat}INFO: [vsphere] Starting Virtual Machine... Mar 6, 2013 10:24:21 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Reverting to snapshot:michael Mar 6, 2013 10:26:21 AM hudson.slaves.SlaveComputer tryReconnect INFO: Attempting to reconnect vsphere{noformat} Looking at vsphere events, I can see the user logs in and logs out, If I look into the specific machine events list I don't see anything. Also tried, as suggested by plugin owner, to Set the slave to no snapshot. Get it running and connected. Then, while connected, set the snapshot to a valid value. Also, set the "What to do when the slave is disconnected" to "Shutdown and Revert". Then disconnect the slave (kill the slave agent or hit Disconnect in Jenkins). See if both the power down AND revert commands are sent to the VM by looking at the vSphere task list. Results: from Jenkins log file i see : {noformat}INFO: [vsphere] Running disconnect procedure... Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Shutting down Virtual Machine... Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Powering down hard Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Got an exception Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] com.vmware.vim25.RestrictedVersion Mar 6, 2013 10:19:50 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Printed exception Mar 6, 2013 10:19:50 AM hudson.remoting.Channel$2 handle SEVERE: Failed to execute command close (channel vsphere) java.lang.NullPointerException at java.util.regex.Matcher.getTextLength(Matcher.java:1140) at java.util.regex.Matcher.reset(Matcher.java:291) at java.util.regex.Matcher.<init>(Matcher.java:211) at java.util.regex.Pattern.matcher(Pattern.java:888) at java.util.Formatter.parse(Formatter.java:2458) at java.util.Formatter.format(Formatter.java:2414) at java.util.Formatter.format(Formatter.java:2367) at java.lang.String.format(String.java:2769) at hudson.util.StreamTaskListener.fatalError(StreamTaskListener.java:153) at org.jenkinsci.plugins.vSphereCloudLauncher.afterDisconnect(vSphereCloudLauncher.java:335) at hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:419) at hudson.remoting.Channel.terminate(Channel.java:749) at hudson.remoting.Channel$CloseCommand.execute(Channel.java:850) at hudson.remoting.Channel$2.handle(Channel.java:435) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60) Mar 6, 2013 10:19:50 AM hudson.remoting.Channel$2 handle SEVERE: This command is created here Command close created at at hudson.remoting.Command.<init>(Command.java:56) at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:844) at hudson.remoting.Channel$CloseCommand.<init>(Channel.java:842) at hudson.remoting.Channel.close(Channel.java:909) at hudson.remoting.Channel.close(Channel.java:892) at hudson.remoting.Channel$CloseCommand.execute(Channel.java:849) at hudson.remoting.Channel$2.handle(Channel.java:435) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60) Mar 6, 2013 10:20:21 AM hudson.slaves.SlaveComputer tryReconnect INFO: Attempting to reconnect vsphere Mar 6, 2013 10:20:21 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Starting Virtual Machine... Mar 6, 2013 10:20:21 AM org.jenkinsci.plugins.vSphereCloud InternalLog INFO: [vsphere] Reverting to snapshot:michael{noformat} From the vsphere event list i don't see the shut down event or the snapshot

    Jenkins JIRA | 4 years ago | michael d
    java.lang.NullPointerException
  3. 0

    Throw Exception with Jrockit 1.6 "Trying to get a virtual dispatch offset ..."

    GitHub | 1 year ago | erolg
    java.lang.ExceptionInInitializerError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java String format(Locale l,String format,Object.... args) method example

    javatutorialhq.com | 4 months ago
    java.lang.NullPointerException

    4 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at java.util.regex.Matcher.getTextLength()
    2. Java RT
      String.format
      1. java.util.regex.Matcher.getTextLength(Matcher.java:1140)
      2. java.util.regex.Matcher.reset(Matcher.java:291)
      3. java.util.regex.Matcher.<init>(Matcher.java:211)
      4. java.util.regex.Pattern.matcher(Pattern.java:888)
      5. java.util.Formatter.parse(Formatter.java:2458)
      6. java.util.Formatter.format(Formatter.java:2414)
      7. java.util.Formatter.format(Formatter.java:2367)
      8. java.lang.String.format(String.java:2769)
      8 frames
    3. Hudson
      StreamTaskListener.fatalError
      1. hudson.util.StreamTaskListener.fatalError(StreamTaskListener.java:153)
      1 frame
    4. org.jenkinsci.plugins
      vSphereCloudLauncher.afterDisconnect
      1. org.jenkinsci.plugins.vSphereCloudLauncher.afterDisconnect(vSphereCloudLauncher.java:335)
      1 frame
    5. Hudson
      SlaveComputer$2.onClosed
      1. hudson.slaves.SlaveComputer$2.onClosed(SlaveComputer.java:419)
      1 frame
    6. Hudson :: Remoting Layer
      SynchronousCommandTransport$ReaderThread.run
      1. hudson.remoting.Channel.terminate(Channel.java:749)
      2. hudson.remoting.Channel$CloseCommand.execute(Channel.java:850)
      3. hudson.remoting.Channel$2.handle(Channel.java:435)
      4. hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
      4 frames