Click here to Skip to main content
15,031,219 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
See more:
Current Need: Make SVN work in our shop.

Current skills: Last week I wrote and presented a course called "The Ten Minute SVN Expert", i.e., to show users how to set up Tortoise SVN and use it for individual source code control.

We did this with local repositories; i.e., on their laptops and notebooks and desktops.

GOOD: people can write, commit, and have courage to make mistakes.

BAD: one guy's disk fails and it's solarbanite time.

My boss has set up a far safer system on our big server with a redundant nightly backup and so on.

I have no clue what happens on the server side of this equation; as that was set up for us by a (now gone) grad student who was very good at getting things done quickly so that they work.

Now the server side software of SVN does not work. No clue what happened a month ago, but it just would not let anybody in.

We just changed offices and boss says that I will be useful if I fix this.

I look on the Tortoise SVN Site[^] where I found links to...

-- This, Subversion Edge, [^] From CollabNet
-- This, uberSVN, [^] from WanDisco
-- This, Visual SVN Server, [^] from Visual SVN

My boss REALLY wants an open source package; and I'm totally behind him all the way.

From reading the wording on these three websites mentioned above, I get a distinct feeling that I'm not really being led to what we're really after; i.e., a truly open source implementation the server side of the software.

If anyone reading here has seen this before and navigated it successfully, your suggestions will be read with great interest and appreciation.

I get the feeling that I'm not really headed toward a truly open source implementation of the server side of this.
Posted
Comments
ZurdoDev 22-Apr-13 16:34pm
   
Sorry, what's the question?
C-P-User-3 22-Apr-13 16:45pm
   
Are any of those three sites really offering a truly freeware package which is truly open source and will do the server side of the operation for the client side of Tortoise SVN ?

1 solution

Hello,

Subversion Edge should actually work for you. However if you want to go pure OpenSource way then follow the instruction (Windows 32-bit Platform Only)

  1. Grab Apache HTTPD 2.4 from here[^]
  2. Next Grab SVN from here[^]
  3. Open httpd-2.4.4-win32.zip in say 7-zip[^]. Extract the folder named Apache24 on to root folder of any drive
  4. Follow the documentation[^] to configure the HTTPD server and make sure it runs as a service
  5. Stop Apache Service
  6. Create a folder named SVN179 in the root folder of any drive
  7. Open svn-win32-1.7.9-ap24.zip in say 7-zip, extract the contents of folder named svn-win32-1.7.9 inside the zip into SVN179 folder created earlier.
  8. Copy following files from SVN179\bin folder to APACHE24\bin folder.

    • intl3_svn.dll
    • libapr-1.dll
    • libapriconv-1.dll
    • libaprutil-1.dll
    • libdb48.dll
    • libeay32.dll
    • libsasl.dll
    • libsvn_client-1.dll
    • libsvn_delta-1.dll
    • libsvn_diff-1.dll
    • libsvn_fs-1.dll
    • libsvn_ra-1.dll
    • libsvn_repos-1.dll
    • libsvn_subr-1.dll
    • libsvn_wc-1.dll
    • ssleay32.dll
  9. Next copy following files SVN179\bin folder to APACHE24\modules folder

    • mod_authz_svn.so
    • mod_dav_svn.so
    • mod_dontdothat.so
  10. Open APACHE24\conf\httpd.conf file in your favorite text editor. Change entry named DocumentRoot such that it will point to your APACHE24\htdocs folder. Then Locate the following entry and change it as shown below
    <Directory />
        AllowOverride none
        Require all denied
        # Add following lines
        Order allow,deny
        Allow from all
    </Directory>
    Add similar lines under the Directory entry for your DocumentRoot. Finally add following line at the end of the file
    Include conf/extra/subversion.conf
  11. Now create a file named subversion.conf in APACHE24\conf\extra folder. Paste following lines into it
    LoadModule  dav_module             modules/mod_dav.so
    LoadModule  dav_svn_module         modules/mod_dav_svn.so
    LoadModule  authz_svn_module       modules/mod_authz_svn.so
  12. Final step is to link the subversion with apache. To do this open subversion.conf file and add following entry, Feel free to change the paths as per your needs. I am assuming that your SVN repository is located on D:\SVNREPO folder.
    <Location /project1>
      DAV svn
      SVNPath D:/SVNREPO/project1
    </Location>


