[SNMP4J] Maybe a but in PendingRequest object
Matthieu Casanova
chocolat.mou at gmail.com
Fri Mar 28 12:12:33 CET 2008
I tried some debug :
I added a System.err.println() at two places :
One in
the method of Snmp
public ResponseEvent send(PDU pdu, Target target,
TransportMapping transport) throws IOException
just after syncResponse.wait();
System.err.println("after syncResponse.wait()")
the other one in PendingRequest.run() method
after if ((!finished) && (retryCount > 0)) {
System.err.println("PendingRequest.run")
I always get this
after syncResponse.wait()
after syncResponse.wait()
PendingRequest.run
Of course I called transport.listen() before sending the PDU
and when I do a tcpdump, I see the response before the next retry is sent
Matthieu
On Fri, Mar 28, 2008 at 12:22 AM, Matthieu Casanova
<chocolat.mou at gmail.com> wrote:
> Hi Frank, I use 1.8.2 (I didn't had the time to update my version, is
> 1.9.x still beta version ?).
> I think I use a sync request (I send a request and get the result as
> return of the snmp.send() method)
> So It doesn't come back to me until the retries has been done
>
> Matthieu
>
>
>
> On Thu, Mar 27, 2008 at 8:51 PM, Frank Fock <fock at agentpp.com> wrote:
> > Hi Mathhieu,
> >
> > I have fixed the copy constructor bug in 1.9.1b.
> > Regarding the retry problem, I would like to
> > know whether you are using async request
> > processing and whether you call Snmp.cancel
> > when received the first event?
> > (And, of course, which version you are using?)
> >
> > Best regards,
> > Frank
> >
> >
> >
> > Matthieu Casanova wrote:
> > > Hi,
> > > the copy constructor of PendingRequest,
> > > PendingRequest(PendingRequest other)
> > > do not copy the transport object from other.
> > > This causes the following problem:
> > > I send a GET request like this giving the transport I want
> > > ResponseEvent event = snmp.send(pdu, target, transport);
> > >
> > > and for some reason there are some retries, but when copying the
> > > PendingRequest, the transport is not copied,
> > > so it is null for the next requests, and the Snmp object will use
> > > another transport.
> > > I fixed it by copying the transport in this constructor,
> > > but is it wanted or is it a bug ?
> > >
> > > Another question :
> > > the response for my GET request is noSuchName (because I ask for an
> > > OID that do not exists). But Snmp4j tries again,
> > > is there a reason to try again ?
> > > I have set the retry but I thought the retries were only for timeout ...
> > >
> > > Matthieu
> > > _______________________________________________
> > > SNMP4J mailing list
> > > SNMP4J at agentpp.org
> > > http://lists.agentpp.org/mailman/listinfo/snmp4j
> >
> > --
> > AGENT++
> > http://www.agentpp.com
> > http://www.mibexplorer.com
> > http://www.mibdesigner.com
> >
>
More information about the SNMP4J
mailing list