2
votes

On a PC with Vista 32Bit SP2 (UAC activated, Kaspersky Security Suite with firewall activated) I have set up a Subversion server (using the SlikSVN installer 1.6.13), a Tomcat 7.0, Java 6u21 and Hudson 1.386. I am accessing Hudson through the http-Interface using Firefox 3.6 ("http://localhost:8080/hudson"). I downloaded a simple demo repo and started the subversion server, adding the repo. When the command

"svn list svn://localhost/gameoflife/trunk"

is entered at the command prompt the server prints out the list. I can access the repo with TortoiseSVN by right-clicking on its folder at the Windows Explorer, too. Everything seems to be set up correctly. But the following two things don't work:

  1. Entering "svn://localhost/gameoflife/trunk" in the browser. The browser requests whether he should use TortoiseSVN to open it, but after agreeing, TortoiseSVN can't connect ("refused by server").

  2. Much more important and the reason for my question is that Hudson can't connect to the SVN. The build log shows "ERROR: Failed to check out svn://localhost/gameoflife/trunk". The project configuration complains that the repository URL "svn://localhost/gameoflife/trunk" can't be accessed ("svn:connection refused by the server") and suggests to add authorization information. But I haven't set up a user or password on the svn server. I have updated the Hudson Subversion plugin from 1.20 to 1.21, but that didn't change anything. Disabling the firewall didn't change anything.

I am quite sure I followed detailed step-by-step instructions closely when I set up the build server, but being no pro with Subversion nor Hudson I am stuck now. Hence my question: What is the reason Hudson can't access Subversion and how can I make it work?

UPDATE: I made sure that Vista's host file has "127.0.0.1 localhost" in it (but URL doesn't work even when entering 127.0.0.1 instead of localhost). I checked that port 3690 is not blocked by a firewall. My error message doesn't state it has authentication errors, nor does it say that the server actively refuses the connection. It is the same error message one gets when entering a not existing URL. If the very same URL would not work at the console prompt I'd assume I had a typo in it, but I double-checked several times. It might be a Vista problem, but I still can't find the solution.

UPDATE 2: I am more and more convinced it must be a side-effect of the way my Vista system is (mis)configured. Hudson works, Subversion works. But they won't work together if both are running on the same machine. I was able to access a remote Subversion server from within Hudson without a problem. But the same Hudson wasn't able to access Subversion locally. I reproduced the "doesn't work together locally" behaviour when setting it up on a similar configured Vista-PC (main difference using 64 bit versions this time and Avira freeware instead of Kaspersky).

I tried exchanging the Subversion distribution with a different one (VisualSVN-Server 2.1.4) and tried accessing it with https. Initially I seemed to make progress, but now it failed with an handshake error when the files were about to be retrieved from the repo.

Since I can't locate the cause of my problem, I am switching to a different CI-Build-Tool now. Nonetheless thank you for investing your time to help me.

5

5 Answers

2
votes

First of all, can you log in as your Hudson user (i.e., the user who runs the Hudson server), and see if that Hudson user can access the subversion database?

That will point out the problem about 90% of the time. It usually is some minor issue such as a bad PATH or bad authentication. If you can checkout and build from the command line as the Hudson user, you should be able to do it through Hudson.

I know on Windows, a server process can generate some server user which can't be logged in from the command line, but you can also specify a real user as the server process too. It's better with Subversion and Hudson to specify a real user, so you can do command line debugging when necessary.

It sounds like you're trying to browse a Subversion repository which is using the svnserve server with a web browser. Most web browsers can't normally handle the svn protocol.

What you should do is use something like ViewVC or Sventon for browsing the repository in a web browser. Hudson plays nicely with both of these packages and will integrate it's change report with these packages. Clicking on a file name will show you the diffs between the version that was used in the build, and the previous version.

ViewVC uses Python and Sventon is a Java package. I prefer Sventon because it doesn't need to live on your Subversion repository server.

1
votes

Hudson could not connect anonymously to svnserve on Windows 7 (64 Bit) with the standard defaults. The following parameters added to the command line were successful.

svnserve -d --listen-port 3690 --listen-host 127.0.0.1 -r svn-repos

0
votes

It sounds like you need authentication to talk to subversion. If anonymous read isn't a problem for your company I suggest you set up your server to allow anonymous read requests.

If it is a problem you can enter authentication details in hudson.

If your using a modern version it should inform you authentication has failed and you need to enter credentials.

0
votes

Try to connect to port 3690 using telnet (telnet localhost 3690). If it doesn't work, check that you have svnserve daemon/service installed and that it is running.

Do you have proxy configured for JVM (on Windows this could be done in Java Control Panel, and by default Internet Explorer settings are used). If so, try disabling proxy.

These two tips are taken from http://old.nabble.com/SVN-protocol.-Connection-refused-by-the-server-tt22481558.html#a22481558

The last comment says:

... I'm just curious why behaviour of SVNKit and command line SVN differs?

0
votes

Other solution...

Svn server only responds to ipv6... I cannot explain why, I am not neither a windows or network guru, but it works...

My /windows/system32/drivers/etc/hosts:

127.0.0.1       localhost4
::1             localhost6
::1             local-svn
127.0.0.1       local-tomcat

I acces svn using svn://local-svn//trunk/... I access tomcat using http://local-tomcat:8080/

Trying to use ipv6 to access tomcat fails. Trying to use ipv4 to access svn fails.