Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-20181

Windows Elastic Agents are OOMing under default configurations when deploying third-party plugins

      Summary

      Windows Elastic Agents are OOMing under default configurations when deploying third-party plugins and slows down agent start-up performance.

      Environment

      • Windows Elastic Agents

      Steps to Reproduce

      1. Install a third-party plugin, such as Artifactory
      2. Start a Windows Elastic Agent

      Expected Results

      Agent can successfully deploy the plugin on start-up

      Actual Results

      The below exception is thrown in the bamboo-elastic-agent.out file:

      2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Unable to deploy plugin 'org.jfrog.bamboo.bamboo-artifactory-plugin' from 'Unit: C:\Users\Bamboo\bamboo-agent-home\plugins\user-installed\bamboo-artifactory-plugin-2.5.1.jar (1542182479271)'.
      2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Because of the following exception:
      java.lang.OutOfMemoryError: Java heap space
      	at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
      	at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:408)
      	at java.util.zip.ZipFile.getInputStream(ZipFile.java:389)
      	at aQute.bnd.osgi.ZipResource.openInputStream(ZipResource.java:26)
      	at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:484)
      	at aQute.bnd.osgi.ClassDataCollectors.parse(ClassDataCollectors.java:37)
      	at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:187)
      	at aQute.bnd.osgi.Builder.analyze(Builder.java:352)
      	at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:618)
      	at com.atlassian.plugin.osgi.factory.transform.stage.GenerateManifestStage.execute(GenerateManifestStage.java:187)
      	at com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer.transform(DefaultPluginTransformer.java:140)
      	at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.createOsgiPluginJar(OsgiPluginFactory.java:329)
      	at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:231)
      	at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:142)
      	at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:87)
      	at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:28)
      	at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:524)
      	at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:503)
      	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:498)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1827)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1770)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$42/668961043.getObject(Unknown Source)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
      

      Workaround

      Set the following into the Instance startup script for the image at Bamboo Administration >> Image Configurations >> Edit

      Option 1

      Requires sed to be installed in the image which is included in our stock images but may not existing in a custom AMI.

      sed -i "s/-Dimagefiles/-Dbamboo.agent.syncOnly -Dimagefiles/" C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat
      sed -i 's@cd %%OLD_PWD%%@sed -i \'s/-Xmx256m/-Xmx512m/\' \%%TEMP\%%\\\\bamboo-agent-bootstrap-1.bat\n\%%TEMP\%%\\\\bamboo-agent-bootstrap-1.bat ^>^>bamboo-elastic-agent.out 2^>\^&1\ncd %%OLD_PWD%%@' C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat
      
      Option 2:
      setx -m _JAVA_OPTIONS "-Xms256m -Xmx512m"

      This is a global Java variable, so any java processes that run during your builds (e.g. Gradle and Maven) will also inherit this config for their respective JVMs.

            [BAM-20181] Windows Elastic Agents are OOMing under default configurations when deploying third-party plugins

            Jan Majkutewicz (Inactive) made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Short Term Backlog [ 12074 ] New: Closed [ 6 ]
            Jan Majkutewicz (Inactive) made changes -
            Fix Version/s New: 8.0.0 [ 92814 ]
            Jan Majkutewicz (Inactive) made changes -
            Assignee New: Jan Majkutewicz [ jmajkutewicz ]
            Jeremy Owen made changes -
            Description Original: h3. Summary
            Windows Elastic Agents are OOMing under default configurations when deploying third-party plugins and slows down agent start-up performance.

            h3. Environment
            * Windows Elastic Agents

            h3. Steps to Reproduce
            # Install a third-party plugin, such as Artifactory
            # Start a Windows Elastic Agent

            h3. Expected Results
            Agent can successfully deploy the plugin on start-up

            h3. Actual Results
            The below exception is thrown in the bamboo-elastic-agent.out file:
            {noformat}
            2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Unable to deploy plugin 'org.jfrog.bamboo.bamboo-artifactory-plugin' from 'Unit: C:\Users\Bamboo\bamboo-agent-home\plugins\user-installed\bamboo-artifactory-plugin-2.5.1.jar (1542182479271)'.
            2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Because of the following exception:
            java.lang.OutOfMemoryError: Java heap space
            at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
            at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:408)
            at java.util.zip.ZipFile.getInputStream(ZipFile.java:389)
            at aQute.bnd.osgi.ZipResource.openInputStream(ZipResource.java:26)
            at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:484)
            at aQute.bnd.osgi.ClassDataCollectors.parse(ClassDataCollectors.java:37)
            at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:187)
            at aQute.bnd.osgi.Builder.analyze(Builder.java:352)
            at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:618)
            at com.atlassian.plugin.osgi.factory.transform.stage.GenerateManifestStage.execute(GenerateManifestStage.java:187)
            at com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer.transform(DefaultPluginTransformer.java:140)
            at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.createOsgiPluginJar(OsgiPluginFactory.java:329)
            at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:231)
            at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:142)
            at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:87)
            at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:28)
            at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:524)
            at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:503)
            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:498)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1827)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1770)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
            at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$42/668961043.getObject(Unknown Source)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
            {noformat}

            h3. Workaround
            Set the following into the *Instance startup script* for the image at *Bamboo Administration >> Image Configurations >> Edit*

            h6. Option 1:
            {code}
            sed -i "s/-Dimagefiles/-Dbamboo.agent.syncOnly -Dimagefiles/" C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat
            sed -i 's@cd %%OLD_PWD%%@sed -i \'s/-Xmx256m/-Xmx512m/\' \%%TEMP\%%\\\\bamboo-agent-bootstrap-1.bat\n\%%TEMP\%%\\\\bamboo-agent-bootstrap-1.bat ^>^>bamboo-elastic-agent.out 2^>\^&1\ncd %%OLD_PWD%%@' C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat
            {code}

            h6. Option 2:
            {code}setx -m _JAVA_OPTIONS "-Xms256m -Xmx512m"{code}
            (!) This is a global Java variable, so any java processes that run during your builds (e.g. Gradle and Maven) will also inherit this config for their respective JVMs.
            New: h3. Summary
            Windows Elastic Agents are OOMing under default configurations when deploying third-party plugins and slows down agent start-up performance.

            h3. Environment
            * Windows Elastic Agents

            h3. Steps to Reproduce
            # Install a third-party plugin, such as Artifactory
            # Start a Windows Elastic Agent

            h3. Expected Results
            Agent can successfully deploy the plugin on start-up

            h3. Actual Results
            The below exception is thrown in the bamboo-elastic-agent.out file:
            {noformat}
            2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Unable to deploy plugin 'org.jfrog.bamboo.bamboo-artifactory-plugin' from 'Unit: C:\Users\Bamboo\bamboo-agent-home\plugins\user-installed\bamboo-artifactory-plugin-2.5.1.jar (1542182479271)'.
            2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Because of the following exception:
            java.lang.OutOfMemoryError: Java heap space
            at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
            at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:408)
            at java.util.zip.ZipFile.getInputStream(ZipFile.java:389)
            at aQute.bnd.osgi.ZipResource.openInputStream(ZipResource.java:26)
            at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:484)
            at aQute.bnd.osgi.ClassDataCollectors.parse(ClassDataCollectors.java:37)
            at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:187)
            at aQute.bnd.osgi.Builder.analyze(Builder.java:352)
            at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:618)
            at com.atlassian.plugin.osgi.factory.transform.stage.GenerateManifestStage.execute(GenerateManifestStage.java:187)
            at com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer.transform(DefaultPluginTransformer.java:140)
            at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.createOsgiPluginJar(OsgiPluginFactory.java:329)
            at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:231)
            at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:142)
            at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:87)
            at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:28)
            at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:524)
            at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:503)
            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:498)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1827)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1770)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
            at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$42/668961043.getObject(Unknown Source)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
            {noformat}

            h3. Workaround
            Set the following into the *Instance startup script* for the image at *Bamboo Administration >> Image Configurations >> Edit*

            h6. Option 1
            Requires {{sed}} to be installed in the image which is included in our stock images but may not existing in a custom AMI.
            {code}
            sed -i "s/-Dimagefiles/-Dbamboo.agent.syncOnly -Dimagefiles/" C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat
            sed -i 's@cd %%OLD_PWD%%@sed -i \'s/-Xmx256m/-Xmx512m/\' \%%TEMP\%%\\\\bamboo-agent-bootstrap-1.bat\n\%%TEMP\%%\\\\bamboo-agent-bootstrap-1.bat ^>^>bamboo-elastic-agent.out 2^>\^&1\ncd %%OLD_PWD%%@' C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat
            {code}

            h6. Option 2:
            {code}setx -m _JAVA_OPTIONS "-Xms256m -Xmx512m"{code}
            (!) This is a global Java variable, so any java processes that run during your builds (e.g. Gradle and Maven) will also inherit this config for their respective JVMs.
            Jeremy Owen made changes -
            Description Original: h3. Summary
            Windows Elastic Agents are OOMing under default configurations when deploying third-party plugins and slows down agent start-up performance.

            h3. Environment
            * Windows Elastic Agents

            h3. Steps to Reproduce
            # Install a third-party plugin, such as Artifactory
            # Start a Windows Elastic Agent

            h3. Expected Results
            Agent can successfully deploy the plugin on start-up

            h3. Actual Results
            The below exception is thrown in the bamboo-elastic-agent.out file:
            {noformat}
            2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Unable to deploy plugin 'org.jfrog.bamboo.bamboo-artifactory-plugin' from 'Unit: C:\Users\Bamboo\bamboo-agent-home\plugins\user-installed\bamboo-artifactory-plugin-2.5.1.jar (1542182479271)'.
            2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Because of the following exception:
            java.lang.OutOfMemoryError: Java heap space
            at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
            at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:408)
            at java.util.zip.ZipFile.getInputStream(ZipFile.java:389)
            at aQute.bnd.osgi.ZipResource.openInputStream(ZipResource.java:26)
            at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:484)
            at aQute.bnd.osgi.ClassDataCollectors.parse(ClassDataCollectors.java:37)
            at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:187)
            at aQute.bnd.osgi.Builder.analyze(Builder.java:352)
            at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:618)
            at com.atlassian.plugin.osgi.factory.transform.stage.GenerateManifestStage.execute(GenerateManifestStage.java:187)
            at com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer.transform(DefaultPluginTransformer.java:140)
            at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.createOsgiPluginJar(OsgiPluginFactory.java:329)
            at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:231)
            at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:142)
            at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:87)
            at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:28)
            at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:524)
            at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:503)
            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:498)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1827)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1770)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
            at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$42/668961043.getObject(Unknown Source)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
            {noformat}

            h3. Workaround
            Set the following into the *Instance startup script* for the image at *Bamboo Administration >> Image Configurations >> Edit*
            {code}setx -m _JAVA_OPTIONS "-Xms256m -Xmx512m"{code}

            (!) This is a global variable, so any java processes that run during your build will also inherit this config.
            New: h3. Summary
            Windows Elastic Agents are OOMing under default configurations when deploying third-party plugins and slows down agent start-up performance.

            h3. Environment
            * Windows Elastic Agents

            h3. Steps to Reproduce
            # Install a third-party plugin, such as Artifactory
            # Start a Windows Elastic Agent

            h3. Expected Results
            Agent can successfully deploy the plugin on start-up

            h3. Actual Results
            The below exception is thrown in the bamboo-elastic-agent.out file:
            {noformat}
            2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Unable to deploy plugin 'org.jfrog.bamboo.bamboo-artifactory-plugin' from 'Unit: C:\Users\Bamboo\bamboo-agent-home\plugins\user-installed\bamboo-artifactory-plugin-2.5.1.jar (1542182479271)'.
            2018-11-14 08:02:14,797 ERROR [AgentRunnerThread] [ScanningPluginLoader] Because of the following exception:
            java.lang.OutOfMemoryError: Java heap space
            at java.util.zip.InflaterInputStream.<init>(InflaterInputStream.java:88)
            at java.util.zip.ZipFile$ZipFileInflaterInputStream.<init>(ZipFile.java:408)
            at java.util.zip.ZipFile.getInputStream(ZipFile.java:389)
            at aQute.bnd.osgi.ZipResource.openInputStream(ZipResource.java:26)
            at aQute.bnd.osgi.Clazz.parseClassFileWithCollector(Clazz.java:484)
            at aQute.bnd.osgi.ClassDataCollectors.parse(ClassDataCollectors.java:37)
            at aQute.bnd.osgi.Analyzer.analyze(Analyzer.java:187)
            at aQute.bnd.osgi.Builder.analyze(Builder.java:352)
            at aQute.bnd.osgi.Analyzer.calcManifest(Analyzer.java:618)
            at com.atlassian.plugin.osgi.factory.transform.stage.GenerateManifestStage.execute(GenerateManifestStage.java:187)
            at com.atlassian.plugin.osgi.factory.transform.DefaultPluginTransformer.transform(DefaultPluginTransformer.java:140)
            at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.createOsgiPluginJar(OsgiPluginFactory.java:329)
            at com.atlassian.plugin.osgi.factory.OsgiPluginFactory.create(OsgiPluginFactory.java:231)
            at com.atlassian.plugin.loaders.ScanningPluginLoader.deployPluginFromUnit(ScanningPluginLoader.java:142)
            at com.atlassian.plugin.loaders.ScanningPluginLoader.loadAllPlugins(ScanningPluginLoader.java:87)
            at com.atlassian.plugin.loaders.PermissionCheckingPluginLoader.loadAllPlugins(PermissionCheckingPluginLoader.java:28)
            at com.atlassian.plugin.manager.DefaultPluginManager.earlyStartup(DefaultPluginManager.java:524)
            at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginManager.java:503)
            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:498)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1827)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1770)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:579)
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:501)
            at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
            at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$42/668961043.getObject(Unknown Source)
            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
            {noformat}

            h3. Workaround
            Set the following into the *Instance startup script* for the image at *Bamboo Administration >> Image Configurations >> Edit*

            h6. Option 1:
            {code}
            sed -i "s/-Dimagefiles/-Dbamboo.agent.syncOnly -Dimagefiles/" C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat
            sed -i 's@cd %%OLD_PWD%%@sed -i \'s/-Xmx256m/-Xmx512m/\' \%%TEMP\%%\\\\bamboo-agent-bootstrap-1.bat\n\%%TEMP\%%\\\\bamboo-agent-bootstrap-1.bat ^>^>bamboo-elastic-agent.out 2^>\^&1\ncd %%OLD_PWD%%@' C:\opt\bamboo-elastic-agent\bin\bamboo-elastic-agent.bat
            {code}

            h6. Option 2:
            {code}setx -m _JAVA_OPTIONS "-Xms256m -Xmx512m"{code}
            (!) This is a global Java variable, so any java processes that run during your builds (e.g. Gradle and Maven) will also inherit this config for their respective JVMs.
            Pawel Skierczynski made changes -
            Status Original: Gathering Impact [ 12072 ] New: Short Term Backlog [ 12074 ]
            Pawel Skierczynski made changes -
            Status Original: Needs Triage [ 10030 ] New: Gathering Impact [ 12072 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 3009903 ] New: JAC Bug Workflow v3 [ 3385567 ]
            Status Original: Open [ 1 ] New: Needs Triage [ 10030 ]
            Bugfix Automation Bot made changes -
            Support reference count Original: 4 New: 5
            Bugfix Automation Bot made changes -
            Support reference count New: 4

              jmajkutewicz Jan Majkutewicz (Inactive)
              jowen@atlassian.com Jeremy Owen
              Affected customers:
              11 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: