DenyHosts (as service) won't start/hangs @ cygwin 1.7.15-1 / Win7 x64

martin cygwin@drcain.sk
Fri Jun 15 00:36:00 GMT 2012


There is one more thing I've just found regarding this issue - after
DenyHosts service startup, there are two python2.6 processes running.

Here is current situation:

- tried to start DenyHosts service - same issue as always, service
hangs, syslog reports:

Jun 15 02:16:21 NUTRIA DenyHosts: PID 6568: service `DenyHosts': 7316
did not fork, sending SIGTERM
Jun 15 02:16:27 NUTRIA DenyHosts: PID 6568: service `DenyHosts': 7316
did not terminate, sending SIGKILL

- checking currently running processes:
$ ps -ef
    UID     PID    PPID  TTY        STIME COMMAND
 SYSTEM    7316    6568 ?        02:15:50 /usr/bin/python2.6
 SYSTEM    2288       1 ?        04:34:35 /usr/bin/cygrunsrv
 SYSTEM    6568       1 ?        02:15:50 /usr/bin/cygrunsrv
 censor    9872    9384 pty0     02:16:51 /usr/bin/ps
 SYSTEM    2332    2288 ?        04:34:35 /usr/sbin/syslog-ng
cyg_serv    2224       1 ?        04:34:35 /usr/bin/cygrunsrv
cyg_serv    2280    2224 ?        04:34:35 /usr/sbin/sshd
 SYSTEM    7208       1 ?        02:15:52 /usr/bin/python2.6
 censor    9384    9304 pty0     02:06:51 /usr/bin/bash
 censor    9304       1 ?        02:06:51 /usr/bin/mintty

- checking /var/run/denyhosts.pid file:
7208

So according to syslog, startup of DenyHosts is looking for PID 7316,
but denyhosts.pid reports PID 7208.
Both PIDs belong to two python2.6 processes. I have no idea, why there
are two of them, nor why Denyhosts is so "schizophrenic" with PIDs.

Please help.

Regards,

Martin



On Fri, Jun 15, 2012 at 2:13 AM, martin <cygwin at drcain.sk> wrote:
> Hello,
>
> I have set up DenyHosts for my sshd running on Windows 7 x64 (cygwin
> 1.7.15-1) based on the guides I've found in the cygwin newsgroup
> archives, but I have reached a dead end.
>
> The steps I have followed:
>
> - install and config syslog-ng (working ok), python (working ok)
> - install denyhosts (ok)
> - configure denyhosts startup script and config file (both files attached)
> - install denyhosts as a service (cygrunsrv -I DenyHosts -p
> /usr/share/denyhosts/daemon-control -a start -d DenyHosts -f
> "DenyHosts 2.6" -y sshd -x /var/run/denyhosts.pid -o)
> - after first unsuccessful start of DenyHosts service, checked the
> logs, realized /etc/hosts.deny is missing, so created the file (touch
> /etc/hosts.deny)
> - tried to start the service again -> service hangs in "starting",
> even though it seems to be working (it has successfully created one
> new entry in /etc/hosts.deny parsing latest ssh attack in the syslog)
>
> And this is dead-end for me - don't know how to make it work
> "correctly". Why dead end? There's nothing more for me in the logs to
> catch on. Denyhosts logs show normal startup:
>
> starting DenyHosts:    /usr/bin/env python /usr/bin/denyhosts.py
> --daemon --config=/usr/share/denyhosts/denyhosts.cfg
>
> and no error in "denyhosts" logfile (the one without extension) - the
> file is also logging normal operations (even new entries in
> /etc/hosts.deny).
>
> The only thing I have to catch on is the startup log of DenyHosts
> service in syslog:
>
> Jun 14 17:23:03 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#1)
> Jun 14 17:23:04 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#2)
> Jun 14 17:23:05 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#3)
> Jun 14 17:23:06 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#4)
> Jun 14 17:23:07 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#5)
> Jun 14 17:23:08 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#6)
> Jun 14 17:23:09 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#7)
> Jun 14 17:23:10 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#8)
> Jun 14 17:23:11 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#9)
> Jun 14 17:23:12 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#10)
> Jun 14 17:23:13 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#11)
> Jun 14 17:23:14 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#12)
> Jun 14 17:23:15 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#13)
> Jun 14 17:23:16 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#14)
> Jun 14 17:23:17 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#15)
> Jun 14 17:23:18 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#16)
> Jun 14 17:23:19 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#17)
> Jun 14 17:23:20 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#18)
> Jun 14 17:23:21 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#19)
> Jun 14 17:23:22 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#20)
> Jun 14 17:23:23 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#21)
> Jun 14 17:23:24 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#22)
> Jun 14 17:23:25 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#23)
> Jun 14 17:23:26 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#24)
> Jun 14 17:23:27 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#25)
> Jun 14 17:23:28 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#26)
> Jun 14 17:23:29 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#27)
> Jun 14 17:23:30 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#28)
> Jun 14 17:23:31 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#29)
> Jun 14 17:23:32 NUTRIA DenyHosts: PID 7232: service `DenyHosts':
> waiting for fork of 5516 (#30)
> Jun 14 17:23:33 NUTRIA DenyHosts: PID 7232: service `DenyHosts': 5516
> did not fork, sending SIGTERM
> Jun 14 17:23:39 NUTRIA DenyHosts: PID 7232: service `DenyHosts': 5516
> did not terminate, sending SIGKILL
>
> SIGTERM and SIGKILL are sent out automatically, but have no effect
> (service is still running, reporting, it's trying to start), even
> though they have been clearly sent.
> Any ideas what could be wrong? I'd like to have denyhosts service
> running without any issues.
>
> Thanks in advance.
>
> Best regards,
>
> Martin

--
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



More information about the Cygwin mailing list