[ixpmanager] Issues with MRTG in Ubuntu 18.04

Mauricio Oviedo gennesys at gmail.com
Fri Aug 7 19:52:07 IST 2020


Hi Nick,

Thanks for the information.

At the end it worked correctly after creating a file called
/etc/tmpfiles.d/mrtg.conf
with the following contents:

d /run/lock/mrtg 1777 root root

Now MRTG starts fine after a reboot.

Thanks for your help.

--Mauricio

El jue., 6 ago. 2020 a las 12:48, Nick Hilliard (INEX) (<nick at inex.ie>)
escribió:

> Hi Mauricio,
>
> If this is on Ubuntu, then you should create a file called
> /etc/tmpfiles.d/mrtg with the following contents:
>
> d /run/mrtg 1777 root root
>
> This will create the file on bootup.
>
> You can then use --pid-file=/run/mrtg/mrtg.pid as before.
>
> Nick
>
> Mauricio Oviedo wrote on 06/08/2020 17:08:
>
> Hi Nick,
>
> Thanks, it worked correctly after creating the directory. However, after
> rebooting the folder is deleted.
>
> If I point the lock file to a different directory MRTG starts fine after
> rebooting:
>
> --lock-file /tmp/mrtg_l
>
> Another approach could be to create the /var/lock/mrtg folder at start or
> simply use just /var/lock...
>
>  What do you think?
>
> El mié., 5 ago. 2020 a las 11:13, Nick Hilliard (INEX) (<nick at inex.ie>)
> escribió:
>
>> Hi Mauricio,
>>
>> Can you try creating the lock directory to see if that fixes the problem?
>>
>> # mkdir -p /var/lock/mrtg
>> # chmod 755 /var/lock/mrtg
>> # chown mrtg:mrtg /var/lock/mrtg
>>
>> Nick
>>
>> Mauricio Oviedo <gennesys at gmail.com>
>> 4 August 2020 at 15:38
>> Hi Nick,
>>
>> 1. /var/log/mrtg/mrtg.log
>>
>> 2020-08-04 10:16:27 -- Started mrtg with config
>> '/var/lib/mrtg/ixpmanager.cfg'
>> 2020-08-04 10:16:27 -- 2020-08-04 10:16:27: ERROR: Creating templock
>> /var/lock/mrtg/mrtg_l_2715: No such file or directory at /usr/bin/mrtg line
>> 1970.
>>
>> 2. Yes, /var/lib/mrtg/ixpmanager.cfg is being generated correctly by
>> artisan
>>
>> Thanks,
>> Mauricio
>>
>>
>>
>> Nick Hilliard (INEX) <nick at inex.ie>
>> 4 August 2020 at 15:32
>>
>> Hi Mauricio,
>>
>> Mauricio Oviedo wrote on 04/08/2020 15:17:
>>
>>    Process: 2296 ExecStart=/usr/bin/mrtg --daemon
>> /var/lib/mrtg/ixpmanager.cfg --logging /var/log/mrtg/mrtg.log --pid-file=/run/mrtg/mrtg.pid --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok (code=exited, status=1/FAILURE)
>>
>> Aug 04 10:10:47 srv-ixpmanager systemd[1]: mrtg.service: Failed with result 'protocol'.
>>
>> Two things here:
>>
>> 1. what error is appearing in /var/log/mrtg/mrtg.log?
>>
>> 1. can you make sure that the configuration in
>> /var/lib/mrtg/ixpmanager.cfg is what's being generated by artisan?
>>
>> Nick
>> _______________________________________________
>> INEX IXP Manager mailing listixpmanager at inex.ie
>> Unsubscribe or change options here: https://www.inex.ie/mailman/listinfo/ixpmanager
>>
>> Mauricio Oviedo <gennesys at gmail.com>
>> 4 August 2020 at 15:17
>> Hi!
>>
>> I´m trying to move MRTG configuration to systemd, following the
>> information here:
>>
>> https://github.com/inex/IXP-Manager/issues/627
>>
>> OS: Ubuntu 18.04
>> IXPMv: 5.6.0
>>
>> But I'm unable to start mrtg now. Here the logs:
>>
>> root at ixpmanager:~# systemctl start mrtg
>> Job for mrtg.service failed because the service did not take the steps
>> required by its unit configuration.
>> See "systemctl status mrtg.service" and "journalctl -xe" for details.
>>
>> root at ixpmanager:~# systemctl status mrtg.service
>> ● mrtg.service - Multi-router Traffic Grapher
>>    Loaded: loaded (/etc/systemd/system/mrtg.service; enabled; vendor
>> preset: enabled)
>>    Active: failed (Result: protocol) since Tue 2020-08-04 10:07:18 -04;
>> 7s ago
>>    Process: 2296 ExecStart=/usr/bin/mrtg --daemon
>> /var/lib/mrtg/ixpmanager.cfg --logging /var/log/mrtg/mrtg.log
>> --pid-file=/run/mrtg/mrtg.pid --lock-file /var/lock/mrtg/mrtg_l
>> --confcache-file /var/lib/mrtg/mrtg.ok (code=exited, status=1/FAILURE)
>>
>> Aug 04 10:07:18 ixpmanager systemd[1]: Starting Multi-router Traffic
>> Grapher...
>> Aug 04 10:07:18 ixpmanager systemd[1]: mrtg.service: Failed to parse PID
>> from file /run/mrtg/mrtg.pid: Invalid argument
>> Aug 04 10:07:18 ixpmanager systemd[1]: mrtg.service: Failed with result
>> 'protocol'.
>> Aug 04 10:07:18 ixpmanager systemd[1]: Failed to start Multi-router
>> Traffic Grapher.
>>
>> root at ixpmanager:~# journalctl -xe
>> Aug 04 10:10:47 srv-ixpmanager systemd[1]: Starting Multi-router Traffic
>> Grapher...
>> -- Subject: Unit mrtg.service has begun start-up
>> -- Defined-By: systemd
>> -- Support: http://www.ubuntu.com/support
>> --
>> -- Unit mrtg.service has begun starting up.
>> Aug 04 10:10:47 srv-ixpmanager systemd[1]: mrtg.service: Failed to parse
>> PID from file /run/mrtg/mrtg.pid: Invalid argument
>> Aug 04 10:10:47 srv-ixpmanager systemd[1]: mrtg.service: Failed with
>> result 'protocol'.
>> Aug 04 10:10:47 srv-ixpmanager systemd[1]: Failed to start Multi-router
>> Traffic Grapher.
>> -- Subject: Unit mrtg.service has failed
>> -- Defined-By: systemd
>> -- Support: http://www.ubuntu.com/support
>> --
>> -- Unit mrtg.service has failed.
>>
>>
>> Could you point me in the right direction?
>>
>>
>>
>> _______________________________________________
>> INEX IXP Manager mailing list
>> ixpmanager at inex.ie
>> Unsubscribe or change options here:
>> https://www.inex.ie/mailman/listinfo/ixpmanager
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20200807/10a6c809/attachment.htm>


More information about the ixpmanager mailing list