From owner-freebsd-questions@FreeBSD.ORG Sun Nov 27 23:05:31 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BCF616A41F for ; Sun, 27 Nov 2005 23:05:31 +0000 (GMT) (envelope-from fasterdisco@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 802B243D46 for ; Sun, 27 Nov 2005 23:05:30 +0000 (GMT) (envelope-from fasterdisco@gmail.com) Received: by zproxy.gmail.com with SMTP id z3so1993846nzf for ; Sun, 27 Nov 2005 15:05:30 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=gOopHCw/c1d8ihWogMHClMtJ9Mo5DJOVInloKlMMRwXsuCYM1f8kScKspvzBYBvxkMpAWGr+89t+o6W/qzN/vV6JrxgQEZ8YsVGCHy48NOq6VtUUK2TmwAwe4SXrQaRohjD7PxiSA6Mq0wAcouQab7IgzTqtDbqwdpEbXe3noj8= Received: by 10.64.131.1 with SMTP id e1mr741812qbd; Sun, 27 Nov 2005 15:05:30 -0800 (PST) Received: by 10.65.43.6 with HTTP; Sun, 27 Nov 2005 15:05:29 -0800 (PST) Message-ID: Date: Sun, 27 Nov 2005 18:05:30 -0500 From: "matt ." To: Ian Smith In-Reply-To: MIME-Version: 1.0 References: <20051127120058.0F4C416A41F@hub.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org, Glenn Dawson Subject: Re: Running mrtg on FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2005 23:05:31 -0000 Thanks Ian, I agree it smells very strongly like permissions, but everywhere I look the permissions are ok. /usr/local/bin/rateup is world executable. Note that if I make a symlink to where MRTG (when run as mrtg:mrtg) expects to find 'rateup' (which is in / ) everything will work but I'll get the following complaints in my /var/log/mrtg.log: 2005-11-27 18:00:00 -- Started mrtg with config '/usr/local/etc/mrtg/mrtg.cfg' 2005-11-27 18:00:00 -- Use of uninitialized value in concatenation (.) or string at /usr/local/bin/mrtg line 720. 2005-11-27 18:00:00 -- Use of uninitialized value in concatenation (.) or string at /usr/local/bin/mrtg line 744. Of course, when run as root there are no complaints at all. It *seems* to work, but I don't like running it when it complains. It's ugly and I'm too much of a perfectionist. Ugh, I don't know where else to look! :) Matt On 11/27/05, Ian Smith wrote: > > Re: freebsd-questions Digest, Vol 114, Issue 23 > > Message: 6 > > > Date: Sun, 27 Nov 2005 05:25:26 -0500 > > From: "matt ." > > > On 11/26/05, Glenn Dawson wrote: > > > > > > At 05:24 PM 11/26/2005, matt . wrote > > > I don't think it's a bug in the port. I've installed it many times > > > recently and not had any problems. > > > > > > What version of Perl are you using? Version of FreeBSD? > > > > > > It looks as if the FindBin perl module is failing to find the correct > > > location of the mrtg script, which then causes it to look for rateup > > > in the wrong place. > > Yes, specifically it seems to be returning '' instead of > '/usr/local/bin' which was to be prepended to '/rateup' > > [.. system and perl versions ..] > > > The only thing the same is the version of my MRTG port. > > > > I was unable to find the which module installs FindBin. I checked > > freshports.org and didn't find any port specifically related to anythin= g > > called FindBin. Thanks. > > > > matt > > [..] > > > > > > Still seeing the same error. I created /usr/local/www/mrtg owned > by > > > > > mrtg:mrtg. I run the following in mrtg's crontab: > > > > > > > > > > */5 * * * * /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg > > > > > --debug=3Dcfg,dir --logging /var/log/mrtg.log > > > > > > > > > > And I see the debug check the config and dir structures ok: > > > > > > > > > > 2005-11-26 19:58:00 -- --dir: ensure path > IN: '/usr/local/www/mrtg' > > > > > 2005-11-26 19:58:00 -- --dir: ensure path OUT: > '/usr/local/www/mrtg/' > > > > > 2005-11-26 19:58:00 -- --dir: imagehtml =3D > > > > > 2005-11-26 19:58:00 -- Use of uninitialized value in concatenatio= n > (.) > > > or > > > > > string at /usr/local/bin/mrtg line 720. > > > > > 2005-11-26 19:58:00 -- Use of uninitialized value in concatenatio= n > (.) > > > or > > > > > string at /usr/local/bin/mrtg line 720. > > > > > 2005-11-26 19:58:00 -- ERROR: Can't Execute '/rateup' > > > > > > > > > > Still trying to execute /rateup. This works flawlessly when run > by > > > root. > > > > > I don't get it. > > Smells like permissions, if root can, and mrtg:mrtg can't .. > > > > > > Here is line 720 of /usr/local/bin/mrtg: > > > > > > > > > > ((($MRTG_lib::OS eq 'NT' or $MRTG_lib::OS eq 'OS2') and (-e > > > > > "${FindBin::Bin}${MRTG_lib::SL}rateup.exe")) or > > > > > (($MRTG_lib::OS eq 'NW') and (-e "SYS:/Mrtg/bin/rateup.nlm")= ) > or > > > > > (-x "${FindBin::Bin}${MRTG_lib::SL}rateup")) or > > > > > die "ERROR: Can't Execute > > > > > '${FindBin::Bin}${MRTG_lib::SL}rateup'\n"; > > Assuming FindBin::Bin and/or MRTG-lib::SL doesn't need to run as root > (?), maybe not all of /usr, /usr/local and /usr/local/bin are world > readable/executable (o+rx), or maybe rateup itself isn't executable by > mrtg:mrtg? > > Just a hunch, cheers, Ian > >