darkstat does not start on boot

Bug #249038 reported by Hew
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
darkstat (Ubuntu)
Invalid
Medium
Unassigned
Nominated for Intrepid by Hew

Bug Description

Binary package hint: darkstat

I have set START_DARKSTAT=yes in /etc/darkstat/init.cfg , but darkstat does not run on startup (checked with ps ax). 'sudo /etc/init.d/darkstat start' starts it for the session, but of course, it's not there after a reboot.

Steps to reproduce:
1) Edit /etc/darkstat/init.cfg and set START_DARKSTAT=yes
2) Reboot

What should happen:
3) Darkstat runs

What actually happens:
3) Darkstat does not run

darkstat/intrepid uptodate 3.0.708-1

Revision history for this message
Juan (jfanals) wrote :

I have the same problem.

I also changed the init.cfg ans set START_DARKSTAT=yes

darkstat works with the command:
sudo /etc/init.d/darkstat start

but only for the session, if the computer is rebooted then darkstat does not start.

Changed in darkstat:
status: New → Confirmed
Hew (hew)
Changed in darkstat:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Matthias Eck (eck-mat) wrote :

Same problem here, but i found a workaround.

Three commands in the shell:
sudo su
update-rc.d -f darkstat remove
update-rc.d darkstat defaults 89

Now darkstat starts later in the boot process. This brings darkstat to work, maybe because NetworkManager or another Prog is confusing darkstat at boottime.

But something is strange, darkstat is now running twice (show with "ps -A|grep darkstat"). But anyhow, it seems to work correct.

Revision history for this message
Hew (hew) wrote :

Unfortunately your workaround isn't working for me (on Jaunty). Manually executing 'sudo /etc/init.d/darkstat start' works, and also produces the two processes (possibly another bug).

Revision history for this message
Matthias Eck (eck-mat) wrote :

I'm now use a fresh installed ubuntu 8.10 server 32bit (at the time of my last post i used the 8.10 desktop 32bit). Both versions on the same machine. Experiencing the same behaviour after installing darkstat, solved it with the same solution. Darkstat Version is 3.0.708-2.

Maybe You want to try the three commands with a higher number (for example, use 99 instead of 89) which starts darkstat later.

Maybe You are using another programm which is started by init.d and blocks darkstat in an unknown way. Described and solved in another forum: http://ubuntuforums.org/showthread.php?t=55969

If You suspect the problem still to be in the init.d boot process. You can try to disable some links in the /etc/rc2.d folder (which is the standard boot level of ubuntu). But beware, Your system may/will get in an unbootable condition, so have a boot/repair cd ready. For me the following links are there: S10sysklogd, S11klogd, S12dbus, S16ssh, S20rsync, S20samba, S20transmission-daemon, S20winbind, S89atd, S89cron, S89darkstat, S99rc.local, S99rmnologin.

Revision history for this message
Hew (hew) wrote :

The problem still exists with Jaunty, even when using S99darkstat. Starting manually still works, which is what I'm doing each session. I tested with Debian Lenny and Darkstat works fine there, it runs on startup like it should.

Revision history for this message
Emil Mikulic (darkmoon) wrote :

I can reproduce the problem with darkstat 3.0.712-1 on Jaunty. The problem is (piping darkstat --verbose --no-daemon through /usr/bin/logger at boot time):

  error: pcap_open_live(): eth0: That device is not up

Changing the boot order via update-rc.d doesn't fix this problem for me. darkstat needs to be started after NetworkManager is done configuring eth0.

You'll notice even e.g. ntp is started prior to NetworkManager, despite /etc/init.d/ntp containing:
  # Required-Start: $network $remote_fs $syslog

NetworkManager restarts ntp after the interface comes up, via /etc/network/if-up.d/ntpdate

Revision history for this message
Emil Mikulic (darkmoon) wrote :

If I disable NetworkManager and add e1000 to /etc/modules and configure eth0 via /etc/network/interfaces, then darkstat starts up just fine (!). Hew, is your Debian Lenny system using NetworkManager?

Even though it starts up, darkstat 3.0.712-1 on Jaunty can't decode TCP traffic because of the snaplen problem: http://bazaar.launchpad.net/~darkmoon/+junk/darkstat-pkg/revision/11

And the web interface is horribly laggy due to pcap being blocking: http://bazaar.launchpad.net/~darkmoon/+junk/darkstat-pkg/revision/10

These two things will be fixed in the next release, but what do we do about the interaction with NetworkManager?

Revision history for this message
Hew (hew) wrote :

The problem seems to have disappeared for me on Lucid.

Changed in darkstat (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Mytonn (mytonn) wrote :

Same issue with 20.04. If I manually executing 'sudo /etc/init.d/darkstat start' works, but produces the two processes.

Revision history for this message
Emil Mikulic (darkmoon) wrote :

Two processes is normal (the child process is to do non-blocking DNS resolution).

Mytonn is there anything relevant in the syslog?

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.