InstallingFitNesseAsaService
I retrieved this from a cache, the content had been replaced with a porn link. Someone should clean it up, but I don't have time right now. I hope you find badly formatted content better than no content at all.
Richard Manion
Installing the FitNesse server as a service can be done by using the SrvAny program.
This works on any Windows computer that FitNesse itself can run on. Always first test that you have the requirements met and that the server runs without running as a service before trying this. Otherwise it will just make finding errors harder.
It has been tested positive by me on Windows XP SP2 and Windows 2000 SP4.
svrany.exe is what the name implies. A program that lets you run (almost) any other program as a service. It is definitely a must have tool. You can read moe about it here.
You may be wondering why you don't just put the .exe and parameters into a .bat file and then run that, and actually an earlier version of this guide did just that. Unfortunately I discovered that it had the unfortunate effect that you couldn't stop the server properly. The java process was hanging around after the service was stopped. Since that was rather messy, I prefer the current way of doing things.
You can download this here
This kit will work with at Windows Server 2003, Windows XP and Windows 2000. Perhaps you will need an older Resource kit for older servers, the srvany program has been around since Windows NT 4.0 so it will probably work.ni
Note: 2/18/2006: I found on W2K? Release 4 that the Microsoft Resource Kit would NOT install; threw an error: "This product requires Windows XP or a later version to have been installed". Found the srvany.exe and instsrv.exe files in a zip at http://www.tacktech.com/display.cfm?ttid=197; otherwise the installation instructions above worked perfectly - Dave Jennings
[.FrontPage] [.RecentChanges]
Richard Manion
Installing FitNesse as a service.
- by ThomasGravgaard
Installing the FitNesse server as a service can be done by using the SrvAny program.
This works on any Windows computer that FitNesse itself can run on. Always first test that you have the requirements met and that the server runs without running as a service before trying this. Otherwise it will just make finding errors harder.
It has been tested positive by me on Windows XP SP2 and Windows 2000 SP4.
Requirements
- A Java runtime - needed to run FitNesse .
- The srvany.exe and instsrv.exe from the Windows 2003 Resource Kit (see Note).
- An account on the machine that has Log On As Service rights and full rights to the directory where FitNesse runs and keeps its files.
- The .NET Redist if you want to use the .NET version of the FitNesse server.
- An account with access to the machine to install it on and sufficient rights to do that - this usually means local administrator rights.
Background
svrany.exe is what the name implies. A program that lets you run (almost) any other program as a service. It is definitely a must have tool. You can read moe about it here.
Installing the service
- Ready your FitNesse installation by writing down the parameters you want to start the server with. This starts the default FitNesse server on port 8080 on your machine and is what we are using here :
java -cp fitnesse.jar fitnesse.FitNesse -p 8080
- Fire the command up in a command line and make sure your FitNesse server works to your satisfaction before proceeding. It is easier to debug this way.
- Install the Windows 2003 Resource Kit. You will only need the instsrv.exe and srvany.exe programs. So you can copy those out and deinstall the kit if you don't want it around.
- Have the account that the server should run as ready or create it. Local system will not do as we need networking rights. Here the machine we are running on is named MYMACHINE and the account is called fitnesse, its password is soSecret, just so you can see what is going on in the next step.
- Use the instsrv.exe program to install the srvany.exe program by using it like this from the command-line:
instsrv.exe FitNesse "<path to the srvany.exe file>\srvany.exe" -a MYMACHINE\fitnesse -p soSecret
- Run the regedit.exe program to set the last parameters.
- Find the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet?\Services\FitNesse
- Create a subkey with the name Parameters
- In the parameters key, create a string value called Application and set its value to the full path of the java.exe file. For me it was : C:\Program Files\Java\jre1.5.0_04\bin\java.exe.
- Create another string value called AppDirectory and set its value to the path where you want the executable to run. The directory where your FitNesse files are located : c:\Program Files\FitNesse
- Create a last string value called AppParameters containing the parameters passed to the java executable above : -cp fitnesse.jar fitnesse.FitNesse -p 8080
- Roll the drums... Open the service control panel and start the service (or type net start FitNesse from the command line you've got anyway).
- Use your favorite browser and open http://localhost:8080. You should see the FitNesse Wiki.
You may be wondering why you don't just put the .exe and parameters into a .bat file and then run that, and actually an earlier version of this guide did just that. Unfortunately I discovered that it had the unfortunate effect that you couldn't stop the server properly. The java process was hanging around after the service was stopped. Since that was rather messy, I prefer the current way of doing things.
Troubleshooting
- RTFM... Again.
- Check that FitNesse ran from the commandline (you skipped that step - right?)
- Check that the acoount has rights. To the filesystem where FitNesse keeps its files for instance.
- You're not running another server on the same port (IIS on port 80?)
- Your firewall is not blocking incoming traffic to the port.
- Google your problem
Windows 2003 Resource Kit Note
You can download this here
This kit will work with at Windows Server 2003, Windows XP and Windows 2000. Perhaps you will need an older Resource kit for older servers, the srvany program has been around since Windows NT 4.0 so it will probably work.ni
Note: 2/18/2006: I found on W2K? Release 4 that the Microsoft Resource Kit would NOT install; threw an error: "This product requires Windows XP or a later version to have been installed". Found the srvany.exe and instsrv.exe files in a zip at http://www.tacktech.com/display.cfm?ttid=197; otherwise the installation instructions above worked perfectly - Dave Jennings
[.FrontPage] [.RecentChanges]