Amanda-Users

Re: HostnameLookupFailsOnlyFromCron

2003-05-23 10:13:26
Subject: Re: HostnameLookupFailsOnlyFromCron
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users <amanda-users AT amanda DOT org>
Date: Fri, 23 May 2003 10:10:40 -0400
On Fri, May 23, 2003 at 05:43:43AM -0700, Tommy wrote:
> 
> 
> 2.4.4 backing up to disk
> Debian Linux with amanda compiled from source
> 
> Amanda Server and client machines back up appropriately when amdump run
> from command line.
>       Bind runs on an amanda client (internet gateway machine) and
>       obviously resolves server and client names appropriately.
> 
> All machines EXCEPT amanda server back up appropriately running amdump
> from cron daemon
> 
> Amanda server running from within cron daemon fails with host name resolve
> failure

I can't think of anything in your environment that would affect name
resolution, but maybe there is something.  In case, what you have to
realize is that cron jobs never process your .profile and other login
files.  Perhaps your interactive environment has something in it that
affects name resolution, but as I say I have no guesses.

Attached are two tiny C programs that do name resolution the same way 
as amanda does.  Some common tools use different routines (like ping).
Confirm they give the appropriate resolutions on both server and client.
Maybe set up a shell script like:

   ServerName='...'
   ClientName='...'
   ServerAddr='...'
   ClientAddr='...'
   Log=/tmp/testlog
   exec > $Log 2>&1

   gethostbyname $ServerName
   gethostbyname $ClientName
   gethostbyaddr $ServerAddr
   gethostbyaddr $ClientAddr

Run it on both client and server, both from the command line and from a cronjob.

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

<Prev in Thread] Current Thread [Next in Thread>