if racoon daemon fails to start no error message is printed and newline is missing

Bug #606375 reported by Leo Arias on 2010-07-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ipsec-tools (Ubuntu)

Bug Description

Binary package hint: ipsec-tools

The printed message after starting/stoping/restarting racoon deamon from /etc/init.d/racoon is missing an ending newline.

So, it currently prints something like this:

elopio@tangamandapio-laptop:~$ sudo /etc/init.d/racoon start
Starting IKE (ISAKMP/Oakley) server: racoonelopio@tangamandapio-laptop:~$

The correct thing should be :
elopio@tangamandapio-laptop:~$ sudo /etc/init.d/racoon start
Starting IKE (ISAKMP/Oakley) server: racoon [NEW LINE HERE!!!!]

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: racoon 1:0.7.1-1.6ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-23.37-generic
Uname: Linux 2.6.32-23-generic i686
Architecture: i386
Date: Fri Jul 16 10:56:43 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
SourcePackage: ipsec-tools

Leo Arias (elopio) wrote :
Leo Arias (elopio) wrote :

Looking at the script /etc/init.d/racoon
on lines 76 and 82 it does an echo -n. The -n option tells echo to not print the trailing line.

Then on lines 78 and 86 it does executes echo "." This should print the "." and a new line, but neither the . nor the newline are printed. I don't know why...

Clint Byrum (clint-fewbar) wrote :

Hi Leo, thanks for reporting this bug.

Does the racoon daemon actually start?

The init script is running with 'set -e', which means if any commands return with a status not "0", meaning "I ran ok" then the init script will exit.

So it would make sense that the 'start-stop-daemon' would return with an exit code if it wasn't able to start racoon, and then it wouldn't be able to 'echo .'.


Changed in ipsec-tools (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Leo Arias (elopio) wrote :

Hi Clint. Thanks for your answer.

I spent all the afternoon checking my configuration and starting racoon manually. And indeed there was an IP that wasn't answering properly but now it's fixed.

I've just seen your message and tried the script at init.d again and it printed the "." and the newline. So the problem was probably, as you said, that my wrong configuration prevented racoon to start.

Testing it further, if I do "/etc/init.d/racoon start" twice, the first time the daemon will start and will print the new line. The second time it will fail because it's already running, but no error message is given and no newline will be printed. The problem seems to be in the --quiet option passed to start-stop-daemon. If I remove it I get:

elopio@tangamandapio-laptop:~$ sudo /etc/init.d/racoon start
Starting IKE (ISAKMP/Oakley) server: racoon/usr/sbin/racoon already running.

The script seems to be assuming that the error, the "." and the newline will be printed by start-stop-daemon, but the --quiet option prevents it.

Now, the quiet option is probably there for some reason, and I'm not sure if it's a bug. So I don't know what's next :)

Thanks again,
pura vida.

Changed in ipsec-tools (Ubuntu):
status: Incomplete → New
summary: - Racoon daemon script is missing a newline
+ if racoon daemon fails to start no error message is printed and newline
+ is missing
Chuck Short (zulcss) on 2011-04-05
Changed in ipsec-tools (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers