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

Cannot Publish Artifacts

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Highest
    • None
    • 5.10.0
    • Artifacts

    Description

      Summary

      1. Issue
      2. How to replicate
      3. Investigation Done
      4. Workaround

      1. Issue

      Not able to transfer artifacts and the following gets thrown:

      <bamboo-install>/logs/catalina.out
      2016-01-20 11:37:39,464 ERROR [http-nio-8085-exec-20] [ArtifactServlet] Exception when storing the artifact
      java.nio.file.NoSuchFileException: /var/data/bamboo-home/artifacts/tmp/com.atlassian.bamboo.agent.messaging.ArtifactServlet7812808729203581451
      	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
      	at java.nio.file.Files.createDirectory(Files.java:674)
      	at java.nio.file.TempFileHelper.create(TempFileHelper.java:136)
      	at java.nio.file.TempFileHelper.createTempDirectory(TempFileHelper.java:173)
      	at java.nio.file.Files.createTempDirectory(Files.java:950)
      	at com.atlassian.bamboo.agent.messaging.ArtifactServlet.getDeserialisationPath(ArtifactServlet.java:201)
      	at com.atlassian.bamboo.agent.messaging.ArtifactServlet.storeArtifact(ArtifactServlet.java:116)
      	at com.atlassian.bamboo.agent.messaging.ArtifactServlet.doPost(ArtifactServlet.java:107)
      

      2. How to Replicate

      1. install Bamboo v5.10.0
      2. install Bamboo remote agent
      3. create a Project - Plan (i.e.: PRO-PLAN)
      4. add a Script task to plan
        Script task
        echo "Hello World" > "${bamboo.planKey}-${bamboo.buildNumber}.txt"
        
      5. create an "Artifact Definition"
        Name Text
        Localtion  
        Path *.txt
        Shared [x]
      6. run build against Remote agent

      3. Investigation Done

      1. copied "log4j.properties" from Bamboo server and pasted to "<bamboo-agent-home>" directory
        <bamboo-agent-home>/conf/wrapper.conf
        wrapper.java.additional.3=-Dlog4j.configuration=/opt/atlassian/agent/atlassian-bamboo-5.10.0/log4j.properties
        
      2. ran a new build against Bamboo remote agent
        <bamboo-remote-agent/logs/atlassian-bamboo.log>
        2016-01-20 17:15:22,109 INFO [3-BAM::broker.client.url::Agent:pool-6-thread-1] [BuildArtifactPostProcessor] Copying the build artifacts for build: PROJ-PLAN-JOB1-3
        2016-01-20 17:15:22,359 DEBUG [3-BAM::broker.client.url::Agent:pool-6-thread-1] [AbstractArtifactManager] Adding reference: ant.PropertyHelper
        2016-01-20 17:15:22,361 DEBUG [3-BAM::broker.client.url::Agent:pool-6-thread-1] [AbstractArtifactManager] Adding reference: ant.ComponentHelper
        2016-01-20 17:15:22,362 DEBUG [3-BAM::broker.client.url::Agent:pool-6-thread-1] [AbstractArtifactManager] FileSet: Setup scanner in dir /opt/atlassian/agent/atlassian-bamboo-5.10.0/xml-data/build-dir/PROJ-PLAN-JOB1 with patternSet{ includes: [*.txt] excludes: [] }
        2016-01-20 17:15:22,400 INFO [3-BAM::broker.client.url::Agent:pool-6-thread-1] [AbstractArtifactManager] Publishing [Text] for PROJ-PLAN-JOB1-3: 1 file(s) matching [*.txt] in directory /opt/atlassian/agent/atlassian-bamboo-5.10.0/xml-data/build-dir/PROJ-PLAN-JOB1
        2016-01-20 17:15:22,529 INFO [3-BAM::broker.client.url::Agent:pool-6-thread-1] [AbstractArtifactManager] Trying to publish the artifact with handler: com.atlassian.bamboo.build.artifact.BambooRemoteArtifactHandler
        2016-01-20 17:15:22,712 DEBUG [3-BAM::broker.client.url::Agent:pool-6-thread-1] [RequestAddCookies] CookieSpec selected: best-match
        2016-01-20 17:15:22,712 DEBUG [3-BAM::broker.client.url::Agent:pool-6-thread-1] [RequestAuthCache] Auth cache not set in the context
        2016-01-20 17:15:22,717 DEBUG [3-BAM::broker.client.url::Agent:pool-6-thread-1] [BambooArtifactHttpTransport] Started writing the artifact to the output stream.
        2016-01-20 17:15:22,833 INFO [3-BAM::broker.client.url::Agent:pool-6-thread-1] [BambooArtifactHttpTransport] Finished writing the artifact to the output stream, time elapsed: 110.4 ms
        2016-01-20 17:15:23,080 DEBUG [3-BAM::broker.client.url::Agent:pool-6-thread-1] [BambooArtifactHttpTransport] Entity in HTTP response: [<html>
        <head>
            <title>Internal server error</title>
            <meta name="decorator" content="install" />    
        </head>
        
        <body>
            <h1>Internal server error</h1>
        
        
            <h4>Go to...</h4>
            <ul>
                <li><a href="/">Site homepage</a></li>
            </ul>
            A system error has occurred - our apologies!
            <p>
                Please create a problem report on our <b>support system</b> at <a href="https://support.atlassian.com/secure/CreateIssue.jspa?pid=10060&issuetype=1">http://support.atlassian.com</a> with the following information:
                <ol class="standard">
                <li>a description of your problem and what you were doing at the time it occurred
                <li>cut &amp; paste the error and system information found below
                <li>attach the <strong>atlassian-bamboo.log</strong> log file found in your application home.
                </ol>
                We will respond as promptly as possible.<br/>Thank you!
            </p>
        
            <p>
                <b>Version:</b> 5.10.0<br>
                <b>Build:</b> 51017<br>
                <b>Build Date:</b> 15 Jan 2016
            </p>
        
             <h4>Request information:</h4>
             <ul class="standard">
                <li>Request URL: http://webserver.bamboo/500.action</li>
                <li>Scheme: http</li>
                <li>Server: webserver.bamboo</li>
                <li>Port: 80</li>
                <li>URI: /500.action</li>
                <li>Context path: </li>
                <li>Servlet path: /500.action</li>
                <li>Path info: </li>
                <li>Query string: fingerprint=-5662227328481913159&amp;planResultKey=PROJ-PLAN-JOB1-3</li>
            </ul>
        
        
            <p>
                <b>Stack Trace:</b>
        <pre>
        java.nio.file.NoSuchFileException: /opt/atlassian/home/atlassian-bamboo-5.10.0/artifacts/tmp/com.atlassian.bamboo.agent.messaging.ArtifactServlet4593917311442710816
        	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
        
      3. in the "<bamboo-install>/logs/catalina.out"
        <bamboo-install/logs/catalina.out>
        2016-01-20 17:15:22,537 INFO [http-nio-8085-exec-11] [AccessLogFilter] admin GET http://webserver.bamboo/rest/pref/latest/user/?expand=preferences.preference 40457kb
        2016-01-20 17:15:22,840 INFO [http-nio-8085-exec-20] [ArtifactServlet] Receiving Artifact [Text] for PROJ-PLAN-JOB1-3
        2016-01-20 17:15:22,885 ERROR [http-nio-8085-exec-20] [ArtifactServlet] Exception when storing the artifact
        java.nio.file.NoSuchFileException: /opt/atlassian/home/atlassian-bamboo-5.10.0/artifacts/tmp/com.atlassian.bamboo.agent.messaging.ArtifactServlet4593917311442710816
        	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
        	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
        
      4. in the build log
        PROJ-PLAN-JOB1-3.log
        simple	20-Jan-2016 17:15:22	Running post build plugin 'Artifact Copier'
        simple	20-Jan-2016 17:15:22	Publishing an artifact: Text
        error	20-Jan-2016 17:15:23	Unable to publish artifact [Text]: 
        simple	20-Jan-2016 17:15:23	The artifact hasn't been successfully published after 0s
        simple	20-Jan-2016 17:15:23	Finalising the build...
        simple	20-Jan-2016 17:15:23	Stopping timer.
        simple	20-Jan-2016 17:15:23	Build PROJ-PLAN-JOB1-3 completed.
        

      4. Workaround

      When running the following command we can observe the directory "/opt/atlassian/home/atlassian-bamboo-5.10.0/artifacts/tmp" does not exist:

      $ ls -l /opt/atlassian/home/atlassian-bamboo-5.10.0/artifacts
      
      1. create the directory manually
        mkdir /opt/atlassian/home/atlassian-bamboo-5.10.0/artifacts/tmp
        
      2. run a new build
        PROJ-PLAN-JOB1-4.log
        simple	20-Jan-2016 17:33:29	Running post build plugin 'Artifact Copier'
        simple	20-Jan-2016 17:33:29	Publishing an artifact: Text
        simple	20-Jan-2016 17:33:30	Finished publishing of artifact Shared artifact: [Text], pattern: [*.txt] in 1s
        simple	20-Jan-2016 17:33:30	Finalising the build...
        simple	20-Jan-2016 17:33:30	Stopping timer.
        simple	20-Jan-2016 17:33:30	Build PROJ-PLAN-JOB1-4 completed.
        

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rsperafico Rafael Sperafico (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: