Bug 134241 - won't run unless LANG=C; can't find Socket6.pm
won't run unless LANG=C; can't find Socket6.pm
Product: Fedora
Classification: Fedora
Component: mrtg (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Miloslav Trmač
Depends On:
  Show dependency treegraph
Reported: 2004-09-30 11:24 EDT by Marius Andreiana
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-10-01 07:25:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
/etc/selinux/config (447 bytes, text/plain)
2004-10-01 01:51 EDT, Marius Andreiana
no flags Details
/etc/mrtg/mrtg.cfg (820 bytes, text/plain)
2004-10-01 01:52 EDT, Marius Andreiana
no flags Details

  None (edit)
Description Marius Andreiana 2004-09-30 11:24:08 EDT
Default mrtg cron won't execute:
[root@marte cron.d]# cat /etc/cron.d/mrtg
*/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-
file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok

# mrtg /etc/mrtg/mrtg.cfg
ERROR: Mrtg will most likely not work properly when the environment
       variable LANG is set to UTF-8. Please run mrtg in an environment
       where this is not the case. Try the following command to start:

       env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Even when running manually with
env LANG=C  /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-
file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok

it doesn't create any files in /var/www/mrtg

strace shows, among others,
open("/usr/lib/perl5/site_perl/5.8.2/Socket6.pm", O_RDONLY|O_LARGEFILE)
= -1 ENOENT (No such file or directory)

From: 	Alan Cox <alan@redhat.com>
To: 	For testers of Fedora Core development releases
Subject: 	Re: fc3t2: mrtg doesn't run?

On Thu, Sep 30, 2004 at 10:20:22AM -0300, Alexandre Strube wrote:
> Em Qui, 2004-09-30 às 09:43, Alan Cox escreveu:
> > Ughhh. That sounds like an opportunity to make some free space on
the CD-ROM's
> :-)
> What other monitoring proggie would you recomend? I hate when my
> neighbours begin to use my connection to download big stuff, and this
> helps me a lot.

No opinion there, but we shouldn't be leaving non unicode capable stuff in
the base distro IMHO
Comment 1 Miloslav Trmač 2004-09-30 18:06:19 EDT
The Socket6 module is not required for mrtg operation.

From cron this works fine for me (cron clears the environment),
both with strict and targeted SELinux policy.  Likewise with
LANG=C from the command line.

(Note that the SELinux policies assume usage of the /var/lib/mrtg
and /var/lock/mrtg directories, like in the default cron entry and
default config file.)

Please paste as a comment the output of the commands
       (rpm -q mrtg vixie-cron perl perl-URI)
       (rpm -q selinux-policy-{targeted,strict})
Also please attach your files /etc/sysconfig/selinux and

Thanks in advance.
Comment 2 Marius Andreiana 2004-10-01 01:50:22 EDT
It's the first time I use mrtg, I expected to find files in
/var/www/mrtg, but I wasn't sure so I asked the mailing list.



SELinux is disabled. Attaching config files.
Comment 3 Marius Andreiana 2004-10-01 01:51:42 EDT
Created attachment 104616 [details]
Comment 4 Marius Andreiana 2004-10-01 01:52:03 EDT
Created attachment 104617 [details]
Comment 5 Miloslav Trmač 2004-10-01 07:25:58 EDT
mrtg creates output files only for defined targets, the config
file defines no targets, so mrtg creates no files.

A minimal example of a target is commented out in the config file;
you can use cfgmaker to create a larger example for SNMP-capable

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