# Dansguardian - Error connecting via ipc to log [SOLVED]

## hanj

Hello All

Just added Dansguardian to monitor my DMZ network and filter traffic. Everything is working great, but every night I'm seeing the following errors in messages:

```
Feb 18 06:01:11 comp dansguardian: Error connecting via ipc to log

Feb 18 06:10:33 comp dansguardian: Error connecting via ipc to url cache

Feb 18 06:10:33 comp dansguardian: Error connecting via ipc to url cache

Feb 18 06:10:33 comp dansguardian: Error connecting via ipc to log

Feb 18 06:31:48 comp dansguardian: Error connecting via ipc to url cache

Feb 18 06:31:48 comp dansguardian: Error connecting via ipc to log

Feb 18 06:34:42 comp dansguardian: Error connecting via ipc to url cache

Feb 18 06:34:42 comp dansguardian: Error connecting via ipc to url cache

Feb 18 06:34:42 comp dansguardian: Error connecting via ipc to log

Feb 18 06:40:33 comp dansguardian: Error connecting via ipc to url cache

Feb 18 06:40:33 comp dansguardian: Error connecting via ipc to url cache

Feb 18 06:40:33 comp dansguardian: Error connecting via ipc to log
```

These start at 3AMish and will continue until I restart Dans. That said, seems like it would be issue with logrotate, but I have Dansguardian logs and squid logs set to rotate weekly, and this happens every night.

Here is some system information:

```
[ebuild   R   ] net-proxy/dansguardian-2.8.0.6-r1  208 kB

[ebuild   R   ] net-proxy/squid-2.6.17  USE="pam ssl (-ipf-transparent) -ldap -logrotate -nis (-pf-transparent) -qos -samba -sasl (-selinux) -snmp -zero-penalty-hit" 1,685 kB
```

Kernel is : 2.6.23-hardened-r4

Here are my rotate scripts:

```
/var/log/dansguardian/access.log {

  rotate 4

  weekly

  missingok

  notifempty

  nocreate

  nocopy

  nocopytruncate

  nocompress

  postrotate

    /usr/sbin/dansguardian -r

  endscript

}

/var/log/squid/access.log {

        weekly

        rotate 5

        copytruncate

        compress

        notifempty

        missingok

}

/var/log/squid/cache.log {

        weekly

        rotate 5

        copytruncate

        compress

        notifempty

        missingok

}

/var/log/squid/store.log {

        weekly

        rotate 5

        copytruncate

        compress

        notifempty

        missingok

        # This script asks squid to rotate its logs on its own.

        # Restarting squid is a long process and it is not worth

        # doing it just to rotate logs

        postrotate

        /usr/sbin/squid -k rotate

        endscript

}

```

The 'Feb 18 06:01:11 comp dansguardian: Error connecting via ipc to log' error seems to be related to the fact that Dans cannot write to /var/log/dansguardian/access_log. Opening that log file, I see the last entry at 3:10AM. Like I said, I restart Dans.. and everything is fine.. until later tonight.

Any ideas??

Thanks!

hanji

----------

## hanj

anyone? anyone? I'm not finding very much relevant info on the subject.

Thanks!

hanji

----------

## hanj

I finally understood the problem. I use tmpreaper to clean out my /tmp directory on a daily basis. It was deleting my .dguardianipc and .dguardianurlipc sockets in there.

```
srwxr-xr-x  1 nobody nobody   0 Nov 11 10:12 .dguardianipc

srwxr-xr-x  1 nobody nobody   0 Nov 11 10:12 .dguardianurlipc
```

I simply adjusted my tmpreaper to exclude those.

```
tmpreaper --all 1d --mtime --force --protect '.dguardian*' /tmp
```

All is better now.

Thanks!

hanji

----------

