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

UnresolvedAddressException will cause "Too many open files" error

    XMLWordPrintable

Details

    Description

      Summary

      If Bamboo hit into UnresolvedAddressException for a lot of time when accessing Stash, it may hit into "Too many open files" error later

      Steps to Reproduce

      1. Set the hostname test.atlassian.com to Stash (can use /etc/hosts)
      2. Create Application Link between Stash and Bamboo
      3. Make sure that the repository is added successfully into Bamboo
      4. Delete the hostname test.atlassian.com
      5. Build a Plan in Bamboo that uses Stash repository
      6. Wait for it to fail
      7. Check open files with the commands "lsof -p <BAMBOO_PID>"
      8. Repeat step 5-7 for a lot of time

      Expected Results

      The open files that connect to Stash should be released after the failure

      Actual Results

      The open files keep on increasing

      Notes

      If there are a lot of Repositories in Bamboo connecting to Stash, the open files will keep on increasing until it hit into "Too many open files" error

      Workaround

      Assuming that the address reported in the UnresolvedAddressException is incorrect because you've migrated Bitbucket to a new address, you can replace the URL Bamboo is using to access Bitbucket using these steps:

      1. Shutdown Bamboo
      2. Backup database for rollback purposes
      3. Run the following SQL to change the hostname:
        UPDATE VCS_LOCATION SET XML_DEFINITION_DATA=REPLACE(XML_DEFINITION_DATA,"old_hostname","new_hostname");
        
      4. Restart Bamboo

      Alternatively, if the address is correct and still can't be resolved – you'll need to investigate why your DNS infrastructure does not correctly resolve the address.

      Attachments

        Issue Links

          Activity

            People

              mgardias Marcin Gardias
              klfoong Foong (Inactive)
              Votes:
              9 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: