JIRA Subversion plugin cannot be enabled due to some repositories having unreachable URLs

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When attempting to enable the JIRA Subversion Plugin, it fails and the UPM shows the error: 

The call to the JIRA server did not complete within the timeout period. We are unsure of the result of this operation.

The following appears in the atlassian-jira.log:

2014-04-22 09:08:03,180 ThreadPoolAsyncTaskExecutor::Thread 39 ERROR xxxx 546x4150x1 xxxx 0:0:0:0:0:0:0:1 /rest/plugins/1.0/com.atlassian.jira.plugin.ext.subversion-key [plugin.ext.subversion.SubversionManagerImpl] Connection to Subversion repository http://my.subver.local:3690/svn/MyProject/code/branches/branch-1 failed: org.tmatesoft.svn.core.SVNException: svn: E175002: unknown host
svn: E175002: OPTIONS request failed on '/svn/MyProject/code/branches/branch-1'
org.tmatesoft.svn.core.SVNException: svn: E175002: unknown host
svn: E175002: OPTIONS request failed on '/svn/MyProject/code/branches/branch-1'
	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:106)
	at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:90)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:662)
	...
Caused by: java.net.UnknownHostException: my.subver.local
	at java.net.InetAddress.getAllByName0(Unknown Source)
	at java.net.InetAddress.getAllByName(Unknown Source)
	at java.net.InetAddress.getAllByName(Unknown Source)
	at java.net.InetAddress.getByName(Unknown Source)
	at org.tmatesoft.svn.core.internal.util.SVNSocketFactory.createAddres(SVNSocketFactory.java:155)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.connect(HTTPConnection.java:192)
	at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:343)
	... 42 more

And then at the end of the plugin enable timeout, the following can be seen:

2014-04-22 09:08:03,289 http-bio-8080-exec-20 ERROR jiraint 546x4150x1 1y481mo 0:0:0:0:0:0:0:1 /rest/plugins/1.0/com.atlassian.jira.plugin.ext.subversion-key [atlassian.plugin.manager.PluginEnabler] Unable to start the following plugins due to timeout while waiting for plugin to enable: com.atlassian.jira.plugin.ext.subversion

Cause

One or more of the configured SVN repositories have an unreachable URL to the repository root. From the example above, we can identify the unreachable URL as:

Connection to Subversion repository http://my.subver.local:3690/svn/MyProject/code/branches/branch-1 failed
... Caused by: java.net.UnknownHostException: my.subver.local

When enabling the Subversion plugin, it tries to connect to each of the configured repositories. If one or more repositories have an unreachable URL, the plugin will time out and fail to enable. (as seen in the second stack trace above)

You will need to check if the URL has been correctly configured in the first place. If the URL has been wrongly configured or the Subversion repository location has changed, follow the resolution steps to fix the broken URLs in the database.

Resolution

The resolution is to change the Repository URLs in the database to the correct Subversion URLs.

  • Stop JIRA.
  • Run the following SQL query to obtain a list of all configured SVN repositories and their root URLs.

    SELECT * FROM propertyentry LEFT JOIN propertystring ON propertyentry.ID = propertystring.ID WHERE PROPERTY_KEY like 'svn.root';

    The returned results will look like this:

  • From the above, we can see the URL in the propertystring table. We need to update this value with the correct URL to the Subversion repository root.
  • To update, run the following SQL query:

    UPDATE propertystring SET propertyvalue = "svn://localhost/prototypeproject2" WHERE ID = 16688;
    tip/resting Created with Sketch.

    The ID must match the row in which it is being modified. In the above example, the ID is 16688.

  • Restart JIRA, and try enabling the Subversion plugin again.
tip/resting Created with Sketch.

Always ensure that you have a database backup handy before performing direct database edits.

Last modified on Nov 12, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.