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
--
Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/ csmall at : enc.com.au
http://www.debian.org/ Debian GNU/Linux, software should be Free
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users