Bug 134241 - won't run unless LANG=C; can't find Socket6.pm
Summary: won't run unless LANG=C; can't find Socket6.pm
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mrtg
Version: 3
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-09-30 15:24 UTC by Marius Andreiana
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-01 11:25:58 UTC
Type: ---
Embargoed:


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

Description Marius Andreiana 2004-09-30 15:24:08 UTC
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>
To: 	For testers of Fedora Core development releases
<fedora-test-list>
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 22:06:19 UTC
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
/etc/mrtg/mrtg.conf.

Thanks in advance.

Comment 2 Marius Andreiana 2004-10-01 05:50:22 UTC
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.

mrtg-2.10.15-1
vixie-cron-4.1-11
perl-5.8.5-4
perl-URI-1.30-1

selinux-policy-targeted-1.17.16-2
selinux-policy-strict-1.17.16-2

SELinux is disabled. Attaching config files.


Comment 3 Marius Andreiana 2004-10-01 05:51:42 UTC
Created attachment 104616 [details]
/etc/selinux/config

Comment 4 Marius Andreiana 2004-10-01 05:52:03 UTC
Created attachment 104617 [details]
/etc/mrtg/mrtg.cfg

Comment 5 Miloslav Trmač 2004-10-01 11:25:58 UTC
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
devices.


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