This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fw: 1.5.7-1: Apache/httpd will not start as service (yes, I read README)


Hello,

I am running WindowsXP Home with all service packs applied. Cygwin 1.5.7-1.
Attached is the output of cygcheck -s -v -r.

Apache 1.3.29 as distributed with Cygwin 1.5.7-1 will not start as a service
for me.  I
tried using Invoker.exe, which I found out about by googling, but it will
not work.  I will
only cover the base problem with cygrunsrv in this problem report.

I did a full install of Cygwin.  Referring to
/usr/share/doc/Cygwin/apache-1.3.29-1.README,
I attempted to install apache as an NT service with the following command:

$ cygrunsrv -I Apache -d "CYGWIN httpd (apache)" -p /usr/sbin/httpd.exe -a
"-F"

The Cygwin Apache docs on the web do not include this -F flag, which is
supposedly
the trick to get it working, since Apache by default spawns children and
kills the parent,
which the NT service system doesn't like.

The service appears to be installed fine, and is listed in WindowsXP's
Service list in
Control Panel.

If I run:

$ cygwinsrv -S Apache

from the command line, a dialog box opens on my screen containing the
following message:

"httpd.exe - Application Error

The application failed to initialize properly (0xc0000022). Click on OK to
terminate the application."

This also happens if I go to the "Services" section of control panel and try
to start the service from there.
Oddly enough, the dialog which shows a progress indicator does not exit out,
and the status of the
service is listed as "Started".

However, 'ps' does not show httpd running, web browser does not connect to
localhost and

$ telnet localhost 80

gives connection refused.

There is no firewall issue, and starting httpd.exe from the command line
(directly or using apachectl)
starts the server fine (of course, exiting out of the shell kills apache,
which is why running it as a service
is desireable).

The following messages come up in the WindowsXP Event Log:

"The description for Event ID ( 0 ) in Source ( Apache ) cannot be found.
The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may be
able to use the /AUXSOURCE= flag to retrieve this description; see Help and
Support for details. The following information is part of the event: Apache
: PID 4008 : `Apache' service started."

Looks good right?  At this point the aforementioned error dialog shows up
(yes I've checked at this point before clicking
"OK", no running httpd) and when I click "OK", this event is logged:

"The description for Event ID ( 0 ) in Source ( Apache ) cannot be found.
The local computer may not have the necessary registry information or
message DLL files to display messages from a remote computer. You may be
able to use the /AUXSOURCE= flag to retrieve this description; see Help and
Support for details. The following information is part of the event: Apache
: PID 4560 : `Apache' service stopped, exit status: 128."

The log file /var/log/apache/error.log shows nothing strange:

[Mon Mar 15 01:25:53 2004] [notice] Apache/1.3.29 (Cygwin) configured -- 
resuming normal operations
[Mon Mar 15 01:25:53 2004] [notice] Accept mutex: pthread (Default: pthread)

except for maybe the fact that it doesn't show apache dying.

I appreciate any help on this issue.  Very recently people on the list say
they have httpd running as an NT
service using the instructions in the README, so I am curious to know where
I am flubbing up.

Regards,

Greg

Attachment: cygcheck.out
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]