Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23788

EC2 plugin regression: fails to launch nodes with "syntax error near unexpected token `newline'"


    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • ec2-plugin
    • Jenkins 1.572, EC2 plugin 1.23, Node Iterator API Plugin 1.

      The latest EC2 plugin seems to have broken node launch.

      With 1.21 nodes used to provision correctly from Manage Nodes or on-demand (though, per Issue JENKINS-23787 they weren't spooled up correctly after stopping on idle).

      Now, launch of new nodes or starting existing nodes is failing with:

      Starting existing instance: i-b848fbfa result:{StartingInstances: [{InstanceId: i-b848fbfa,CurrentState: {Code: 0,Name: pending},PreviousState: {Code: 80,Name: stopped}}]}
      Connecting to on port 22, with timeout 10000.
      Waiting for SSH to come up. Sleeping 5.
      Connecting to on port 22, with timeout 10000.
      Connected via SSH.
      Getting keypair...
      Using key: jenkins_ec2_key
      -----BEGIN RSA PRIVATE KEY-----
      Authenticating as ec2-user
      take over connection
      Executing init script
      bash: line 1: syntax error near unexpected token `newline'
      bash: line 1: `<?xml version="1.0" encoding="UTF-8"?>'
      init script failed: exit code=2

      It looks like the plugin is trying to execute some XML as a script.

      The Jenkins logs contain:

      Jul 15, 2014 4:05:04 AM SEVERE hudson.remoting.ExportTable unexportByOid
      Trying to unexport an object that's already unexported
      java.lang.IllegalStateException: Invalid object ID 112 iota=82
      	at hudson.remoting.ExportTable.diagnoseInvalidId(ExportTable.java:304)
      	at hudson.remoting.ExportTable.unexportByOid(ExportTable.java:327)
      	at hudson.remoting.Channel.unexport(Channel.java:600)
      	at hudson.remoting.UnexportCommand.execute(UnexportCommand.java:38)
      	at hudson.remoting.Channel$2.handle(Channel.java:475)
      	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:60)
      Caused by: java.lang.Exception: Object appears to be deallocated at lease before Tue Jul 15 01:55:05 UTC 2014
      	at hudson.remoting.ExportTable.diagnoseInvalidId(ExportTable.java:300)
      	... 5 more
      Jul 15, 2014 4:05:04 AM SEVERE hudson.remoting.ExportTable unexportByOid
      2nd unexport attempt is here
      Command hudson.remoting.UnexportCommand@7b9fbccc created at
      	at hudson.remoting.Command.<init>(Command.java:67)
      	at hudson.remoting.Command.<init>(Command.java:50)
      	at hudson.remoting.UnexportCommand.<init>(UnexportCommand.java:33)
      	at hudson.remoting.RemoteInvocationHandler.finalize(RemoteInvocationHandler.java:221)
      	at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
      	at java.lang.ref.Finalizer.runFinalizer(Unknown Source)
      	at java.lang.ref.Finalizer.access$100(Unknown Source)
      	at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

      though it's not clear if that's related.

            ringerc Craig Ringer
            ringerc Craig Ringer
            0 Vote for this issue
            1 Start watching this issue