Cygwin service fails to start because of duplicate dll

View: New views
2 Messages — Rating Filter:   Alert me  

Cygwin service fails to start because of duplicate dll

by Stephen Wilkinson-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear All,

 

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:

 

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

 

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=''
appended:
cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a "-D" -y tcpip -e
PATH=''                                                                
 

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


Re: Cygwin service fails to start because of duplicate dll

by Christopher Faylor-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jul 02, 2009 at 02:23:15PM -0400, Stephen Wilkinson wrote:
>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:

This is covered in the FAQ:
http://cygwin.com/faq/faq-nochunks.html#faq.using.multiple-copies

Looks like you were the victim of a 3PP:
http://cygwin.com/acronyms/#3PP

cgf

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