Remote agent wrapper is not working in FreeBSD

XMLWordPrintable

    • Type: Bug
    • Resolution: Not a bug
    • Priority: Low
    • None
    • Affects Version/s: 8.0.4
    • Component/s: Agents
    • None
    • 1
    • Severity 3 - Minor

      Issue Summary

      The wrapper shipped with remote agents is not working in FreeBSD.

      This was tested against FreeBSD 11.4 only but it may affect other versions of FreeBSD.

      Steps to Reproduce

      1. Set up a FreeBSD server.
      2. Download the remote agent jar file to the FreeBSD server.
      3. Install the agent using the command shown under the "Running a remote agent" section of the Bamboo administration > Agents > Install remote agent page:
        java -jar atlassian-bamboo-agent-installer-8.0.4.jar http://bamboo.baseurl/agentServer/
        

      Expected Results

      Both remote agent and wrapper start up.

      Actual Results

      This is the message that shows up right when trying to start the agent with the command mentioned above:

      Reinstalling wrapper binaries, reason: agent either not installed or outdated
      WARNING: Unknown OS: FreeBSD
      Bamboo agent will run in fail fast mode.  If the Bamboo server goes down,
      the agent will need to be restarted.
      Agent wrapper won't be installed - no files to install
      Installing file: /generic/lib/bamboo-agent-bootstrap-jar-with-dependencies.jar to: /home/ec2-user/remote-agent-home/lib/bamboo-agent-bootstrap.jar
      Unzipping /classpath.zip to /home/ec2-user/remote-agent-home/classpath
      Could not find source file /classpath.zip
      Agent installed
      ...
      
      • The remote agent does start up but there's no wrapper running.
      • If you run ps to list the current running processes you'll not find the wrapper there.
      • There are no files inside the <agent-home>/bin and <agent-home>/conf folders.
      • Since there's no wrapper it won't be possible to modify the <agent-home>/conf/wrapper.conf file to make adjustments to the heap size or any other Java properties. You'll need to add those properties to the agent installation command.
      • Since there's no <agent-home>/bin/bamboo-agent.sh file you'll not be able to start/ stop the agent. You'd have to stop the agent by killing the process with kill -9 or requesting an agent shutdown from the Bamboo administration > Agents page (using the "Request agent stop" button inside the agent summary page). You'll need to restart the agent by continuously issuing the installation command pointing to the existing <agent-home> folder.
      • Since there's no wrapper there's no way to configure the agent to try and automatically reconnect to Bamboo in case it loses connection to Bamboo for an extended period of time (e.g. planned maintenance). You'll have to manually restart the agent.

      Notes

      If you try installing the agent using a jar file from Bamboo 7.x (e.g. agent-installer-7.2.6.jar) against your Bamboo 8.x instance the behaviour is a little different. The agent wrapper installation seems to take place. There's no warning about the wrapper not getting installed in the agent logs. If you check the <agent-home>/bin and <agent-home>/conf folders files will be there however the wrapper will not startup. This may be a bit misleading as you'll think the wrapper is working but it is not. Therefore changes made to the <agent-home>/conf/wrapper.conf will not take effect. If you try to start the agent using <agent-home>/bin/bamboo-agent.sh you will get the following errors:

      $ ./bamboo-agent.sh start
      Unable to locate any of the following binaries:
        /usr/home/ec2-user/remote-agent-home/bin/./wrapper-freebsd-x86-64
        /usr/home/ec2-user/remote-agent-home/bin/./wrapper-freebsd-x86-32
        /usr/home/ec2-user/remote-agent-home/bin/./wrapper
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Jan Majkutewicz (Inactive)
            Reporter:
            Bruno Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: