Bug 6313 - Dansguardian and systemd service broken
Summary: Dansguardian and systemd service broken
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 2
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA2-32-OK MGA2-64-OK
Keywords: validated_update
Depends on: 8199
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-04 05:02 CEST by Koos Uys
Modified: 2012-12-20 23:25 CET (History)
9 users (show)

See Also:
Source RPM: dansguardian
CVE:
Status comment:


Attachments
Dansguardian (362.72 KB, image/png)
2012-09-15 15:21 CEST, Koos Uys
Details
Dansguardian 2 (107.15 KB, image/png)
2012-09-15 15:23 CEST, Koos Uys
Details
drakguard output when started from console (12.55 KB, text/plain)
2012-09-15 18:51 CEST, Marja Van Waes
Details

Description Koos Uys 2012-06-04 05:02:05 CEST
In installed Dansguardian to enable parental control, but the icon does not reflect in the Mageia control Centre and it fails when one tries to restart it in the System Services.


In a console, this is the output I get after doing systemctl --failed:

UNIT LOAD ACTIVE SUB JOB DESCRIPTION
dansguardian.service loaded failed failed LSB: Starts the dansguardian daemon
icapd.service loaded failed failed LSB: Starts the c-icap daemon
lm_sensors.service loaded failed failed Initialize hardware monitoring sensors

LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
JOB = Pending job for the unit.

3 units listed. Pass --all to see inactive units, too.


I switched to OpenDNS for now.
Comment 1 Manuel Hiebel 2012-06-29 17:43:55 CEST
the rpm was not touched since mga1 :/

CC: (none) => ennael1
Component: Release (media or process) => RPM Packages
Hardware: i586 => All
Version: 2 => Cauldron
Summary: Dansguardian Broken => Dansguardian and systemd service broken
Source RPM: (none) => dansguardian
Whiteboard: (none) => MGA2TOO

Comment 2 Koos Uys 2012-06-29 18:41:07 CEST
I hear you. Bit I am just a normal user reporting what  I found does not work now that I upgraded to Mageia 2.

Version: Cauldron => 2

Comment 3 Manuel Hiebel 2012-06-29 19:12:00 CEST
yes no worry and thanks for that (btw for bugs affecting 2 or more release, which is the case since it was not rebuild in cauldron too, we see the version to the highest one, and add word in the whireboard, so it will be keep until it's really fixed, an not closed as end of life)

Keywords: (none) => Junior_job
Version: 2 => Cauldron

Comment 4 Koos Uys 2012-06-29 19:26:47 CEST
Thanks. Using OpenDNS at the moment, but it is not nearly as good.
Comment 5 Koos Uys 2012-09-14 17:22:57 CEST
OpenDNS sucks. Wish I could get Dansguardian again. It is just a million times more intelligent. :)
Remco Rijnders 2012-09-14 20:25:13 CEST

CC: (none) => remco

Comment 6 Marja Van Waes 2012-09-14 21:21:31 CEST
@ Sander

I suppose your revision in cauldron (279753) fixed this?

If so, can you please assign this bug to yourself and fix it in Mageia 2, too?

CC: (none) => marja11, sander.lepik

Comment 7 Sander Lepik 2012-09-15 00:07:37 CEST
Someone should first test if it really works on cauldron :) I don't even remember that i updated it :)
Comment 8 Koos Uys 2012-09-15 05:34:38 CEST
I can't understand why this bug was filed under Cauldron. I never used the version - only Mageia 2 and my other bug report for Webmin was filed correctly.

I hope it was not finger trouble here.

Version: Cauldron => 2

Comment 9 Koos Uys 2012-09-15 05:35:31 CEST
Oh, and I see the bug reported chooses Mageia 2 by default.
Comment 10 Remco Rijnders 2012-09-15 05:43:53 CEST
I think the Cauldron package "as is" does not work on 2. The package on 2 doesn't build in its current form and needs the gcc patch I think.

@Koos, do you know if this package worked on Mageia 1, or have you only tried it on 2?
Remco Rijnders 2012-09-15 05:44:16 CEST

Status: NEW => ASSIGNED
Assignee: bugsquad => remco

Comment 11 Koos Uys 2012-09-15 06:07:57 CEST
Jip. I am working on a Mageia 1 Machine right now and it works. The Mageia 2 Machine is my "testing" bench for new Linux Distros and the one that my kids use. So they used Mageia 1 before and Dansguardian could be activated.

Mageia 2 is the first M-flavoured Linux version I used where Dansguardian does not work. Using it since Mandrake 10 I think.
Comment 12 Marja Van Waes 2012-09-15 07:43:54 CEST
(In reply to comment #8)
> I can't understand why this bug was filed under Cauldron. I never used the
> version - only Mageia 2 and my other bug report for Webmin was filed correctly.
> 
> I hope it was not finger trouble here.

We set it to cauldron, with "MGA2TOO" on the whiteboard, because that is the way to show a bug exists in more than one version of Mageia: set it to the highest version it is valid for (usually cauldron) and put MGA2TOO and/or MGA1TOO on the whiteboard, if it is valid there, too.

When Bugzilla is upgraded there'll be a better way to show in which Mageia versions a bug exists.

@ Remmy

Are you testing whether dansguardian works in cauldron, too? So far no one confirmed it does. (I can check later today if needed)

Changing version back to cauldron (MGA2TOO is still on the whiteboard) because we don't know yet whether it works there.

Version: 2 => Cauldron

Comment 13 Remco Rijnders 2012-09-15 08:02:56 CEST
@marja: I think I found the problem on 2. Will test some more and also on Cauldron.
Comment 14 Remco Rijnders 2012-09-15 09:41:10 CEST
@marja: From what I can tell, the problem is not present in Cauldron (anymore) thanks to Sanders' work. As his changes removed sysvinit support, I could not really apply the same changes to 2.

@koos: Can you test the new version in updates_testing and see if that works for you? You can find it on your favourite mirror soon, or right now at http://mageia.webconquest.com/distrib/2/x86_64/media/core/updates_testing/dansguardian-2.10.1.1-6.1.mga2.x86_64.rpm for x86_64 or http://mageia.webconquest.com/distrib/2/i586/media/core/updates_testing/dansguardian-2.10.1.1-6.1.mga2.i586.rpm for 32 but.

Thanks!

Version: Cauldron => 2
Whiteboard: MGA2TOO => (none)

Comment 15 Koos Uys 2012-09-15 10:48:30 CEST
Thanks for the link.

I tried it, but it behaves the same on my side. No icon comes up for "Parental Control" under security in Mageia Control Centre and I can also not start it in "system Services"
Comment 16 Remco Rijnders 2012-09-15 12:04:26 CEST
And from the command line? 

systemctl start dansguardian.service
Comment 17 Koos Uys 2012-09-15 13:27:46 CEST
Jip, that works. I see it is started in System Services.

No GUI visible though.
Comment 18 Remco Rijnders 2012-09-15 13:59:27 CEST
Koos, do you have a screenshot of where it is under Mageia 1? Is it under Security (Veiligheid) and then Parental Controls (Controle voor ouders)?

Sorry for the questions, I never used this package myself before.
Comment 19 Koos Uys 2012-09-15 15:21:34 CEST
Created attachment 2796 [details]
Dansguardian

Dansguardian Screen Shot
Comment 20 Koos Uys 2012-09-15 15:23:01 CEST
Created attachment 2797 [details]
Dansguardian 2

The GUI
Comment 21 Remco Rijnders 2012-09-15 16:20:53 CEST
@Koos: That's exactly what I see with the changed package from updates_testing. Can you try the following?

- close mcc
- # systemctl stop dansguardian
- # urpme dansguardian
- # rm -rf /var/run/dansguardian
- # rm /etc/dansguardian/dansguardian.conf
- # killall dansguardian

Then install the package from updates_testing again?
Comment 22 Koos Uys 2012-09-15 16:33:39 CEST
Unfortunately, it does not work.

After a restart, Dansguardian also did not start up even though it is selected to start at boot.
Comment 23 Sander Lepik 2012-09-15 16:56:21 CEST
(In reply to comment #22)
> Unfortunately, it does not work.
> 
> After a restart, Dansguardian also did not start up even though it is selected
> to start at boot.

What is the output of this command:

systemctl status dansguardian.service
Comment 24 Marja Van Waes 2012-09-15 18:06:25 CEST
The parental control program in MCC is drakguard. I've always thought it pulled in dansguardian, but I'm not sure about that anymore :/
Comment 25 Marja Van Waes 2012-09-15 18:13:20 CEST
ah, I see it in cauldron now: when you don't have dansguardian installed and you start drakguard, after rebooting for support for Access Control Lists, it asks for it to be installed.. so it still pulls it in, and drakguard is the MCC frontend.

In Mageia 2 I installed drakguard *after* installing dansguardian, that was probably the wrong order
Comment 26 Marja Van Waes 2012-09-15 18:24:22 CEST
In Mageia 2, when starting drakguard from MCC, I keep getting this message:

"The support for Access Control Lists, required by the Block programs feature, is enabled, but not yet activated.It is necessary to restart your computer to activate it.", no matter whether I installed drakguard first or not. That message appeared only one time in cauldron.

Both in cauldron and 2, starting drakguard from the console gives a lot of output
Comment 27 Marja Van Waes 2012-09-15 18:51:12 CEST
Created attachment 2799 [details]
drakguard output when started from console

attached is the drakguard output when started from the console in Mageia 2

Despite the errors, it did start dansguardian service alright (I installed it even though drakguard continued to tell me to reboot, instead of getting so far to suggest installing dansguardian):

[marja@Denkblok2 ~]$ systemctl status dansguardian.service
dansguardian.service - LSB: Starts the dansguardian daemon
          Loaded: loaded (/etc/rc.d/init.d/dansguardian)
          Active: active (running) since Sat, 15 Sep 2012 18:37:32 +0200; 6min ago
        Main PID: 5093 (dansguardian)
          CGroup: name=systemd:/system/dansguardian.service
                  â 5093 dansguardian
                  â 5094 dansguardian
                  â 5095 dansguardian
                  â 5097 dansguardian
                  â 5098 dansguardian
                  â 5099 dansguardian
                  â 5100 dansguardian
                  â 5101 dansguardian
                  â 5102 dansguardian
                  â 5103 dansguardian
                  â 5104 dansguardian

[marja@Denkblok2 ~]$
Comment 28 Koos Uys 2012-09-15 19:42:12 CEST
Woohooo, Drakguard did the trick. Now I only need to test my internet to see if Dansguardian block the sites.

Will report back.
Comment 29 Koos Uys 2012-09-15 20:02:41 CEST
OK, Dansguardian did not start up automatically at boot.

I then need to start is from the console. After that, I need to open Parental Control, disable it first, enable it again and then it blocks sites.
Comment 30 Sander Lepik 2012-09-15 20:27:19 CEST
(In reply to comment #29)
> OK, Dansguardian did not start up automatically at boot.
> 
> I then need to start is from the console. After that, I need to open Parental
> Control, disable it first, enable it again and then it blocks sites.

Again, what is the output of this command:

systemctl status dansguardian.service
Comment 31 Koos Uys 2012-09-16 05:39:54 CEST
Right,


Output of systemctl status dansguardian.service for both scenarios.


Just after boot, it reads as follows:

dansguardian.service - LSB: Starts the dansguardian daemon
          Loaded: loaded (/etc/rc.d/init.d/dansguardian)
          Active: inactive (dead)
          CGroup: name=systemd:/system/dansguardian.service


After systemctl start dansguardian.service 

dansguardian.service - LSB: Starts the dansguardian daemon
          Loaded: loaded (/etc/rc.d/init.d/dansguardian)
          Active: active (running) since Sun, 16 Sep 2012 05:32:43 +0200; 1min 1s ago
         Process: 2820 ExecStart=/etc/rc.d/init.d/dansguardian start (code=exited, status=0/SUCCESS)
        Main PID: 2830 (dansguardian)
          CGroup: name=systemd:/system/dansguardian.service
                  â 2830 dansguardian
                  â 2831 dansguardian
                  â 2832 dansguardian
                  â 2833 dansguardian
                  â 2835 dansguardian
                  â 2837 dansguardian
                  â 2839 dansguardian
                  â 2840 dansguardian
                  â 2841 dansguardian
                  â 2842 dansguardian
                  â 2843 dansguardian

Sep 16 05:32:43 localhost dansguardian[2820]: Starting dansguardian: [  OK  ]
Sep 16 05:32:44 localhost dansguardian[2830]: Started sucessfully.
Comment 32 Sander Lepik 2012-09-16 09:21:18 CEST
Does "systemctl enable dansguardian.service" help?
Comment 33 Koos Uys 2012-09-16 17:28:37 CEST
I will just reboot. But this was an output that may help you:

dansguardian.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig dansguardian on
Comment 34 Koos Uys 2012-09-16 17:38:01 CEST
Nope. After reboot, Dansguardian is stopped again.
Comment 35 Sander Lepik 2012-09-16 18:18:10 CEST
(In reply to comment #34)
> Nope. After reboot, Dansguardian is stopped again.

And "chkconfig --list dansguardian"?
Comment 36 Marja Van Waes 2012-09-16 21:34:05 CEST
I came across bug 3303

If ulogd is needed for dansguardian, why did it work well in Mageia 1 without ulogd, then?
Comment 37 Koos Uys 2012-09-17 04:07:10 CEST
Note: This output shows SysV services only and does not include native
      systemd services. SysV configuration data might be overriden by native
      systemd configuration.

dansguardian    0:off   1:off   2:on    3:on    4:on    5:on    6:off   7:on
Comment 38 Koos Uys 2012-10-16 07:02:12 CEST
Any update on this one?
Comment 39 Remco Rijnders 2012-11-25 12:50:29 CET
Koos, I believe the problem left now is with the dependancy on the c-icap-server which fails to load at boot time. I have opened a seperate bug report for that.

Keywords: Junior_job => (none)
CC: (none) => dlucio, mageia
Depends on: (none) => 8199

Comment 40 Colin Guthrie 2012-11-28 00:05:01 CET
Remco, can you post the bug # for reference?
Comment 41 Remco Rijnders 2012-11-28 04:05:45 CET
@coling: Yes, please see bug report #8199
Comment 42 Colin Guthrie 2012-11-28 10:47:24 CET
Oh sorry I missed the "depends on" link. OK, submitted an update for that package now.
Comment 43 Remco Rijnders 2012-11-29 04:29:51 CET
Thanks coling. With the updated c-icap-server package, dansguardian now starts at boot time.

@Koos, qa: Please test the updated package for dansguardian in combination with the updated c-icap rpm's in updates_testing.

Unfortunately, not using this package myself, I don't have a testing procedure to use. But in the "as is" situation, dansguardian would not run at all (also check with systemctl status command etc.). Neither would the c-icap-server start at boot time (bug #8199). With the updated packages, both should start at boot time without introducing any major delay.

Assignee: remco => qa-bugs

Comment 44 user7 2012-12-11 22:06:39 CET
Testing on MGA2, i586.

CC: (none) => wassi

Comment 45 user7 2012-12-11 22:28:22 CET
Remco: updating only c-icap seems to fix all issues here, at least there are no problems I would be aware of. What exactly is the update candidate here supposed to fix? Updating it did not result in any obvious changes.

Note to QA - steps to follow:

1) Head over to bug 8199 and perform the steps explained in comment 3
2) Open Mageia Control Center -> Security Parental Control
3) Click on "Activate Parental Control", then "ok"
4) You are asked to install: squid, dransguardian -> confirm
5) add "www.orf.at" or any other webpage to the blacklist
6) Reboot
7) Go to the webpage blocked in step 5 using any browser -> confirm it is blocked
Comment 46 user7 2012-12-12 02:02:14 CET
Ok, so the update candidate contains some systemd changes and works as expected. Thus I consider this update candidate and bug 8199 ready for validation, taking into account Remco's and my testing. As it is late already, I'll validate tomorrow if noone else is quicker. I'll add the keywords for now.

