[SNMP4J] Problem restarting DefaultUDPTransport

JD Bertron jbertron at sfa.com
Sun Mar 19 17:23:29 CET 2006


It looks like adding the socket.disconnect() call before the
socket.close()works after all. This is in file
DefaultUDPTransportMapping.java, near the end of the file.
Thanks.
J.D

-----Original Message-----
From: snmp4j-bounces at agentpp.org [mailto:snmp4j-bounces at agentpp.org] On
Behalf Of JD Bertron
Sent: Saturday, March 18, 2006 9:34 AM
To: snmp4j at agentpp.org
Subject: [SNMP4J] Problem restarting DefaultUDPTransport

Hi,

I have had to implement a 'hot restart' function for an SNMP agent based on
the library. By hot start, I mean that the VM used to start the agent stays
running and I carefully terminate the running threads of the agent before
restarting it. 

The DefaultUdpTransportMapping.java class properly closes the socket, and
amazingly, the 'new' DefaultUDPTransportMapping also obtains a 'good'
socket. There are no exceptions thrown and no errors anywhere. The new
mapping seems to behave properly, the socket loop runs fine, but the socket
does not receive any data, and looks like it's bound to a null address and
port -1. 

This is on Solaris 8 with JDK 1.4.2. I can't upgrade to 1.5. 

Does anyone have suggestions for me to try ?

[I tried a socket.disconnect() before the close with no effect. ]

Thanks.

 

J.D. Bertron.

SFA Charleston. 

843-202-2593.

 

_______________________________________________
SNMP4J mailing list
SNMP4J at agentpp.org
http://lists.agentpp.org/mailman/listinfo/snmp4j





More information about the SNMP4J mailing list