Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN working fine and then "svn: OPTIONS 200 OK" error and "does not exist"

Tags:

svn

SVN was working just fine until a few minutes ago -- I can still browse my repository at http://svn.example.com/myrepo but when I try to perform any operation, including svn up, I get:

svn: OPTIONS of 'http://svn.example.com/myrepo': 200 OK (http://svn.example.com)

And when I tried svn cleanup http://svn.example.com/myrepo just to see what would happen, I got:

svn: 'http://svn.example.com/myrepo' does not exist

Again -- typing that into the browser, I can still browse the repository just fine. Whats going on??

like image 225
Brian Lacy Avatar asked Jul 09 '11 23:07

Brian Lacy


2 Answers

Okay, so it turns out the solution to this problem was very basic – and also very complicated.

The simple answer:

The hostname svn.mywebsite.com does not exist (at least, not as far as my development server is concerned).

For anyone else who's getting this problem, I strongly advise approaching the problem from the assumption that for whatever reason, your client simply cannot locate the SVN server.

--

The complication:

Now for me, it turned out to be a little more complex, because as I mentioned before, it WAS working -- and then it stopped.

The reason for this, in case you are interested, is that our SVN server lives on a web server along with our main application (located at http://www.mywebsite.com), which happens to be mirrored on another server, and the DNS records for mywebsite.com are being distributed on an A-B pattern between the two servers. Since the SVN client on my development server couldn't find svn.mywebsite.com, it was looking for simply mywebsite.com. Once it connected to the "A" server, where the virtualhost records exist for the SVN server, Apache took over and served the content appropriate to svn.mywebsite.com.

But at some point, my DNS cache was refreshed, and with no application logic available to quietly send the user back to the "A" server, my development server began resolving mywebsite.com to the "B" server -- where SVN hasn't even been installed.

Obviously, that's when the SVN client started saying "uh, gee, there ain't no such server." (Who knew thats what OPTIONS blah blah 200 OK meant?)

Why I'm an Idiot

Here's where the inevitable ID10T error comes into play. The reason I could consistently browse to "http://svn.mywebsite.com/myrepo" in Firefox, was because I had manually created a host entry on my PC pointing to the IP address of the "A" server.

If I'd remembered that sooner, I would have saved myself a lot of time – and a few precious Ibuprofen tablets. :)

like image 61
Brian Lacy Avatar answered Oct 06 '22 00:10

Brian Lacy


Similar problem here, with a different cause and solution.

The simple answer

Downgrade the Subversion client.

The more complicated answer

Previously, I'd been using 1.6.11 (particularly 1.6.11-SlikSvn-tag-1.6.11@935062-X64) and that worked fine. Upgraded to 1.6.17 (1.6.17-SlikSvn-tag-1.6.17@1130898-X64) and then started getting the OPTIONS of ... 200 OK error. Downgrading again fixed it. All this was made more confusing by the fact that (obviously) I could still browse the repository in my browser, and also in IntelliJ which, I assume, uses its own SVN client.

Why I'm an idiot

Since I work across two SVN repositories, and the other one works fine with both versions of the client, I didn't notice the problem until a few days after I upgraded, so I didn't immediately figure out the cause. If I'd realised that sooner, I would have saved myself a lot of time - though I stopped just short of hitting the painkillers!

</shameless plagiarism of Brian Lacy's answer>

like image 23
Martin McNulty Avatar answered Oct 06 '22 00:10

Martin McNulty