Installation of cygserver as a Win2k service says it fails to start but ps show it as running.

John Griffiths fedora@grifent.com
Fri Oct 28 19:23:00 GMT 2005


We have several computers running Windows 2000 and Cygwin. On some of 
the computers, cygwin has been installed and removed several times for 
various reasons, new version of cygwin, etc. These installations were 
not always done by Administrator; they may have been done by another 
user with administrator privileges.

After installing cygwin, I install some cygwin applications as Windows 
services using cygrunsrv, for instance, cygserver.

    Administrator@snowwhite ~
    $     cygserver-config --yes
    Overwrite existing /etc/cygserver.conf file? (yes/no) yes
    Generating /etc/cygserver.conf file


    Warning: The following function requires administrator privileges!

    Do you want to install cygserver as service?
    (Say no if it's already installed as service) (yes/no) yes

    The service has been installed under LocalSystem account.
    To start it, call cygrunsrv -S cygserver'.

    Further configuration options are available by editing the configuration
    file /etc/cygserver.conf.  Please read the inline information in that
    file carefully. The best option for the start is to just leave it alone.

    Please keep in mind, that a client application which wants to use
    the services provided by cygserver *must* have the environment variable
    CYGWIN set so that it contains the word server.  So, if you don't
    need any other special CYGWIN setting, just set it to server.

    It is advisable to add this setting to the Windows system environment.

    Basic Cygserver configuration finished. Have fun!


    Administrator@snowwhite ~
    $     cygrunsrv -S cygserver
    cygrunsrv: Error starting a service: QueryServiceStatus:  Win32
    error 1062:
    The service has not been started.


    Administrator@snowwhite ~
    $     cygrunsrv -Q cygserver
    Service             : cygserver
    Display name        : CYGWIN cygserver
    Current State       : Stopped
    Command             : /usr/sbin/cygserver


    Administrator@snowwhite ~
    $ ps -ef
         UID     PID    PPID TTY     STIME COMMAND
    Administ    2108       1 con  14:14:40 /usr/bin/bash
    Administ    1928       1 con  14:14:55 /usr/bin/bash
      SYSTEM    2148    2176   ?  14:15:32 /usr/sbin/cygserver
    Administ    2160    2108 con  14:15:43 /usr/bin/ps

The service shows up in the Windows services but not as started. Trying 
to start the service fails because it is already running.

This also happens for sshd and postgres.

The only way I have found to clear up the situation is to format the 
hard drive and reinstall Win2k which is a bit drastic. I hope there is a 
better solution. I tried searching the archives but did not see a 
solution or even the same problem.

I have attached the output of cygcheck -s -v -r .

I will be thankful for any and all help.

Regards,
John


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygwin.snowwhite
URL: <http://cygwin.com/pipermail/cygwin/attachments/20051028/d7561e42/attachment.ksh>
-------------- next part --------------
--
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/


More information about the Cygwin mailing list