Artifact publish failing: "too many levels of symbolic links"
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Artifact publishing task takes a lot of time to be processed and fail at the end with no clear reason declared on build logs.
The following messages can be seen in the atlassian-bamboo-agent.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
INFO | jvm 8 | 2018/07/18 12:25:22 | skipping symbolic link <Bamboo_agent_home>/xml-data/build-dir/PLAN-KEY/folder/folder/folder/folder/folder -- too many levels of symbolic links.
INFO | jvm 8 | 2018/07/18 12:25:24 | skipping symbolic link <Bamboo_agent_home>/xml-data/build-dir/PLAN-KEY/folder/folder/folder/folder/folder/sub/sub/sub/sub/sub/sub -- too many levels of symbolic links.
...
INFO | jvm 8 | 2018/07/18 12:31:59 | 2018-07-18 12:31:59,099 WARN [0-BAM::agent123.company.com::Agent:pool-3-thread-1] [ArtifactStreams] Error during artifact transfer, total bytes written: 876544, total requested: 975688, latest request: 975688
INFO | jvm 8 | 2018/07/18 12:31:59 | 2018-07-18 12:31:59,099 INFO [0-BAM::agent123.company.com::Agent:pool-3-thread-1] [RetryExec] I/O exception (java.net.SocketException) caught when processing request to {}->http://bamboo.company.com:8085: Broken pipe
INFO | jvm 8 | 2018/07/18 12:31:59 | 2018-07-18 12:31:59,099 INFO [0-BAM::agent123.company.com::Agent:pool-3-thread-1] [RetryExec] Retrying request to {}->http://bamboo.company.com:8085
...
INFO | jvm 8 | 2018/07/18 12:33:15 | 2018-07-18 12:33:15,884 WARN [0-BAM::agent123.company.com::Agent:pool-3-thread-1] [ArtifactStreams] Error during artifact transfer, total bytes written: 876544, total requested: 975688, latest request: 975688
INFO | jvm 8 | 2018/07/18 12:33:15 | 2018-07-18 12:33:15,884 ERROR [0-BAM::agent123.company.com::Agent:pool-3-thread-1] [BambooArtifactHttpTransport] Failed to send artifact.
INFO | jvm 8 | 2018/07/18 12:33:15 | java.net.SocketException: Broken pipe
INFO | jvm 8 | 2018/07/18 12:33:15 | at java.net.SocketOutputStream.socketWrite0(Native Method)
INFO | jvm 8 | 2018/07/18 12:33:15 | at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
INFO | jvm 8 | 2018/07/18 12:33:15 | at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
INFO | jvm 8 | 2018/07/18 12:33:15 | at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124)
Cause
The build data has symbolic links pointing to a lower part of the same build directory data structure and the artifact definition value defined for the Copy pattern field is using **/. The artifact definition patten causes a recursive search and due to the symbolic links this search is running in loops.
Workaround
Avoid using the **/ Ant pattern on the Copy pattern field at artifact definition . An absolute path should solve the problem.
Resolution
Make sure there are no symbolic links pointing the a lower part of the same repository three. This will save the artifact search from loops.
Was this helpful?