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

No message received from host. #12

Open
dnl4 opened this issue Dec 12, 2021 · 7 comments
Open

No message received from host. #12

dnl4 opened this issue Dec 12, 2021 · 7 comments

Comments

@dnl4
Copy link

dnl4 commented Dec 12, 2021

Hello, I constantly get the error of the first attached image. Is this is caused by CPU usage of the device, connection, or what? And how to avoid that? Is there any change on the device that I should do?

More details:

  • I'm trying to do a walk() on two distinct devices.
  • First device, I do a walk() through 800 Oids. The second, through 1700 Oids.
  • Both devices sometime fail with that error.
  • Using wireshark, I see that my server send a SNMP packet (getBulkRequest), but get no packet back (get-response).
  • I already tried with various maxRepetitions(), from 1 to 100.

image

screely-1639269036958

@ChadSikorra
Copy link
Contributor

If you tell the walk to not use getBulk, does it still have the same issue? ie.: $walk->useGetBulk(false) before starting the loop.

@decadence
Copy link

decadence commented Dec 12, 2021

Had the same issue and $walk->useGetBulk(false) helped. Maybe device doesn't fully support bulk requests. I don't know exactly how it works.

@jozefrebjak
Copy link

@dnl4 are you solved problem ? For me it seems that SnmpWalk function not work at all

@Guyverix
Copy link

I have seen that happen before on some devices when retrieving a large number of OID's. If you have access to syslog on the servers/ hosts that are timing out take a look and see if it is making snmpd on the machine restart, or give a buffer error of some kind.

You could test putting in a speedbump such as a sleep(1) between each bulkGet and perhaps that will allow it to complete. If you hammer some devices, like cheaper Ausus AP routers, I have seen that happen, and had OK luck by slowing things down a little.

@ChadSikorra
Copy link
Contributor

I think part of the issue is that some devices respond to bulkGet requests quite differently, whether because of memory constraints or other issues. It's probably possible to handle this in a more sophisticated way in the walk to account for some of these cases. I imagine that's what the snmpwalk cli utility must do. Though haven't dug through it to see what specifically it is doing.

@decadence
Copy link

At least we can add more info about useGetBulk in Exception message because it took some time before I realised that this issue exists due to bulk requests which is default behaviour.

@ChadSikorra
Copy link
Contributor

At least we can add more info about useGetBulk in Exception message because it took some time before I realised that this issue exists due to bulk requests which is default behaviour.

The problem there is that the error is very generic and the exception thrown is a network based exception that the SNMP host did not respond when it was supposed to. That could happen for all sorts of reasons. The best that could possibly be done is to catch the specific exception and re-throw it with an additional appended message suggesting the need to set useGetBulk to false.

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

No branches or pull requests

5 participants