From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: cygrunsrv does not start cygsshd at boot
Date: Wed, 22 Jan 2020 22:08:00 -0000 [thread overview]
Message-ID: <fb56f8c5-8b93-655e-f949-d7f7a52a073f@SystematicSw.ab.ca> (raw)
In-Reply-To: <87muafs6bk.fsf@Otto.invalid>
On 2020-01-22 11:18, ASSI wrote:
> Andrew J. Schorr writes:
>>> Try to set the service to "delayed start" instead and see if that helps.
>>
>> Thanks for the suggestion; that seems to fix the issue. Is this a known
>> problem due to some updates to Windows 10 and/or Cygwin? I have not had
>> this problem in the past.
>
> Win10 is better at starting fast (including parallelization of startup
> across the available cores) and just the fact that TCP/IP is up seems
> not enough for sshd to function correctly.
I've used dnscache for network service dependencies (and cygserver and syslog-ng
for other Cygwin services) with delayed start and preshutdown (cygrunsrv -O,
--preshutdown).
Where previous usage was cygrunsrv -t, --type manual is now called demand
service startup type.
You can set service startup type using:
$ sc config cygsshd start= boot|system|auto|demand|disabled|delayed-auto
# option flag requires = and the value must be a separate argument
and check them using:
$ sc query cygsshd
SERVICE_NAME: cygsshd
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_PRESHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
$ sc qc cygsshd
[SC] QueryServiceConfig SUCCESS
SERVICE_NAME: cygsshd
TYPE : 10 WIN32_OWN_PROCESS
START_TYPE : 3 DEMAND_START
ERROR_CONTROL : 1 NORMAL
BINARY_PATH_NAME : C:\...\bin\cygrunsrv.exe
LOAD_ORDER_GROUP :
TAG : 0
DISPLAY_NAME : CYGWIN sshd
DEPENDENCIES : dnscache
: cygserver
: syslog-ng
SERVICE_START_NAME : LocalSystem
$ regtool -pv list
/proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/cygsshd/
...
Start (REG_DWORD) = 0x00000002 (2) # [auto]
DelayedAutostart (REG_DWORD) = 0x00000001 (1) # [delayed]
...
$ regtool -pv list
/proc/registry/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/cygsshd/Parameters/
...
Preshutdown (REG_DWORD) = 0x00000001 (1) # [preshutdown]
...
As the reg entries show, you can also do this by adding or setting registry
entries using Cygwin regtool, Windows reg, or regedit commands.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2020-01-22 22:08 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 17:02 Andrew J. Schorr
2020-01-21 20:37 ` Achim Gratz
2020-01-22 16:05 ` Andrew J. Schorr
2020-01-22 18:18 ` ASSI
2020-01-22 22:08 ` Brian Inglis [this message]
2020-01-22 22:23 ` Brian Inglis
2020-01-28 21:35 ` Andrey Repin
2020-01-28 22:21 ` Brian Inglis
2020-01-23 15:54 ` Andrew J. Schorr
2020-01-28 21:56 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2020-01-28 22:28 ` Brian Inglis
2020-01-29 6:39 ` Brian Inglis
2020-01-29 18:55 Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin
2020-01-29 23:08 ` Brian Inglis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fb56f8c5-8b93-655e-f949-d7f7a52a073f@SystematicSw.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).