[SNMP4J] Please help me

Vee realvee2000 at yahoo.com
Wed Apr 7 22:14:28 CEST 2004


          After I get beta2 version, everything works very fine, except that after the result was retreived, the program didn't terminate itself. I tried to put  .close method for both transport object and snmp object but there was no difference, it still stucked there as if it was still running some thread or listening for some event until I had to press ctrl-break myself. 
 
        // initialize  
         .   
         .
         .

        pdu.setType(PDU.GET);
        pdu = protocol.sendPDU(pdu,myTarget);
        
        while (pdu==null)
            System.out.println("Wait for response");
        var=pdu.get(0);
        Variable value = new Counter64();
        value = var.getVariable();
        System.out.println(value.toString());
        
        // here I try to free all resource by myself since the previous run, the program didn't free resources itself and seemed it was waiting for something happen. but though I put these in, there was no difference. The same result was still happened (program didn't stop)

        pdu.clear();
        transport.close();
        protocol.close();
        transport=null;
        protocol=null; 
      }catch(IOException ex){
          ex.printStackTrace();
          System.out.println(ex.getMessage());
      }                
The debug message is : 
 
DEBUG [main] - Initialized Salt to 4ccc36339ff38f98.
DEBUG [main] - Sending message to 10.147.0.12/161 with length 45: 30:2b:02:01:00:04:06:70:75:62:6c:69:63:a0:1e:02:04:7b:59:94:76:02:01:00:02:01:00:30:10:30:0e:06:0a:2b:06:01:02:01:02:02:01:10:01:05:00
DEBUG [Thread-1] - Received message from /10.147.0.12 with length 57: 30:82:00:35:02:01:00:04:06:70:75:62:6c:69:63:a2:82:00:26:02:04:7b:59:94:76:02:01:00:02:01:00:30:82:00:16:30:82:00:12:06:0a:2b:06:01:02:01:02:02:01:10:01:41:04:01:07:d1:76
DEBUG [main] - New pending request with handleorg.snmp4j.mp.PduHandle at 7b599476
DEBUG [Thread-1] - Removing pending request with handleorg.snmp4j.mp.PduHandle at 7b599476
17289590
__
 
 
the "17289590" is a result from querying the IfInOctets. program did stop here at the cursor ( __ )   and no prompt displayed (it should return  C:> __   )


best regards,
Jacky


Surmsak Mahittivanitcha [V] 
Address : 71/398 Pitt st. Sydney, NSW  2000
Mob. : +61(4)-2165-5794



---------------------------------
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway - Enter today
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oosnmp.net/pipermail/snmp4j/attachments/20040407/8331e586/attachment.html>


More information about the SNMP4J mailing list