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

Elastic Bamboo - Invalid Base64 encoding of user data

      Summary

      Occasionally Elastic Agent creation calls fail with the error Invalid Base64 encoding of user data

      Expected Results

      All elastic Agent calls succeed with creation of a new Elastic Agent

      Actual Results

      Occasionally the creation attempt will fail:
      The below exception is thrown in the xxxxxxx.log file:

      com.amazonaws.services.ec2.model.AmazonEC2Exception: Invalid BASE64 encoding of user data (Service: AmazonEC2; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 24be1899-d089-48a5-b658-559d39a2034b)
      

      Workaround

      When failed, a new elastic agent call is made and the new agent starts normally.

      Notes

      it looks like when we use ava.util.Base64.getMimeEncoder().encodeToString(userData) to encode the userData for the instance (specifically the keypair generated per-instance) it is occasionally encoded with extra carriage returns which prevent proper decoding by AWS API.

            [BAM-19945] Elastic Bamboo - Invalid Base64 encoding of user data

            Aaron Brown made changes -
            Remote Link Original: This issue links to "BDEV-15096 (Jira)" [ 405415 ] New: This issue links to "BDEV-15096 (Hello Jira)" [ 405415 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 2693944 ] New: JAC Bug Workflow v3 [ 3386053 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            I think Amazon fixed something, because spot instances in Bamboo 5.14.1 is working again.

            Marcos Rafael Kaissi Barbosa added a comment - I think Amazon fixed something, because spot instances in Bamboo 5.14.1 is working again.

            Angel Ruiz added a comment -

            Hi @ezeidan,
            It looks like requesting spot instances has been fixed in Bamboo 6.9.0
            Thanks

            Angel Ruiz added a comment - Hi @ezeidan, It looks like requesting spot instances has been fixed in Bamboo 6.9.0 Thanks

            Seems like there have been changes on the Amazon Site on Friday.

            marcelroell added a comment - Seems like there have been changes on the Amazon Site on Friday.
            Jeremy Owen made changes -
            Regular Expression New: Invalid BASE64 encoding of user data

            Are their any known workarounds that don't require switching to on-demand instances or upgrading?

             

            Matt Martyn added a comment - Are their any known workarounds that don't require switching to on-demand instances or upgrading?  

            OK, thank you @Elias Zeidan.

            Marcos Rafael Kaissi Barbosa added a comment - OK, thank you @Elias Zeidan.

            Hi angel16113731,

            Thank you for your update. Please let me know if you see any issues with this in Bamboo 6.9.0.

            Thanks!
            Elias

            Ellie Z (they/them) added a comment - Hi angel16113731 , Thank you for your update. Please let me know if you see any issues with this in Bamboo 6.9.0. Thanks! Elias

            Ellie Z (they/them) added a comment - - edited

            Hi kaissi322311625,

            Thank you very much for your update. Since the fix for this issue is in Bamboo 6.9.0, please upgrade to that version and try the Spot instances.

            Thanks,
            Elias

            Ellie Z (they/them) added a comment - - edited Hi kaissi322311625 , Thank you very much for your update. Since the fix for this issue is in Bamboo 6.9.0, please upgrade to that version and try the Spot instances. Thanks, Elias

              mgardias Marcin Gardias
              rwatson@atlassian.com Robert W (Inactive)
              Affected customers:
              17 This affects my team
              Watchers:
              30 Start watching this issue

                Created:
                Updated:
                Resolved: