delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/22/15:22:14

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
From: "Miles Sabin" <miles AT mistral DOT co DOT uk>
To: <cygwin AT cygwin DOT com>
Subject: cygrunsrv: possible solution to a common problem
Date: Mon, 22 Oct 2001 20:21:17 +0100
Message-ID: <000001c15b2e$b9c89c80$a3eab8c3@milessabin.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
Note-from-DJ: This may be spam

Apologies if this has been posted before, or if it's blindingly
obvious (being a *nix rather than windows person it wasn't at all
obvious to me).

A while back I posted with a query about a cygrunsrv service almost
always failing to start on boot despite being configured for automatic
startup. The service in question was rinetd, and I'd always see the
following kind of errors in the Win2k System Log,

  Event Type:	Error
  Event Source:	Service Control Manager
  Event Category:	None
  Event ID:	7009
  Date:		22/10/2001
  Time:		7:16:57 pm
  User:		N/A
  Computer:	XXX
  Description:
  Timeout (30000 milliseconds) waiting for the rinetd service to 
  connect. 

  Event Type:	Error
  Event Source:	Service Control Manager
  Event Category:	None
  Event ID:	7000
  Date:		22/10/2001
  Time:		7:16:57 pm
  User:		N/A
  Computer:	XXX
  Description:
  The rinetd service failed to start due to the following error: 
  The service did not respond to the start or control request in a   
  timely fashion.  

From what I can make out from the archives this seems to be quite a 
common problem with a variety of daemons.

I didn't expect the latest cygrunsrv update to change anything, but in 
the process of fiddling around just on the offchance that it might I
noticed its -y/--dep option. Combined with rinetd's error logs,

  rinetd: couldn't bind to address a.b.c.d port e

which had previously made no sense to me, because there was definitely
never anything listening on the relevant port, a little lightbulb
went off ...

rinetd is a network app, so pretty clearly depends on the availablity
of networking services. I'd installed it with no dependencies, so on
startup there was a race condition: mostly it'd try to start before
the networking services and fail, but occasionally the latter would
get there first and rinetd would start successfully.

A quick comparison with a few other similar (non-cygwin) services, the  
description of the Workstation service ("Provides network connections 
and communications"), and these,

  http://support.microsoft.com/support/kb/articles/Q193/8/88.ASP
  http://httpd.apache.org/docs/win_service.html

suggested that adding --dep LanmanWorkstation would help.

And it did ... automatic startup now seems to work perfectly. My
hunch is that this will also cure startup problems with other daemons
which attempt to bind ports early on in their startup sequence.

Cheers,


Miles


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019