[rt-users] Installing Apache2.2.26 as a Win7 Service under Cygwin

scott.dalzell scott.dalzell at aveva.com
Thu Jan 9 08:45:17 EST 2014


I am currently having some issues with Apache that I’m trying to install/run 
as a service on Windows 7.
I want to set it up as a Windows Service so that if it ever fails over it
will restart it's self

i have installed Apache2.2.26 and configured the http.conf file (port ,
server name, modules etc) and it functions correctly when using the manual
start and stop commands

$ /usr/sbin/apache2.2.26/bin/apachectl -k stop -f
/usr/sbin/apache2.2.26/conf/httpd.conf
$ /usr/sbin/apache2.2.26/bin/apachectl -k start -f
/usr/sbin/apache2.2.26/conf/httpd.conf

I also get the 'It Works' screen when I navigate to 127.0.0.1:8080 so I’m
happy with this so far

All the issues come in when I start to install it as a service
I have installed it on my windows 7 test machine using the following command

$ cygrunsrv -I CygwinServer-Apache2.2.26d -p
/usr/sbin/apache2.2.26/bin/httpd.exe -a '-f
/usr/sbin/apache2.2.26/conf/httpd.conf' -t manual

if I then try and start the Service I get the following

$ cygrunsrv -S CygwinServer-Apache2.2.26d
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

Windows Event Viewer gave the following error

######Event Viewer Error message - START#############
The description for Event ID 0 from source CygwinServer-Apache2.2.26d cannot
be found. Either the component that raises this event is not installed on
your local computer or the installation is corrupted. You can install or
repair the component on the local computer.

If the event originated on another computer, the display information had to
be saved with the event.

The following information was included with the event: 

CygwinServer-Apache2.2.26d: PID 10564: `CygwinServer-Apache2.2.26d' service
stopped, exit status: 0
######Event Viewer Error message - END#############

This is all fairly unhelp full in my eyes until I go into Cygwin and try the
following

$ /usr/sbin/Apache2.2.26/bin/httpd.exe
(112)Address already in use: make_sock: could not bind to address [::]:8080
(112)Address already in use: make_sock: could not bind to address
0.0.0.0:8080
no listening sockets available, shutting down

It looks like the service has stopped but it has locked out the port. if I
try and stop Apache manually it still remains locked out until I restart the
machine

Does anyone have any idea why this port it freezing up when it is run as a
service?
any pointer would be very appreciated

thank you

Scott




--
View this message in context: http://requesttracker.8502.n7.nabble.com/Installing-Apache2-2-26-as-a-Win7-Service-under-Cygwin-tp56220.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.



More information about the rt-users mailing list