stunnel init.d script doesnt work at boot time but works later on

Bug #368545 reported by Erwan Hamon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
stunnel4 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: stunnel4

On fresh Jaunty Ubuntu 9.04 install
Linux ubuntu 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux

#apt-cache policy stunnel
stunnel:
  Installé : 3:4.22-2
  Candidat : 3:4.22-2
 Table de version :
 *** 3:4.22-2 0
        500 http://fr.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status

With /etc/default/stunnel4 ENABLED set to 1

I get:
#ps -aef | grep stunnel
root 4459 1 0 13:20 ? 00:00:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
with no errors in /var/log/messages. Stunnel is not properly started.

After
#sudo /etc/init.d/stunnel4 restart
#ps -aef | grep stunnel
root 4459 1 0 13:20 ? 00:00:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 4460 1 0 13:20 ? 00:00:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 4461 1 0 13:20 ? 00:00:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 4462 1 0 13:20 ? 00:00:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
root 4463 1 0 13:20 ? 00:00:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf
stunnel4 4464 1 0 13:20 ? 00:00:00 /usr/bin/stunnel4 /etc/stunnel/stunnel.conf

Stunnel is now properly started.

I tried moving the init.d scripts to higher priority (51,81) (higher than NetworkManager). It didnt change anything.
sudo find /etc/ -name "*stunnel4*"
/etc/rc2.d/S20stunnel4
/etc/rc4.d/S20stunnel4
/etc/rc1.d/K20stunnel4
/etc/rc3.d/S20stunnel4
/etc/logrotate.d/stunnel4
/etc/rc5.d/S20stunnel4
/etc/default/stunnel4
/etc/rc0.d/K20stunnel4
/etc/rc6.d/K20stunnel4
/etc/init.d/stunnel4
/etc/ppp/ip-up.d/0stunnel4
/etc/ppp/ip-down.d/0stunnel4

Ugly workaround:
#cat /etc/crontab | grep stunnel
@reboot root /etc/init.d/stunnel4 restart

Revision history for this message
Erwan Hamon (erwan-hamon) wrote :
Revision history for this message
Daniel Hallgren (daniel-hallgren) wrote :

Had exactly the same problem after upgrading from intrepid to jaunty. I made two changes (so I don't know which one fixed it). The first was to move it down in startup priority:

$ sudo mv /etc/rc2.d/S20stunnel4 /etc/rc2.d/S99stunnel4

This did not appear to help after a restart, so I decided to take a look at what was happening during startup, by removing the splash screen. This is done in /boot/grub/menu.lst, find the current kernel and remove the word "splash" from that line.

Restarted again, but the splash screen remained - so i did a full shutdown. Now the splash screen was gone, and stunnel started just like it should!

Revision history for this message
taylorkh (taylorkh2-deactivatedaccount) wrote :

I have the same issue with stunnel4 3.4.29-1 installed on Ubuntu 10.04 64 bit.

Ken

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.