From Jeremy.Stone at cyclone-technology.com Thu Jul 17 15:52:07 2008 From: Jeremy.Stone at cyclone-technology.com (Jeremy Stone) Date: Thu Jul 17 14:57:11 2008 Subject: [snmp] ListeningContext problems Message-ID: <5CCF910E0D15A54DAA689621F4F1D38E35E9FB@whaleshark.hq.cyclone> Have noticed a couple of problem with ListeningContext: (1) uk.co.westhawk.snmp.stack.ListeningContext destroys itself when either the last RawPduListener or the last UnhandledRawPduListener is removed - even though there may be a listener of the other type registered. Suggest following code change: (a) Add method: private void destroyIfNoListeners() { if (pduSupport.getListenerCount() == 0 && unhandledSupport.getListenerCount() == 0) { destroy(); } } (b) Call this from removeUnhandledRawPduListener and removeRawPduListener instead of checking the respective listener counts. (2) The startListening method sets the value of the soc member before it calls soc.create(...). If soc.create fails (e.g. there is another process listening on the port), subsequent calls to startListening will not throw an IOException (because soc!=null) but will not try to re-create the socket. Therefore callers will erroneously assume that the socket is created successfully. Maybe should only set soc after a successful call to create, i.e: protected void startListening() throws java.io.IOException { synchronized (SOC_LOCK) { if (soc == null) { ContextSocketFace tempSoc = AbstractSnmpContext .getSocket(typeSocket); tempSoc.create(hostPort, bindAddr); soc = tempSoc; ......etc as before } if (me == null) { ......etc as before } } } This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. Cyclone Technology Ltd. Registered in England and Wales No 3114265, Registered Office: 1 Church Walk, Tenbury Wells, WR15 8HT Visit our website at www.cyclone-technology.com From alex.ioannou at gmail.com Wed Jul 23 13:25:20 2008 From: alex.ioannou at gmail.com (Alex Ioannou) Date: Wed Jul 23 12:28:45 2008 Subject: [snmp] Westhawk SNMP Stack version 5.1 stuck thread issue Message-ID: Hi there I'm experiencing some problems when running SNMP requests using the Westhawk SNMP stack, version 5.1. Threads on the application server are becoming stuck when attempting to clean up the SNMP context after sending an SNMP request to a device. We are running our application on BEA Weblogic 10 application server. We have an enterprise java bean that manages our SNMP requests to the westhawk API. The application will send several SNMP requests simultaneously to different devices so several SNMP context objects will reside in memory and our application will have the possibility of invoking the destroy method simultaneously. I looked through the source code for version 6 and found that a fix was made in Transmitter.java where one thread set the "me" variable to null in destroy() but a second would be about to call me.interrupt() in interruptMe(), resulting in a null pointer. Will this fix help with my stuck thread issue or is there still a problem in the code? [deadlocked thread] ExecuteThread: '21' for queue: 'act-execute-queue': ---------------------------------------------------------------------- Thread 'ExecuteThread: '21' for queue: 'act-execute-queue'' is waiting to acquir e lock 'uk.co.westhawk.snmp.stack.Transmitter@984dea' that is held by thread '73 .106.72.80_161_null_v1_Trans0' Stack trace: ------------ uk.co.westhawk.snmp.stack.Transmitter.stand(Transmitter.java:144) uk.co.westhawk.snmp.stack.Transmitter.destroy(Transmitter.java:161) uk.co.westhawk.snmp.stack.AbstractSnmpContext.freeTransmitters(AbstractS nmpContext.java:934) uk.co.westhawk.snmp.stack.AbstractSnmpContext.destroy(AbstractSnmpContex t.java:470) Thanks Alex From birgit at westhawk.co.uk Wed Jul 23 14:15:03 2008 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Wed Jul 23 13:15:18 2008 Subject: [snmp] ListeningContext problems In-Reply-To: <5CCF910E0D15A54DAA689621F4F1D38E35E9FB@whaleshark.hq.cyclone> References: <5CCF910E0D15A54DAA689621F4F1D38E35E9FB@whaleshark.hq.cyclone> Message-ID: <488720C7.4040307@westhawk.co.uk> Hi Jeremy, Sorry for my late response. Thanks for pointing out those bugs and giving us the solution! I've added them to the stack and checked the code in. Thanks, Birgit On 17/07/08 14:52, Jeremy Stone wrote: > Have noticed a couple of problem with ListeningContext: > > (1) uk.co.westhawk.snmp.stack.ListeningContext destroys itself when > either the last RawPduListener or the last UnhandledRawPduListener is > removed - even though there may be a listener of the other type > registered. > > > > Suggest following code change: > > (a) Add method: > > private void destroyIfNoListeners() > > { > > if (pduSupport.getListenerCount() == 0 > > && unhandledSupport.getListenerCount() == 0) > > { > > destroy(); > > } > > } > > > > (b) Call this from removeUnhandledRawPduListener and > removeRawPduListener instead of checking the respective listener counts. > > > > (2) The startListening method sets the value of the soc member before > it calls soc.create(...). If soc.create fails (e.g. there is another > process listening on the port), subsequent calls to startListening will > not throw an IOException (because soc!=null) but will not try to > re-create the socket. Therefore callers will erroneously assume that the > socket is created successfully. > > > > Maybe should only set soc after a successful call to create, i.e: > > > > protected void startListening() throws java.io.IOException > > { > > synchronized (SOC_LOCK) > > { > > if (soc == null) > > { > > ContextSocketFace tempSoc = AbstractSnmpContext > > .getSocket(typeSocket); > > tempSoc.create(hostPort, bindAddr); > > > > soc = tempSoc; > > > > ......etc as before > > } > > if (me == null) > > { > > ......etc as before > > } > > } > > } > > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. > > Cyclone Technology Ltd. Registered in England and Wales No 3114265, Registered Office: 1 Church Walk, Tenbury Wells, WR15 8HT > > Visit our website at www.cyclone-technology.com > _______________________________________________ > snmp mailing list > snmp@snmp.westhawk.co.uk > http://snmp.westhawk.co.uk/mailman/listinfo/snmp -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- From birgit at westhawk.co.uk Wed Jul 23 14:20:52 2008 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Wed Jul 23 13:21:03 2008 Subject: [snmp] Re: AsnObjectId In-Reply-To: <483C2444.1020906@westhawk.co.uk> References: <008001c8bc1d$06a43f40$94fc5980@7C911> <483C2444.1020906@westhawk.co.uk> Message-ID: <48872224.3010006@westhawk.co.uk> Hi Josh, I checked AsnObjectId in cvs. My changes: For deserialization: - Changed class variable 'value' so it's empty. - Made default constructor protected. - Set type=ASN_OBJECT_ID in default constructor. - Called this() in other constructors, except AsnObjectId(InputStream in, int len) Cheers, Birgit On 27/05/08 16:09, Birgit Arkesteijn wrote: > Hi Josh, > > Sorry for my late reply, but I've been on holiday. > > I don't see how you can do it without any changes to the class. > I suggest: > - I make the default constructor "protected" instead of "class protected", > - I changed it so value is an empty array. > > What do you think? > > Cheers, Birgit > > > On 22/05/08 16:03, Josh Bers wrote: >> I am trying to serialize the AsnObjectId class via a wrapper >> (subclass). The problem is that there is no way to modify the array of >> longs (OID) once instantiated. I could use the add() methods, however, >> the default empty constructor is not protected (it is package access) >> and the default value for the OID is some test value, e.g., >> {1,3,6,1,4,1,674,10889,2,1,0} instead of {} making it impossible to do >> serialization in the subclass. >> >> >> >> Any suggestions on how to serialize without modifying the Westhawk >> code are appreciated. >> >> >> >> Thanks, >> >> >> >> Josh >> >> >> >> Josh Bers >> >> Senior Engineer, Mobile Networking Systems >> >> BBN Technologies >> >> web: www.bbn.com ph: (617) 873-4262 fax: (617) >> 873-4523 >> >> >> > -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- From birgit at westhawk.co.uk Wed Jul 23 14:42:18 2008 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Wed Jul 23 13:42:27 2008 Subject: [snmp] Westhawk SNMP Stack version 5.1 stuck thread issue In-Reply-To: References: Message-ID: <4887272A.8000005@westhawk.co.uk> Hi Alex, The fix you mentioned was added to avoid a NullPointer exception. I do not think this change will solve your problem(s) of hanging threads. See the discussion at http://snmp.westhawk.co.uk/pipermail/snmp/2007-January/000458.html continued with http://snmp.westhawk.co.uk/pipermail/snmp/2007-February/000460.html Is there anything else in the StackTrace that suggests why notifyAll() in/on Transmitter.stand(Transmitter.java:144) is blocked or what it's waiting for? Cheers, Birgit On 23/07/08 12:25, Alex Ioannou wrote: > Hi there > > I'm experiencing some problems when running SNMP requests using the > Westhawk SNMP stack, version 5.1. > Threads on the application server are becoming stuck when attempting > to clean up the SNMP context after > sending an SNMP request to a device. > > We are running our application on BEA Weblogic 10 application server. > We have an enterprise java bean > that manages our SNMP requests to the westhawk API. The application > will send several SNMP requests > simultaneously to different devices so several SNMP context objects > will reside in memory and our application > will have the possibility of invoking the destroy method simultaneously. > > I looked through the source code for version 6 and found that a fix > was made in Transmitter.java where > one thread set the "me" variable to null in destroy() but a second > would be about to call me.interrupt() in > interruptMe(), resulting in a null pointer. > > Will this fix help with my stuck thread issue or is there still a > problem in the code? > > > [deadlocked thread] ExecuteThread: '21' for queue: 'act-execute-queue': > ---------------------------------------------------------------------- > Thread 'ExecuteThread: '21' for queue: 'act-execute-queue'' is > waiting to acquir > e lock 'uk.co.westhawk.snmp.stack.Transmitter@984dea' that is held by > thread '73 > .106.72.80_161_null_v1_Trans0' > > Stack trace: > ------------ > uk.co.westhawk.snmp.stack.Transmitter.stand(Transmitter.java:144) > uk.co.westhawk.snmp.stack.Transmitter.destroy(Transmitter.java:161) > uk.co.westhawk.snmp.stack.AbstractSnmpContext.freeTransmitters(AbstractS > nmpContext.java:934) > uk.co.westhawk.snmp.stack.AbstractSnmpContext.destroy(AbstractSnmpContex > t.java:470) > > Thanks > Alex > _______________________________________________ > snmp mailing list > snmp@snmp.westhawk.co.uk > http://snmp.westhawk.co.uk/mailman/listinfo/snmp -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- From alex.ioannou at gmail.com Wed Jul 23 15:14:59 2008 From: alex.ioannou at gmail.com (Alex Ioannou) Date: Wed Jul 23 14:43:49 2008 Subject: [snmp] Westhawk SNMP Stack version 5.1 stuck thread issue In-Reply-To: <4887272A.8000005@westhawk.co.uk> References: <4887272A.8000005@westhawk.co.uk> Message-ID: Hi there Here is all of the logging that I have to hand. I also found out that we are using SNMP 2 and not 3. DEADLOCK DETECTED: ================== [deadlocked thread] 73.187.240.88_161_null_v1_Trans0: ---------------------------------------------------- Thread '73.187.240.88_161_null_v1_Trans0' is waiting to acquire lock 'uk.co.west hawk.snmp.stack.SnmpContextv2c@ca750' that is held by thread 'ExecuteThread: '22 ' for queue: 'act-execute-queue'' Stack trace: ------------ uk.co.westhawk.snmp.stack.AbstractSnmpContext.sendPacket(AbstractSnmpCon text.java:625) uk.co.westhawk.snmp.stack.Pdu.sendme(Pdu.java:251) uk.co.westhawk.snmp.stack.Pdu.transmit(Pdu.java:676) uk.co.westhawk.snmp.stack.Pdu.transmit(Pdu.java:664) uk.co.westhawk.snmp.stack.Transmitter.run(Transmitter.java:80) java.lang.Thread.run(Thread.java:619) [deadlocked thread] 96.160.255.250_161_null_v1_Trans0: ----------------------------------------------------- Thread '96.160.255.250_161_null_v1_Trans0' is waiting to acquire lock 'uk.co.wes thawk.snmp.stack.SnmpContextv2c@1a51bb7' that is held by thread 'ExecuteThread: '15' for queue: 'eventhandler-worker-3-queue'' Stack trace: ------------ uk.co.westhawk.snmp.stack.AbstractSnmpContext.sendPacket(AbstractSnmpCon text.java:625) uk.co.westhawk.snmp.stack.Pdu.sendme(Pdu.java:251) uk.co.westhawk.snmp.stack.Pdu.transmit(Pdu.java:676) uk.co.westhawk.snmp.stack.Pdu.transmit(Pdu.java:664) uk.co.westhawk.snmp.stack.Transmitter.run(Transmitter.java:80) java.lang.Thread.run(Thread.java:619) [deadlocked thread] ExecuteThread: '22' for queue: 'act-execute-queue': ---------------------------------------------------------------------- Thread 'ExecuteThread: '22' for queue: 'act-execute-queue'' is waiting to acquir e lock 'uk.co.westhawk.snmp.stack.Transmitter@bc9817' that is held by thread '73 .187.240.88_161_null_v1_Trans0' Stack trace: ------------ uk.co.westhawk.snmp.stack.Transmitter.stand(Transmitter.java:144) uk.co.westhawk.snmp.stack.Transmitter.destroy(Transmitter.java:161) uk.co.westhawk.snmp.stack.AbstractSnmpContext.freeTransmitters(AbstractS nmpContext.java:934) uk.co.westhawk.snmp.stack.AbstractSnmpContext.destroy(AbstractSnmpContex t.java:470) [deadlocked thread] ExecuteThread: '15' for queue: 'eventhandler-worker-3-queue' : -------------------------------------------------------------------------------- Thread 'ExecuteThread: '15' for queue: 'eventhandler-worker-3-queue'' is waiting to acquire lock 'uk.co.westhawk.snmp.stack.Transmitter@beb647' that is held by thread '96.160.255.250_161_null_v1_Trans0' Stack trace: ------------ uk.co.westhawk.snmp.stack.Transmitter.stand(Transmitter.java:144) uk.co.westhawk.snmp.stack.Transmitter.destroy(Transmitter.java:161) uk.co.westhawk.snmp.stack.AbstractSnmpContext.freeTransmitters(AbstractS nmpContext.java:934) uk.co.westhawk.snmp.stack.AbstractSnmpContext.destroy(AbstractSnmpContex t.java:470) #### <> <> <> <1215 352629836> #### <> <> <> <1215352629838> #### <> <> <> <1215352629885> #### <> <> <> <> <1215352630104 > (a uk.co.westhawk.snmp.stack.Transmitter) at uk.co.westhawk.snmp.stack.Transmitter.destroy(Transmitter.java:161) at uk.co.westhawk.snmp.stack.AbstractSnmpContext.freeTransmitters(Abstra ctSnmpContext.java:934) at uk.co.westhawk.snmp.stack.AbstractSnmpContext.run(AbstractSnmpContext .java:598) at java.lang.Thread.run(Thread.java:619) Hope this helps Alex 2008/7/23 Birgit Arkesteijn : > Hi Alex, > > The fix you mentioned was added to avoid a NullPointer exception. I do not > think this change will solve your problem(s) of hanging threads. > > See the discussion at > http://snmp.westhawk.co.uk/pipermail/snmp/2007-January/000458.html > continued with > http://snmp.westhawk.co.uk/pipermail/snmp/2007-February/000460.html > > Is there anything else in the StackTrace that suggests why notifyAll() in/on > Transmitter.stand(Transmitter.java:144) is blocked or what it's waiting for? > > Cheers, Birgit > > > On 23/07/08 12:25, Alex Ioannou wrote: >> >> Hi there >> >> I'm experiencing some problems when running SNMP requests using the >> Westhawk SNMP stack, version 5.1. >> Threads on the application server are becoming stuck when attempting >> to clean up the SNMP context after >> sending an SNMP request to a device. >> >> We are running our application on BEA Weblogic 10 application server. >> We have an enterprise java bean >> that manages our SNMP requests to the westhawk API. The application >> will send several SNMP requests >> simultaneously to different devices so several SNMP context objects >> will reside in memory and our application >> will have the possibility of invoking the destroy method simultaneously. >> >> I looked through the source code for version 6 and found that a fix >> was made in Transmitter.java where >> one thread set the "me" variable to null in destroy() but a second >> would be about to call me.interrupt() in >> interruptMe(), resulting in a null pointer. >> >> Will this fix help with my stuck thread issue or is there still a >> problem in the code? >> >> >> [deadlocked thread] ExecuteThread: '21' for queue: >> 'act-execute-queue': >> >> ---------------------------------------------------------------------- >> Thread 'ExecuteThread: '21' for queue: 'act-execute-queue'' is >> waiting to acquir >> e lock 'uk.co.westhawk.snmp.stack.Transmitter@984dea' that is held >> by >> thread '73 >> .106.72.80_161_null_v1_Trans0' >> >> Stack trace: >> ------------ >> >> uk.co.westhawk.snmp.stack.Transmitter.stand(Transmitter.java:144) >> >> uk.co.westhawk.snmp.stack.Transmitter.destroy(Transmitter.java:161) >> >> uk.co.westhawk.snmp.stack.AbstractSnmpContext.freeTransmitters(AbstractS >> nmpContext.java:934) >> >> uk.co.westhawk.snmp.stack.AbstractSnmpContext.destroy(AbstractSnmpContex >> t.java:470) >> >> Thanks >> Alex >> _______________________________________________ >> snmp mailing list >> snmp@snmp.westhawk.co.uk >> http://snmp.westhawk.co.uk/mailman/listinfo/snmp > > -- > -- Birgit Arkesteijn, birgit@westhawk.co.uk, > -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK > -- Company no: 1769350 > -- Registered Office: > -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. > -- tel.: +44 (0)161 237 0660 > -- > _______________________________________________ > snmp mailing list > snmp@snmp.westhawk.co.uk > http://snmp.westhawk.co.uk/mailman/listinfo/snmp > From krithinarayanan at dhyanit.com Tue Jul 29 16:03:31 2008 From: krithinarayanan at dhyanit.com (krithi) Date: Tue Jul 29 11:04:12 2008 Subject: [snmp] Large Response Varbinds Message-ID: <488EE3EB.3060107@dhyanit.com> Hi I am trying to get a GetBulk response for 5 tabular oids with maxRepetition =24 and nonRepeators = 0. At the max I am able to receive only 60 VarBindings. From Westhawk documents, I do understand that the maximum response packet size is only 1300 bytes. Definitely my response size is far more 1. Please do suggest me ways to get a real GetBulk, in which there could be a Single Request, and a Single Response 2. Is any fragmentation mechanism at the network level available that I could use for getting a Single Response Just to mention I googled through the archives, but unable to find any workaround Please help. Thanks & Regards Krithinarayanan From birgit at westhawk.co.uk Tue Jul 29 12:19:24 2008 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Tue Jul 29 11:19:34 2008 Subject: [snmp] Large Response Varbinds In-Reply-To: <488EE3EB.3060107@dhyanit.com> References: <488EE3EB.3060107@dhyanit.com> Message-ID: <488EEEAC.4040406@westhawk.co.uk> Hi Krithinarayanan, Which version of SNMP are you using? Have a look at AbstractSnmpContext.setMaxRecvSize(int no), this might help you. The reason I say "might" is because the SNMP server might decide to reduce the response based on it's own configuration. Depending on the SNMP version: - in SNMPv3 this 'max size' is sent as part of the request info - the server might send a SNMP_ERR_TOOBIG to indicate it reduced its response If the limitation is due to the server, you might have no alternative then to split up the GetBulk request. As to the network fragmentation, as far as I know this is not accessible in the Java VM. Hopefully the above helps. Cheers, Birgit On 29/07/08 10:33, krithi wrote: > Hi > I am trying to get a GetBulk response for 5 tabular oids with > maxRepetition =24 and nonRepeators = 0. > At the max I am able to receive only 60 VarBindings. > > From Westhawk documents, I do understand that the maximum response > packet size is only 1300 bytes. > Definitely my response size is far more > > 1. Please do suggest me ways to get a real GetBulk, in which there could > be a Single Request, and a Single Response > 2. Is any fragmentation mechanism at the network level available that I > could use for getting a Single Response > > Just to mention I googled through the archives, but unable to find any > workaround > Please help. > > Thanks & Regards > Krithinarayanan -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- From krithinarayanan at dhyanit.com Thu Jul 31 14:26:50 2008 From: krithinarayanan at dhyanit.com (krithi) Date: Thu Jul 31 09:52:09 2008 Subject: [snmp] Large Response Varbinds In-Reply-To: <488EEEAC.4040406@westhawk.co.uk> References: <488EE3EB.3060107@dhyanit.com> <488EEEAC.4040406@westhawk.co.uk> Message-ID: <48917042.8030101@dhyanit.com> Hi Birgit Thanks for the reply I am using SNMP v2. I was able to trace that the Server(Agent) does not respond Regards Krithinarayanan Krithinarayanan Birgit Arkesteijn wrote: > Hi Krithinarayanan, > > Which version of SNMP are you using? > > Have a look at AbstractSnmpContext.setMaxRecvSize(int no), this might > help you. The reason I say "might" is because the SNMP server might > decide to reduce the response based on it's own configuration. > > Depending on the SNMP version: > - in SNMPv3 this 'max size' is sent as part of the request info > - the server might send a SNMP_ERR_TOOBIG to indicate it reduced its > response > > If the limitation is due to the server, you might have no alternative > then to split up the GetBulk request. > > As to the network fragmentation, as far as I know this is not > accessible in the Java VM. > > Hopefully the above helps. > > Cheers, Birgit > > > On 29/07/08 10:33, krithi wrote: >> Hi >> I am trying to get a GetBulk response for 5 tabular oids with >> maxRepetition =24 and nonRepeators = 0. >> At the max I am able to receive only 60 VarBindings. > > >> From Westhawk documents, I do understand that the maximum response >> packet size is only 1300 bytes. >> Definitely my response size is far more >> >> 1. Please do suggest me ways to get a real GetBulk, in which there >> could be a Single Request, and a Single Response >> 2. Is any fragmentation mechanism at the network level available that >> I could use for getting a Single Response >> >> Just to mention I googled through the archives, but unable to find >> any workaround >> Please help. >> >> Thanks & Regards >> Krithinarayanan > > From birgit at westhawk.co.uk Thu Jul 31 11:41:37 2008 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Thu Jul 31 10:41:44 2008 Subject: [snmp] Large Response Varbinds In-Reply-To: <48917042.8030101@dhyanit.com> References: <488EE3EB.3060107@dhyanit.com> <488EEEAC.4040406@westhawk.co.uk> <48917042.8030101@dhyanit.com> Message-ID: <489188D1.7000607@westhawk.co.uk> Dear Krithinarayanan, From your initial post, I take it that the agent does respond, but limits its response? Or do I misunderstand and the agent doesn't send a response at all? If the agent limits its response to your GetBulk request, you have no option than to split your GetBulk into several requests. If the agent doesn't respond at all, hopefully you'll be able to access the log files on the server and see what's going on. Cheers, Birgit On 31/07/08 08:56, krithi wrote: > Hi Birgit > Thanks for the reply > I am using SNMP v2. I was able to trace that the Server(Agent) does not > respond > > Regards > Krithinarayanan -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- From krithinarayanan at dhyanit.com Thu Jul 31 16:37:06 2008 From: krithinarayanan at dhyanit.com (krithi) Date: Thu Jul 31 11:08:12 2008 Subject: [snmp] Large Response Varbinds In-Reply-To: <489188D1.7000607@westhawk.co.uk> References: <488EE3EB.3060107@dhyanit.com> <488EEEAC.4040406@westhawk.co.uk> <48917042.8030101@dhyanit.com> <489188D1.7000607@westhawk.co.uk> Message-ID: <48918ECA.3000407@dhyanit.com> Dear Birgit, I' am sorry for the confusion. I guess The agent limits its response With further investigation with Wireshark Network Analyzer, I noticed that the device sends back 1900 bytes of response. When tested with a device simulator, I am able to receive 10k bytes of data in a single GetBulk Since the device sends back 1900 bytes (incl. the packet headers), I am now doubtful whether the Agent is limiting or I am missing anything in capturing the packets through my adapter Thanks for your support Krithinarayanan Birgit Arkesteijn wrote: > Dear Krithinarayanan, > > From your initial post, I take it that the agent does respond, but > limits its response? Or do I misunderstand and the agent doesn't send > a response at all? > > If the agent limits its response to your GetBulk request, you have no > option than to split your GetBulk into several requests. > > If the agent doesn't respond at all, hopefully you'll be able to > access the log files on the server and see what's going on. > > Cheers, Birgit > > > On 31/07/08 08:56, krithi wrote: >> Hi Birgit >> Thanks for the reply >> I am using SNMP v2. I was able to trace that the Server(Agent) does >> not respond >> >> Regards >> Krithinarayanan > > > From birgit at westhawk.co.uk Thu Jul 31 12:25:19 2008 From: birgit at westhawk.co.uk (Birgit Arkesteijn) Date: Thu Jul 31 11:25:26 2008 Subject: [snmp] Large Response Varbinds In-Reply-To: <48918ECA.3000407@dhyanit.com> References: <488EE3EB.3060107@dhyanit.com> <488EEEAC.4040406@westhawk.co.uk> <48917042.8030101@dhyanit.com> <489188D1.7000607@westhawk.co.uk> <48918ECA.3000407@dhyanit.com> Message-ID: <4891930F.7070306@westhawk.co.uk> Dear Krithinarayanan, You can increase (or set) the debug level in the stack. Set AsnObject.setDebug(11); You'll get a LOT of debug information, but it should print how many bytes it reads from the socket. When the stack reads less bytes from the packet than sent, it usually isn't able to decode it properly, giving your decoding errors. Those errors should be printed as well. If the number of bytes corresponds to the number send (and there are no errors), you can be sure the stack received everything the agent sent. Cheers, Birgit On 31/07/08 11:07, krithi wrote: > Dear Birgit, > I' am sorry for the confusion. I guess The agent limits its response > With further investigation with Wireshark Network Analyzer, I noticed > that the device sends back 1900 bytes of response. > When tested with a device simulator, I am able to receive 10k bytes of > data in a single GetBulk > > Since the device sends back 1900 bytes (incl. the packet headers), > I am now doubtful whether the Agent is limiting or I am missing anything > in capturing the packets through my adapter > > Thanks for your support > > Krithinarayanan -- -- Birgit Arkesteijn, birgit@westhawk.co.uk, -- Westhawk Ltd, Albion Wharf, 19 Albion Street, Manchester M1 5LN, UK -- Company no: 1769350 -- Registered Office: -- 15 London Road, Stockton Heath, Warrington WA4 6SJ. UK. -- tel.: +44 (0)161 237 0660 -- From andy at riftware.com Thu Jul 31 12:25:42 2008 From: andy at riftware.com (Andrew Chandler) Date: Thu Jul 31 17:26:23 2008 Subject: [snmp] Large Response Varbinds In-Reply-To: <48918ECA.3000407@dhyanit.com> Message-ID: <200807311601.m6VG1eZa016735@dedicated.riftware.com> Almost no device is going to send you back 10k worth of data in a single packet. With SNMP you are responsible for figuring out what the last item is in the packet they sent you for your get_bulk and then you use that as the seed of your next get_bulk to keep retrrieving until you get everything. Most simulators (Mimic in my experience) can be set to emulate the limitations of a real device - you would just need to tell them to also limit their response in a configuration option so that you are testing against a realistic scenario. -----Original Message----- From: snmp-bounces@snmp.westhawk.co.uk [mailto:snmp-bounces@snmp.westhawk.co.uk] On Behalf Of krithi Sent: Thursday, July 31, 2008 5:07 AM To: List for discussion of the Westhawk SNMP stack Subject: Re: [snmp] Large Response Varbinds Dear Birgit, I' am sorry for the confusion. I guess The agent limits its response With further investigation with Wireshark Network Analyzer, I noticed that the device sends back 1900 bytes of response. When tested with a device simulator, I am able to receive 10k bytes of data in a single GetBulk Since the device sends back 1900 bytes (incl. the packet headers), I am now doubtful whether the Agent is limiting or I am missing anything in capturing the packets through my adapter Thanks for your support Krithinarayanan Birgit Arkesteijn wrote: > Dear Krithinarayanan, > > From your initial post, I take it that the agent does respond, but > limits its response? Or do I misunderstand and the agent doesn't send > a response at all? > > If the agent limits its response to your GetBulk request, you have no > option than to split your GetBulk into several requests. > > If the agent doesn't respond at all, hopefully you'll be able to > access the log files on the server and see what's going on. > > Cheers, Birgit > > > On 31/07/08 08:56, krithi wrote: >> Hi Birgit >> Thanks for the reply >> I am using SNMP v2. I was able to trace that the Server(Agent) does >> not respond >> >> Regards >> Krithinarayanan > > > _______________________________________________ snmp mailing list snmp@snmp.westhawk.co.uk http://snmp.westhawk.co.uk/mailman/listinfo/snmp -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.