Troubleshooting Subversion in Bamboo Data Center
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Summary
This article will provide customers with instructions on how to enable additional debug logging for Subversion (SVN) operations in Bamboo.
Environment
- Bamboo Data Center
- Subversion / SVNKit
- Bamboo Agents
Bamboo Subversion compatibility
Bamboo does not rely on the external SVN binary for Subversion operations. Instead, it utilizes the SVNKit Java library. The supported versions of Bamboo come with a version of SVNKit that is compatible with Subversion formats 1.10, 1.9, 1.8, and 1.7. There is no need to upgrade working copies that are in the 1.7 format.
All versions of the Subversion server are backwards compatible. You can run any version of the Subversion server with any version of Bamboo/SVNKit.
Caveats
Any version of SVNKit on the client side will work with Subversion server 1.5 (both older and newer ones). However, newer 1.5 features are not supported.
Solution
At times, SVN operations may become unresponsive and fail without clear reasons. To help investigate potential issues, it is recommended to enable additional debug logging in the SVNKit library.
Debugging Subversion connection in Bamboo Data Center
To enable additional logging on Java packages in Bamboo, customers can usually, follow the instructions on the Logging in Bamboo page, but for SVNKit, additional steps are required.
To debug your SVN connection in Bamboo Data Center, modify the <bamboo-install>/conf/logging.properties
and make sure to:
1. Append a new log handler to the main handlers entry in Bamboo's Tomcat configuration
Locate the handlers
entry in the <bamboo-install>/conf/logging.properties
file and add the 5svnkit.org.apache.juli.AsyncFileHandler
entry:
handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler, 5svnkit.org.apache.juli.AsyncFileHandler
2. Add SVNKit-specific debug entries to <bamboo-install>/conf/logging.properties
SVNKit Log Level
We usually recommend enabling FINEST so it will capture all the operations, if you don't required that level of verbosity, you can modify the file and set is as following:
- FINE (default) — the level for non-detailed logging
- FINER — the level for more detailed logging
- FINEST — the level for full logging
Modify the <bamboo-install>/conf/logging.properties
file and append (or uncomment) the following content to enable extra logging for SVNKit operations.
############################################################
# SVNKit-specific settings
# Set to level=FINEST to enable debug logging
# Uncomment the block below to allow SVNkit debugging
############################################################
5svnkit.org.apache.juli.AsyncFileHandler.level = ALL
5svnkit.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
5svnkit.org.apache.juli.AsyncFileHandler.prefix = svnkit.
5svnkit.org.apache.juli.AsyncFileHandler.maxDays = 90
5svnkit.org.apache.juli.AsyncFileHandler.encoding = UTF-8
#
svnkit.level = FINEST
svnkit.handlers = 5svnkit.org.apache.juli.AsyncFileHandler
#
svnkit-network.level = FINEST
svnkit-network.handlers = 5svnkit.org.apache.juli.AsyncFileHandler
#
svnkit-wc.level = FINEST
svnkit-wc.handlers = 5svnkit.org.apache.juli.AsyncFileHandler
#
svnkit-fsfs.level = FINEST
svnkit-fsfs.handlers = 5svnkit.org.apache.juli.AsyncFileHandler
#
svnkit-cli.level = FINEST
svnkit-cli.handlers = 5svnkit.org.apache.juli.AsyncFileHandler
3. Restart Bamboo and check if the debug logs are generated
Restart Bamboo to apply the changes. SVNKit messages will only be logged after it is effectively instantiated. Make sure to validate if the <bamboo-install>/logs
contains svnkit.<timestamp>.log
files and if they are getting populated.
The SVNKit log handler will only write to the file after any SVNKit operation, hence, make sure to reproduce the issue you are trying to troubleshoot and validate if the additional logging has been generated in the file.
4. Get ready for log collection by Atlassian
If a Support Zip is requested by Atlassian Support, make sure to enable the "Tomcat access logs" checkbox in the Create Support zip menu so the SVNKit logs are collected.
Debugging Subversion connection in Bamboo Agents
To enable SVNKit debug logs on the Bamboo Agent, follow the steps below.
1. Create a logging.properties file
Create a <bamboo-agent-home>/conf/logging.properties
file with the following contents:
############################################################
# SVNKit-specific settings
# Set to level=FINEST to enable debug logging
# Uncomment the block below to allow SVNkit debugging
############################################################
svnkit.level=FINEST
svnkit-network.level = FINEST
svnkit-wc.level = FINEST
svnkit-fsfs.level = FINEST
svnkit-cli.level = FINEST
#
handlers = java.util.logging.FileHandler
#
java.util.logging.FileHandler.pattern = %h/logs/svnkit.%u.log
java.util.logging.FileHandler.limit = 20480KB
java.util.logging.FileHandler.count = 10
java.util.logging.FileHandler.append = true
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
2. Modify the Agent's wrapper.conf
Add the following entry to <bamboo-agent-home>/conf/wrapper.conf
. Make sure to replace X with the next available sequence number.
wrapper.java.additional.X=-Djava.util.logging.config.file=../conf/logging.properties
3. Restart the Agent and validate
After restarting the agent, run a build that includes SVN operations and then check if an svnkit.0.log.0
file was created on <bamboo-agent-home>/logs
. The Atlassian Support team may ask you to upload that file as well.