Thanks to everyone who sent me suggestions on this problem.  Many dealt with
environment related variables, all of which matched and were not the cause
of the issue.  While I still am not 100% sure as the cause I have found a
workaround, but one that is weird enough (at least to me) that I though I'd
share with everyone.

While troubleshooting the problem I got disconnected from the remote unit do
to a stupid typo on my local system.  Upon reconnecting I noticed that the
script was not running even from direct command line execution and was
returning (once I removed the -s switch) an error of "failed to connect to
host".  Surprised by that (since the host it is trying to find is the
outside interface of my firewall, one that I was actively using to connect
to it), I did a ping to verify that the name would resolve correctly.  As
expected it did and when I tried the script again it worked!  Rather
surprised by this, I duplicated the situation by manually disconnecting,
reconnecting trying the script, which failed, pinging my host and trying the
script again which now works!  

I again verified all the settings on this machine with the many others just
like it that I have out there and found no differences.  Except for this one
connection I have normal access, other users can access other resources
through it, and so on.  

So in short I do not fully understand the cause but for a solution I simply
put a one count ping command into my script and not it works!

Peter

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 25, 2006 4:56 PM
To: Peter Bako
Subject: Re: manual vs. crontab execution


>>>>> "p" == Peter Bako <[EMAIL PROTECTED]> writes:
p> I have a weird problem I cannot find a solution to.  I've written a 
p> small script (attached below) that I put on the dozen or so systems 
p> that I maintain for friends and clients, that daily sends some basic 
p> information to my web server.  This data is then stored in a MySQL 
p> database and viewed via another script.  All the systems are running 
p> OpenBSD version 3.5 to 3.8, and the one in question here is 3.8.

  I'm sure you've checked the obvious differences.

  One way to troubleshoot the problem is to ensure that the root
  crontab has MAILTO set to a valid email address (see crontab(5) for
  more detail).  Then use one of the following cron entries in place
  of the problematic cron entry to gather more data:

    next_minute * * * *       sh -x /usr/local/fwreport
    next_minute * * * *       ktrace -di -f /tmp/myktrace.out

  The emailed results of the first example may lead to the solution.
  Otherwise, use "kdump -f /tmp/myktrace.out" to examine the results
  from the second example.  If there's still a problem, the results
  from those examples would help troubleshooting.

Regards, Bob

Reply via email to