Uploaded image for project: 'Bamboo'
  1. Bamboo
  2. BAM-16605

Elastic instance startup scripts fail to run with "Unsupported major.minor version 52.0"

    XMLWordPrintable

    Details

      Description

      Steps to reproduce

      1. Start an instance with Bamboo 5.10-OD-05-003.
      2. Configure Elastic Bamboo.
      3. Edit the Stock Ubuntu image (AMI ID ami-55f5a530) and add an instance startup script (it can be anything, even just ls -l /).
      4. Start a new instance using that image.

      Expected results

      The instance starts up and the startup script is run.

      Actual results

      The instances starts up but the startup scripts fail to run. In the EC2 console logs in Bamboo, you can see the following lines:

      [...]
      [   93.920614] cloud-init[944]: Generating locales...
      [   94.628812] cloud-init[944]: en_US.UTF-8... up-to-date
      [   94.644366] cloud-init[944]: Generation complete.
      
      
      Ubuntu 15.04 ip-10-170-56-202 hvc0
      
      ip-10-170-56-202 login: [   99.115032] cloud-init[944]: Cloud-init v. 0.7.7 running 'modules:config' at Mon, 02 Nov 2015 04:41:15 +0000. Up 91.14 seconds.
      [  109.360346] cloud-init[1030]: Host ip-10-170-56-202 resolves OK.
      [  109.383856] cloud-init[1030]: mount: /dev/xvdb is already mounted or /mnt busy
      [  109.384496] cloud-init[1030]: /dev/xvdb is already mounted on /mnt
      [  109.386569] cloud-init[1030]: Making ephemeral storage available also at /media/ephemeral0...
      [  109.389250] cloud-init[1030]: Adding /media/ephemeral0 to fstab...
      [  110.137941] cloud-init[1030]: /home succesfully redirected to ephemeral storage at /mnt.
      [  110.138429] cloud-init[1030]: Restarting Docker...
      [  115.743758] cloud-init[1030]: Running startup scripts...
      [  122.243703] cloud-init[1030]: Exception in thread "main" java.lang.UnsupportedClassVersionError: com/atlassian/bamboo/agent/elastic/startup/RunStartupScripts : Unsupported major.minor version 52.0
      [  122.244443] cloud-init[1030]: at java.lang.ClassLoader.defineClass1(Native Method)
      [  122.244995] cloud-init[1030]: at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
      [  122.245401] cloud-init[1030]: at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      [  122.245801] cloud-init[1030]: at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
      [  122.246213] cloud-init[1030]: at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
      [  122.246709] cloud-init[1030]: at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
      [  122.247281] cloud-init[1030]: at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      [  122.247923] cloud-init[1030]: at java.security.AccessController.doPrivileged(Native Method)
      [  122.248445] cloud-init[1030]: at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      [  122.248934] cloud-init[1030]: at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      [  122.249409] cloud-init[1030]: at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      [  122.249807] cloud-init[1030]: at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      [  122.250200] cloud-init[1030]: at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
      [  122.253242] cloud-init[1030]: Starting Elastic Bamboo Agent...
      [  127.257462] cloud-init[1030]: Syncing Elastic Bamboo Agent files...
      [  127.258014] cloud-init[1030]: 2015-11-02 04:41:47,478 INFO [main] [S3Sync] Syncing from: bamboo-agent-release-us-e1/5.10-OD-05-003/d65286746e6b59f0cd8811ae3dfad6b4e772d230ffd1a019b331e6de0ab7fe4a/ to /opt/bamboo-elastic-agent
      [  127.299321] cloud-init[1030]: Copying SSH config of cloud-init user ubuntu to /home/ec2-user/.ssh
      [  127.299882] cloud-init[1030]: /home/ec2-user/.ssh already exists, using it.
      [...]
      

      Notes

      This only started with the release of 5.10-OD-05.

      Workaround

      Please raise a support request at support.atlassian.com in the Atlassian Cloud project and we can apply the manual fix to your instance. It will update the AMIs of the stock images to point to the correct image, and you'll just need to spin up a new elastic image afterwards (any currently-running images will be using the old AMIs).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pbruski Przemek Bruski
              Reporter:
              nmason Nick Mason
              Votes:
              21 Vote for this issue
              Watchers:
              39 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: