Forum

Running as a Windows servers

JTE
11 August 2008, 12:19
Hello,

Everything works fine when run from the command prompt, but I have problems using Hiawatha as a Windows service. I use the Windows 2003 operating system. I can create a service with the "sc" command, at least is ends with "success". But when started with the services gui it fails with:

"Could not start the hiawatha service on the local computer,
Error 1053: the service did not respond to the start of the control request in a timely fashion".

Command used to create the service:
sc create hiawatha binpath= "c:\Program Files\Hiawatha\bin\hiawatha.exe" displayName= "Hiawatha webserver" start= auto depend= Tcpip

Does anyone know how to start Hiawatha as a system service?
Thanks.
Hugo Leisink
11 August 2008, 12:56
Hiawatha was originaly designed for Unix. I've managed to get Hiawatha working under Windows because of Cygwin (a collection of libraries to make unix programs work under Windows). Therefor, Hiawatha for Windows is not a native Windows binary. Because of that, I think running Hiawatha as a Windows service will not work, but I'm no Windows expert. Maybe other people know some sort of trick to get it done.
Hugo Leisink
11 August 2008, 13:23
Oke, I think I've found something. Cygwin has a tool that starts a Cygwin daemon as a Windows Service.

Download this zipfile [projects.leisink.org], place the executable in it in the Hiawatha\bin directory (which contains cygwin1.dll), open a Command Prompt, go to that bin directory and use the following command:

cygrunsrv.exe -I hiawatha -d "Hiawatha webserver" -p "C:\Program Files\Hiawatha\bin\hiawatha.exe" -a "-d"

If everything went well, you can now start and stop the Hiawatha webservers via the Services panel in the Computer Management program. It worked for me. Please let me know if it also works for you.
This topic has been closed.