In it's current state ... the Foundry does complete the snmp and tftp
portion of the process... checking the status with $oid.9.0 returns a
'1'
Which is 'normal' (aka successful completion of the command).

I promise you, nothing is being ignored ... I have 4 shells open each
doing a different task of monitoring the system as I run these tests.
I make a change and note it, then I start tcpdump and tail the messages
file and prep the check command ... then I run the tftp_get process and
watch.
I immediately start running the check command to look for status ... if
its 18 I run it again, until it completes or errors.

I will look at the wait command and see if I can fix it.
I went ahead and replaced my wait function with yours.
Is this wait function supposed to be defined or called from anywhere
else in JFFNMS, maybe in one of the lib/*.inc.php files?

The process of creating and dumping the config to a jffnms-generated
file 'does' complete successfully, it just refuses grab the contents and
put it in the DB 

On Thu, 2007-07-26 at 23:28 -0500, Craig Small wrote:

> On Thu, Jul 26, 2007 at 05:44:23PM -0400, Jeffrey Singleton wrote:
> > What does JFFNMS do with those temporary files for config dumps?
> > Crate file, Dump Data, then Insert into DB, right?
> create (touch) file
> call your transfer function
> call your wait function
> copy file into db
> erase file
> 
> > 17:42:09  :  H  11 : 192.168.7.254 : fdry_cc : Error Waiting transfer to
> > finish (12066 msec)
> "Error Waiting transfer to finish" means your wait function did not
> return true.
> 
> > >     function config_fdry_cc_wait ($ip,$rwcommunity,$server,$filename) {
> > > 
> > >         $i = 0;
> > >         do {
> > >           $result = snmp_get($ip,$rwcommunity,"$oid.9");
> > >           if ($result==1) return true;
> > >           sleep (2);
> > >         }
> > >         while ($result==18 && $i++ < 30);
> > >         return false;
> Err?
> OK, so 18 means it is processing, 1 means it is ok.
> It took 12 seconds to return, so we know it was not a timeout (as that
> takes 60 seconds). Soo, it returned something that was not 1 or 18.
> The Foundry is telling you what is wrong, you just ignored it :(
> 
> Put an  echo("Result is $result\n");  after the get or
> Let's re-write this nicer...
> 
> for($i=0; $i < 30; $i++) {
>  $result = snmp_get($ip, $rwcommunity, "$oid.9");
>  if ($result == 1)  // Complete :)
>    return true;
>  if ($result != 18) { // Not processing :(
>    logger("Transfer failed to $ip : Error $result");
>    return false;
>  }
> } // for
> return false;
> 
> You can remove the smileys if you want.
> 
> At least we'll know why it doesnt like your transfer.
> 
>   - Craig

-- 
Jeffrey Singleton
Network Systems Administrator (Trusted Source)
Secure Computing Corporation
48000 North Point Parkway
Alpharetta, GA 30022
C: +1 770-820-2909
O: +1 678-904-3694
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
jffnms-users mailing list
jffnms-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to