More information on setting up authentication can be found here[^]

Regards,
   
Comments
C-P-User-3 22-Apr-13 18:09pm
   
Nice, Nice, Extra Nice ! Thank you. I am going to study this in detail.
C-P-User-3 22-Apr-13 18:52pm
   
Okay, SVN was installed here about a year ago, and worked fine for months, then stopped working. The boss gave me server access and let me look around.

As of this moment, I have just looked, not touched.

From my novice examination, here's what appears to be happening.

On my desktop machine (away from the server) I rearranged my file tree to put the source files in better order.

On the server, the old file structure appears to be there. I determined this by using windows explorer and just following subdirectory trees.

Still, this does not explain why, all of a sudden, my Tortoise SVN application on my desktop cannot connect with the Server SVN application.

I welcome your (or anyone's) input.
Prasad Khandekar 23-Apr-13 1:12am
   
The above steps will setup the sver server with http protocol. Are you using http protocol or svn protocol?

Regards,
C-P-User-3 23-Apr-13 12:10pm
   
I'm not really sure which protocol we're using. I use windows explorer and right-click, and normally the http://123.456.789.012 appears automatically in the address box.

If it makes any difference, we are running Windows Server 2008 R2 Enterprise Edition (I hope I spelled it correctly and got the words in the proper order).

SVN is already on that server, it just quit working.

I altered the file httpd.conf in the Apache2-2 subdirectory.

It had the old IP address that we were using before we changed offices. We rearranged desks and computers and stuff.

I put the new IP address in that file, but that was all.

If a complete re-install would save me time and misery, I'm up for it.

I have this nagging suspicion that there is one setting somewhere that somehow got changed and that a 30 second file-open-flip-close will fix all our problems.

I am weighing that suspicion against the probability that I will spend ten times as many work hours trying to find that one file and setting than I will just re-installing the next upgrade.

I believe that we're on version 1.6 on the server and that I'm using 1.7 on the individual desktops. Boss put me on Windows 8 here and I know that I installed TortoiseSVN on this one, and it's version 1.7

I welcome better knowledge on this.

It shouldn't be too difficult find better knowledge than I have at this moment.
Prasad Khandekar 23-Apr-13 15:31pm
   
From your description it appears that you are using SVN with an http server. I don't think you will require to reinstall. Which entry did you change. For Apache it's generally the Listen entry in httpd.conf file. From command prompt type httpd -t to ensure that all configurations are correct.

Last thing is to locate Location entry containing DAV Svn and comment out the following entries if present

AuthType Basic
AuthName “Subversion Repository”
AuthUserFile conf/dav_svn.passwd
AuthzSVNAccessFile conf/svnauthz
Require valid-user

Restart Apache service and navigate to the repository via web browser. If you are able to access the repository this way then you can try correcting the authentication & authorization setup.
C-P-User-3 23-Apr-13 15:39pm
   
You asked, "... Which entry did you change. For Apache it's generally the Listen entry in httpd.conf file...."

These were my two changes in that file...

=============================CLIP=======================

#
ServerRoot "C:/Apache2-2"

#added First time installed
# ServerName 192.168.158.50
##
## 2013-APR-22
##
## I changed the server name
##
##

ServerName 192.168.183.50


## 2013-APR-22
##
## I changed the Listen command
##
##
## Was...
##
## Listen 192.168.158.50:80
##

Listen 192.168.183.50:80
C-P-User-3 23-Apr-13 15:42pm
   
The suggestion has been made to me: Make sure that Apache is running.

This is on Windows Server 2008 R2 Enterprise Edition.

How do I [make sure / restart] Apache on Windows Server 2008 R2 Enterprise Edition ?

Slightly embarrassed about the zero clue state of mind here, but swallowing pride to get this thing fixed for us.
Prasad Khandekar 23-Apr-13 15:50pm
   
Sorry I missed ServerName, In my configuration files it is commented.

Right Click MyComputer, Select Manage then navigate to Services And Applications in left side tree view expand it & finally click on Services. Or Another way is via Administrative Tools Menu. You can even use Net Start command to see whether Apache2.2 is running or not. (Check out this guide http://httpd.apache.org/docs/2.2/platform/windows.html).
Regards,
C-P-User-3 23-Apr-13 16:11pm
   
Okay, status is blank; not started, not manual, not nothing. Do I just guess on how to start him ? Double Click on him ?

I clicked on Properties, and the service status was "stopped" I clicked on "Start" and a window popped up, with a status bar, followed by another window saying that windows couldn't start Apache on this server. So duh. You keep going, I'm really reading your comments with great interest.
C-P-User-3 23-Apr-13 16:15pm
   
Service Specific Error Code 1, if that helps.
C-P-User-3 23-Apr-13 16:29pm
   
Apache is the problem.

Apache has stopped.

When I try to start it, I Get "service specific error: 1"

Found this...

http://netheadaches.wordpress.com/2007/10/08/apache-not-starting-win32-apache2-service-terminated-with-service-specific-error-1-0x1/


This is the claim: "...It happens because apache tries to access a file in a folder which doesn’t exist..."

Big "DUH" here; which file, which folder ?
C-P-User-3 23-Apr-13 17:42pm
   
Looked in the (purported) log file subdirectory. Even though I can generate that error consistently, it does not show up in the file named "error.log", and in fact, no file in that entire subdirectory shows any activity at all
Prasad Khandekar 24-Apr-13 2:57am
   
try running httpd.exe -t from command line. If there are any configuration errors those will get highlighted. Httpd.exe will generally fail if there are configuration errors. The suggested link also discusses about various reasons why you get service speicifc error -1, e.g. Port 80 is already in use by some other process. Check whether www service is running or not. Try changing port to 81 in httpd.conf.
C-P-User-3 24-Apr-13 9:39am
   
If I change to port 81, do I need to change the port in the URL when I use TortoiseSVN on the other desktop computers that are accessing it ? Or is TortoiseSVN and Apache smart enough to do the magic to make it work by themselves ?
C-P-User-3 24-Apr-13 9:44am
   
Did that, tried both, "http.exe -t", and "http -t", (no quotes either time) with and without the ".exe"

No clue where that program is. Evidently, it's not in the path statement either.

Here is a cut-and-paste from the session

=========================CLIP==========================


C:\Users\Administrator>httpd.exe -t
'httpd.exe' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Administrator>httpd -t
'httpd' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Administrator>
Prasad Khandekar 24-Apr-13 10:13am
   
You said that you have edited the httpd.conf file, the httpd.exe is located in ..\bin folder. ie. if your httpd.conf file is located at path C:\Apache2.2\conf then httpd.exe can be found at C:\Apache2.2\bin folder.

If you change the port then you will have to first use relocate from tortoisessvn. You will be presented with a dialog in which you will have to type the new url.
C-P-User-3 24-Apr-13 12:59pm
   
Sorry for my delayed response; put out the latest fire of the day.

Just looked in that subdirectory.

Nothing found.

Will cut and paste in next message
C-P-User-3 24-Apr-13 13:20pm
   
That directory is empty. Take a look.


====================================CLIP=================================


C:\Apache2-2\bin>DIR
Volume in drive C is RAID5-2Tb
Volume Serial Number is 7CC0-3EBF

Directory of C:\Apache2-2\bin
02/27/2012 01:15 PM .
02/27/2012 01:15 PM ..
01/12/2012 08:21 PM 0 xyz
01/26/2012 04:17 PM 48 passwd
2 File(s) 48 bytes
2 Dir(s) 58,299,184,640 bytes free

C:\Apache2-2\bin>
Prasad Khandekar 25-Apr-13 1:09am
   
Hello,

In the service control panel of windows what's the path for httpd.exe? is it same as C:\Apache2-2. If not then check that directory structure. If you still can not find the httpd.exe then you will have to re-install the Apache Httpd Server.

Regards,
C-P-User-3 25-Apr-13 10:52am
   
Duh. The phrase, "...service control panel of windows..." is new to me. I did not know that it exists. On my server I find a "Server Manager" with a "Services" pane in that window. Is that what I'm looking for ?

If so, I see no httpd.exe or anything even close to that. In fact, I only see three entries which start with the letter "H".

I just opened a Windows Explorer window, clicked on the "C:" drive, and from the keyboard pressed Control-F, and started a search for a file named "httpd.exe"

The thing has a drive with maybe 2TB so I guess it's going to be quite a wait to see what happens.

Brass tacks: I don't think that httpd.exe exists on this machine.

No clue as to how it was removed.

If this is what started causing our problems several weeks ago, then I have a rough idea of when it was removed.
Prasad Khandekar 25-Apr-13 10:58am
   
Well Sorry for the new term. It's the same as MMC (Management Control Panel) (Start Menu => All Programs => Administrative Tools ==> Service). In your earlier posts you have said that you tried to start the Apache service from it.
C-P-User-3 25-Apr-13 11:06am
   
Don't worry, since the boss put me on this; everything is new to me.
C-P-User-3 25-Apr-13 11:22am
   
Aha, so I can start "services" from the admin tools, or I can start the "Server Manager" which can show me the "services".

Okay, either way, I don't see httpd.exe or anything that looks similar.

Is it time for me to go back to the top of this thread and start following your original installation instructions ? I'm willing to do that, but if it's just this one missing file, that would, obviously, be a better fix.
Prasad Khandekar 25-Apr-13 11:27am
   
You wont find service named httpd. In your case it's most likely Apache2.2 Search this service and see the properties. In there you can find the full path to httpd.exe
C-P-User-3 25-Apr-13 11:32am
   
This ?

"C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin\httpd.exe" -k runservice
C-P-User-3 25-Apr-13 11:36am
   
Found httpd.exe there. I will now go back and read your prvious instructions.
C-P-User-3 25-Apr-13 13:44pm
   
Hey, thanks for your input.

Here is what was going on.

On the server on which SVN and Apache are installed, in the root directory, there is (don't ask me why) a subdirectory called "Apache2.2"

As you can imagine, that was highly confusing, and extremely misleading.

The real Apache stuff was in a completely different subdirectory.

The moment I found the real one,

-- I opened httpd.conf file in the conf folder,
-- changed the IP address on the "Listen" command,
-- switched back to the bin subdirectory
-- ran httpd with whatever the parameters are supposed to be

I then yelled across the room to the boss and told him to try SVN and it worked.

Thank you very much for your input. This will be valuable to me in the future, and to others as well.
Prasad Khandekar 26-Apr-13 2:03am
   
You are welcome. Really glad to know that your problem got resolved.
Sergey Alexandrovich Kryukov 22-Apr-13 21:36pm
   
Looks nice, my 5. (I trust this is really the way, so far, did not have a chance to check up.)
I used Visual SVN Server as the fastest way to do it on Windows.

The best fully open-source way I tried was Linux + Apache + SVN + Trac, HTTPS-based, integrated, all with standard installation and manual build, support scripts written by myself. Linux is generally a good platform for such services. If you do it all step-by-step, you really sure you can always re-create the environment from scratch.
The reason why I did not provided it as a formal answer: I don't remember all those steps; and there is no a need to remember: you just to all steps "by definition", reading standard documentation.

—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900