[ixpmanager] Issues with MRTG in Ubuntu 18.04
Nick Hilliard (INEX)
nick at inex.ie
Thu Aug 6 19:47:57 IST 2020
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
> <mailto: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 <mailto: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) <mailto: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 list
>> ixpmanager at inex.ie <mailto:ixpmanager at inex.ie>
>> Unsubscribe or change options here:https://www.inex.ie/mailman/listinfo/ixpmanager
>>
>> Mauricio Oviedo <mailto: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 <mailto: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/20200806/b1b050bf/attachment-0001.htm>
More information about the ixpmanager
mailing list