Whiteboard: (none) => MGA2-32-OK MGA2-64-OK

Comment 47 Koos Uys 2012-12-12 06:15:10 CET
Woohooo! Seems to work. Dansguardian starting up now with reboot.
Comment 48 user7 2012-12-12 20:21:06 CET
No linking needed according to depcheck.

SRPM: dansguardian-2.10.1.1-6.1.mga2.src.rpm

Remco: please provide an advisory, as I am not sure what to write here. The package may then be validated.
Comment 49 Remco Rijnders 2012-12-16 06:04:43 CET
user7: Hmm... how about this?

dansguardian would fail to start at boot time due to an error in one of the required underlying packages. The location of the .pid file dansguardian would create and the location where systemd would look for it, did not match resulting in delays or problems starting the program on systemd enabled systems. The SRPM could not be built anymore on Mageia 2 installations.

This updated package provides a fix for these issues.
Comment 50 user7 2012-12-17 20:39:54 CET
Update validated, no linking needed according to depcheck.
Thanks.

Advisory:
dansguardian would fail to start at boot time due to an error in one of the
required underlying packages. The location of the .pid file dansguardian would
create did not match the location where systemd would look for it,
resulting in delays or problems starting the program. The SRPM could not be built anymore on Mageia 2 installations.

This updated package provides a fix for these issues.

SRPM: dansguardian-2.10.1.1-6.1.mga2.src.rpm

Could sysadmin please push from core/updates_testing to core/updates.

Thank you!

Keywords: (none) => validated_update

Comment 51 Thomas Backlund 2012-12-20 23:25:01 CET
Update pushed:
https://wiki.mageia.org/en/Support/Advisories/MGAA-2012-0241

Status: ASSIGNED => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.