X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Cygwin service fails to start because of duplicate dll Date: Thu, 2 Jul 2009 14:23:15 -0400 Message-ID: <18628-63914@sneakemail.com> From: "Stephen Wilkinson" <307cdqf02 AT sneakemail DOT com> To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Dear All, =20 In case anyone else encounters problems starting services because of duplicate cygwin1.dll on the path, here is how I found out that the duplicate was the problem and the workaround I use: =20 After installing sshd (with ssh-host-config script), I could start the service from the command line (/usr/sbin/sshd) but it failed to start automatically at boot-up or from the Windows Services dialog box. By looking in the Windows Event Viewer I found that the service was failing with because: The following information is part of the event: sshd: PID 2564: Possible duplicate cygwin1.dll: /cygdrive/c/Merant/DIMENS~1/8.0/PROG/cygwin1.dll.. =20 If I removed Merant/DIMENS~1/8.0/PROG from the Path environment variable and rebooted, the service started properly (reboot needed to make sure that the path used by the service is up to date). Unfortunately, I'm not allowed to do this permanently on this work machine, so I instead I changed the PATH environment variable which the service sees when it runs, to stop it from seeing the duplicate dll... to do this you have to first uninstall the original service (installed by the ssh-host-config script), and re-install with the new environment options. At the Cygwin prompt: 1. remove the isntalled service: cygrunsrv -R sshd 2. re-install the service with the additional parameter -e PATH=3D'' appended: cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a "-D" -y tcpip -e PATH=3D''=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 =20 HTH, Steve -- 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