Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout error when GetMulti has too many OIDs #20

Open
jda opened this issue Feb 4, 2014 · 3 comments
Open

Timeout error when GetMulti has too many OIDs #20

jda opened this issue Feb 4, 2014 · 3 comments

Comments

@jda
Copy link

jda commented Feb 4, 2014

I'm running into a timeout error when trying to make a GetMulti request with six OIDs. The error is "Error reading from UDP: WSARecv udp 172.16.1.2:50964: i/o timeout".

When I watch for the SNMP packet with Wireshark the packets that time out are sent but Wireshark can't decode them as valid SNMP packets. My suspicion is that the packet is too big and is truncated.

The error occurs when the length of the byte array return from SnmpPacket.marshal() is 140. It does not occur when the length is 123. That's as far as I've been able to narrow down the problem.

@jda
Copy link
Author

jda commented Feb 4, 2014

It seems to me like GetMulti should detect when the packet would be too big and return a error or perhaps divide up the request and issue multiple requests but as the maximum packet size would vary depending on the environment I'm not sure how you'd figure out what size is too big.

@jda
Copy link
Author

jda commented Feb 5, 2014

I'm working around this by splitting GetMulti requests into batches of 5 OIDs per request and combining the results: jda/gosnmp@6e53242

@alouca
Copy link
Owner

alouca commented Feb 9, 2014

Hi,

Yes currently I do not do any checks to make sure that the packet resulting fits into a single-udp packet. I will add this in my todo-list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants