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

Remote Agent creates spurious directory tree under the default bamboo home bin/ directory

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 2.2
    • None
    • Agents
    • None
    • Bamboo Server: BEAC 2.2-SNAPSHOT build 1104 - 11 Dec 08
      Bamboo Agent Host: Debian GNU/Linix 4.0 testing, Sun JDK 1.6.0_07

      When running the Bamboo agent without an explicit bamboo home, a spurious directory tree is created under bamboo-agent-home/bin/ directory with the following form "/home/bamboo/bamboo-agent-home", which can be traversed using bourne shell like so:

      bamboo@VictoriaBitter:~/bamboo-agent-home/bin$ cd \"
      bamboo@VictoriaBitter:~/bamboo-agent-home/bin/"$ cd home/
      bamboo@VictoriaBitter:~/bamboo-agent-home/bin/"/home$ cd bamboo/
      bamboo@VictoriaBitter:~/bamboo-agent-home/bin/"/home/bamboo$ cd bamboo-agent-home\"/
      

      I would hazard that this directory is created between the service wrapper and the bootstrap JAR, as all the build information is created under here:

      bamboo@VictoriaBitter:~/bamboo-agent-home/bin/"/home/bamboo/bamboo-agent-home"$ ls
      bamboo-agent.cfg.xml  xml-data
      

      This is the command line used to launch the agent:

      java -Dbamboo.agent.ignoreServerCertName=true -jar bamboo-agent-2.2-SNAPSHOT.jar https://atlassian18.private.atlassian.com/agentServer/
      

        1. agent.log
          581 kB
        2. bamboo-agent-victoriabitter-logs.tar.gz
          1.06 MB

          Form Name

            [BAM-3480] Remote Agent creates spurious directory tree under the default bamboo home bin/ directory

            Problem was caused by an entry in the wrapper.conf file which is reinstalled from the agent jar every time agent is started.
            The version you were using has a following line in the wrapper.conf file

            wrapper.java.additional.1=-Dbamboo.home="%BAMBOO_AGENT_HOME%"
            

            Newer versions have this line corrected:

            wrapper.java.additional.1=-Dbamboo.home=%BAMBOO_AGENT_HOME%
            

            The solution is to either

            • upgrade Bamboo installation on the atlassian18.private.atlassian.com and then download new agent jar from this machine,
            • or download agent jar from some other server (I provided an example bamboo-agent-2.2-kbrazulewicz.jar)

            I believe this advice can be considered a fix.

            Krystian Brazulewicz added a comment - Problem was caused by an entry in the wrapper.conf file which is reinstalled from the agent jar every time agent is started. The version you were using has a following line in the wrapper.conf file wrapper.java.additional.1=-Dbamboo.home="%BAMBOO_AGENT_HOME%" Newer versions have this line corrected: wrapper.java.additional.1=-Dbamboo.home=%BAMBOO_AGENT_HOME% The solution is to either upgrade Bamboo installation on the atlassian18.private.atlassian.com and then download new agent jar from this machine, or download agent jar from some other server (I provided an example bamboo-agent-2.2-kbrazulewicz.jar) I believe this advice can be considered a fix.

            Access to the server has been arranged. Information sent out of band.

            PdZ (Inactive) added a comment - Access to the server has been arranged. Information sent out of band.

            I'd like to play with other versions of bamboo-agent jar on VictoriaBitter. I have VPN access to Sydney office so would be so kind and provided me ssh account with sudo permission on VictoriaBitter and make sure that atlassian18.private.atlassian.com is running Bamboo server?

            The earlier the better so if you could do it on Monday it would be great - I'd work on this on your Monday evening.

            Krystian Brazulewicz added a comment - I'd like to play with other versions of bamboo-agent jar on VictoriaBitter. I have VPN access to Sydney office so would be so kind and provided me ssh account with sudo permission on VictoriaBitter and make sure that atlassian18.private.atlassian.com is running Bamboo server? The earlier the better so if you could do it on Monday it would be great - I'd work on this on your Monday evening.

            Agent started up with java -Dbamboo.agent.ignoreServerCertName=true -jar bamboo-agent-2.2-SNAPSHOT.jar https://atlassian18.private.atlassian.com/agentServer/ 2>&1 | tee agent.log, agent.log.

            PdZ (Inactive) added a comment - Agent started up with java -Dbamboo.agent.ignoreServerCertName=true -jar bamboo-agent-2.2-SNAPSHOT.jar https://atlassian18.private.atlassian.com/agentServer/ 2>&1 | tee agent.log , agent.log .

            Odd that it thinks that bamboo.home is user-specified; as the JVM is launched with no -Dbamboo.home parameter.

            Access to the server can be arranged if you are in the Sydney office; as it sits under my desk

            I've arranged to get some time to get the diagnostic information you need. Stay tuned.

            PdZ (Inactive) added a comment - Odd that it thinks that bamboo.home is user-specified ; as the JVM is launched with no -Dbamboo.home parameter. Access to the server can be arranged if you are in the Sydney office; as it sits under my desk I've arranged to get some time to get the diagnostic information you need. Stay tuned.

            I found this in the log files:

            2009-01-09 11:07:30,858 INFO [Thread-1] [RemoteAgentHomeLocator] bamboo.home set to user-specified location: ""/home/bamboo/bamboo-agent-home"" (Modify using -Dbamboo.home=<directory> on the command line.)
            2009-01-09 11:07:30,858 WARN [Thread-1] [AgentConfiguration] Application home does not exist. Creating directory: /home/bamboo/bamboo-agent-home/bin/"/home/bamboo/bamboo-agent-home"
            

            The last occurence is

            2009-02-03 10:58:43,733 INFO [Thread-1] [RemoteAgentHomeLocator] bamboo.home set to user-specified location: ""/home/bamboo/bamboo-agent-home"" (Modify using -Dbamboo.home=<directory> on the command line.)
            

            I don't know why the agent was feed with the property with the quotation marks, there are 2 possibilities:
            1. -Dbamboo.home or -Dbamboo.agent.home property was set in the command line
            2. The wrapper somehow added the quotation marks to the environment setting.

            The agent startup operation you have executed failed so I could only see in the log:

            BAMBOO_AGENT_HOME: /home/bamboo/bamboo-agent-home
            

            which is OK (proper path without quotes) but then the bootstrapping fails and agent does not start so I cannot validate if it would still show

            INFO [Thread-1] [RemoteAgentHomeLocator] bamboo.home set to user-specified location: ""/home/bamboo/bamboo-agent-home"" (Modify using -Dbamboo.home=<directory> on the command line.)
            

            Can you please send me the logs one more time but this time make sure that agent has correctly started?

            Another thing - can I get the access to VictoriaBitter host to test it myself?

            Krystian Brazulewicz added a comment - I found this in the log files: 2009-01-09 11:07:30,858 INFO [Thread-1] [RemoteAgentHomeLocator] bamboo.home set to user-specified location: ""/home/bamboo/bamboo-agent-home"" (Modify using -Dbamboo.home=<directory> on the command line.) 2009-01-09 11:07:30,858 WARN [Thread-1] [AgentConfiguration] Application home does not exist. Creating directory: /home/bamboo/bamboo-agent-home/bin/"/home/bamboo/bamboo-agent-home" The last occurence is 2009-02-03 10:58:43,733 INFO [Thread-1] [RemoteAgentHomeLocator] bamboo.home set to user-specified location: ""/home/bamboo/bamboo-agent-home"" (Modify using -Dbamboo.home=<directory> on the command line.) I don't know why the agent was feed with the property with the quotation marks, there are 2 possibilities: 1. -Dbamboo.home or -Dbamboo.agent.home property was set in the command line 2. The wrapper somehow added the quotation marks to the environment setting. The agent startup operation you have executed failed so I could only see in the log: BAMBOO_AGENT_HOME: /home/bamboo/bamboo-agent-home which is OK (proper path without quotes) but then the bootstrapping fails and agent does not start so I cannot validate if it would still show INFO [Thread-1] [RemoteAgentHomeLocator] bamboo.home set to user-specified location: ""/home/bamboo/bamboo-agent-home"" (Modify using -Dbamboo.home=<directory> on the command line.) Can you please send me the logs one more time but this time make sure that agent has correctly started? Another thing - can I get the access to VictoriaBitter host to test it myself?

            Requested logs, plus any other logs found under ~bamboo: bamboo-agent-victoriabitter-logs.tar.gz

            PdZ (Inactive) added a comment - Requested logs, plus any other logs found under ~bamboo : bamboo-agent-victoriabitter-logs.tar.gz

            I cannot reproduce the problem. I'd need you to provide more info on your environment:

            env > agent-env.log
            uname -a > agent-uname.log
            java -Dbamboo.agent.ignoreServerCertName=true -jar bamboo-agent-2.2-SNAPSHOT.jar https://atlassian18.private.atlassian.com/agentServer/ 2>&1 | tee agent.log
            

            Krystian Brazulewicz added a comment - I cannot reproduce the problem. I'd need you to provide more info on your environment: env > agent-env.log uname -a > agent-uname.log java -Dbamboo.agent.ignoreServerCertName=true -jar bamboo-agent-2.2-SNAPSHOT.jar https://atlassian18.private.atlassian.com/agentServer/ 2>&1 | tee agent.log

              kbrazulewicz Krystian Brazulewicz
              pdzwart PdZ (Inactive)
              Affected customers:
              0 This affects my team
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 4h Original Estimate - 4h
                  4h
                  Remaining:
                  Time Spent - 4.5h Remaining Estimate - 0.5h
                  0.5h
                  Logged:
                  Time Spent - 4.5h Remaining Estimate - 0.5h
                  4.5h