[stunnel-users] slightly OT: starting up multiple instances

Dan Langille dan at langille.org
Wed Jun 1 15:24:10 CEST 2005


On 1 Jun 2005 at 13:45, Colin McKinnon wrote:

> Hi all,
> 
> I realise this is slightly OT (the problem seems to be in a different
> program) but thought that someobdy out there may have solved this one
> already. I'm trying to run a second instance of stunnel (different
> 'verify' level) on a SuSE 8.2 box.
> 
> The second instance just doesn't start.
> 
> What I did was to copy the supplied /etc/init.d/stunnel script to
> 'stunnelv' and referenced different config and PID files. After I had
> fixed bug in the startup script (the line which started the process -
> using startproc - didn't pass the conf file, and didn't get told to
> use the PID file) I still got the same error.
> 
> Now, if I run '/etc/init.d/stunnel start' I get /var/run/stunnel.pid.
> If I then run '/etc/init.d/stunnelv start' it reports 'OK' but didn't
> really start. If I start them the other way around 'stunnelv' works
> and I get /var/run/stunnelv.pid but then 'stunnel' won't start.
> 
> Thinking that 'startproc' is seeing 'stunnel' already running in the
> processlist, I tried creating a symbolic link '/usr/sbin/stunelv' to
> /usr/bin/stunnel and changed '/etc/init.d/stunnelv' to run that
> instead of '/usr/sbin/stunnel'. Looking in 'ps' it is reported as
> 'stunnelv' but I still can't get the second instance to start.
> 
> The error seems to be with 'startproc' - it seems to think that the
> intended process is running when it's not. If I just type in the line
> which starts up stunnel as shown below I get the same behaviour.
> 
> startproc -v -l /var/log/rc.stunnelv.log -p /var/run/stunnelv.pid
> /usr/sbin/stunnelv /etc/stunnel/verified_clients.conf
> 
> Unfortunately, the '-v' option doesn't seem to work.
> 
> Anybody any suggestions?

FWIW, I have two stunnel instances running under FreeBSD:

[dan at nezlok:~] $ ps auwx | grep stunnel
stunnel 44509  0.0  0.2  2756 1032  ??  Ss   28Apr05   0:31.58 
/usr/local/sbin/stunnel /usr/local/etc/stunnel/stunnel-server.conf
stunnel 44494  0.0  0.2  3156 1148  ??  Ss   28Apr05   4:20.44 
/usr/local/sbin/stunnel /usr/local/etc/stunnel/stunnel.conf
[dan at nezlok:~] $

Examining the diffs between the two configuration files:

< chroot = /var/tmp/stunnel
---
> chroot = /var/tmp/stunnel-server

That might be a starting point.


-- 
Dan Langille : http://www.langille.org/
BSDCan - The Technical BSD Conference - http://www.bsdcan.org/





More information about the stunnel-users mailing list