java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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
    via by michael d,
  • 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
    via by michael d,
  • test method with multiple catch blocks
    via by Unknown author,
  • GitHub comment 73#30383063
    via GitHub by mwkaicz
    ,
  • GitHub comment 15#14665809
    via GitHub by fru1tstand
    ,
    • 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)

    Users with the same issue

    tvrmsmithtvrmsmith
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor2 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    21 more bugmates