tronghuyict56 / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

[snmp] Cannot receive snmp-responses #408

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The new snmp-binding worked great until I rebooted my computer (Win8) an hour 
ago.

I sniffed the network traffic and I can see the snmp-responses arriving my 
computer.

But it looks like openHAB does not receive them.
I restarted openHAB a few times now.

Mybe it is just a lokal problem.
Maybe the binding does not start correctly.

items:
Number T1 "Temperatur (DS18B20) [%.1f °C]" <temperature> (Temp) { 
snmp="<[XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.5.1.1.0:60000]" }
Number T2 "Temperatur (EDS0065) [%.1f °C]" <temperature> (Temp) { 
snmp="<[XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.12.1.1.1:60000]" }
Number TH2 "Luftfeuchtigkeit (EDS0065) [%.1f %%]" <waterdrops> (Humid) { 
snmp="<[XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.12.1.2.1:60000]" }
Number DewPoint  "DewPoint (EDS0065) [%.1f °C]"  <temperature> (Temp) { 
snmp="<[XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.12.1.3.1:60000]" }
Number Humidex   "Humidex (EDS0065) [%.1f °C]"   <temperature> (Temp) { 
snmp="<[XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.12.1.4.1:60000]" }
Number HeatIndex "HeatIndex (EDS0065) [%.1f °C]" <temperature> (Temp) { 
snmp="<[XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.12.1.5.1:60000]" }
Number IO1A "Kontakt (DS2406 A) [MAP(contact.map):%d]" <door> (Switches) { 
snmp="<[XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.4.1.1.2:10000]" }
Switch IO1B "Schalter (DS2406 B)" (Switches)  { 
snmp="<[XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.4.1.4.2:10000] 
>[OFF:XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.4.1.4.2:1] 
>[ON:XXX.XXX.XXX.238:XXXXX:.1.3.6.1.4.1.31440.10.4.1.4.2:0]" }

openhab.log:
http://pastebin.com/PaQ13y5U

Original issue reported on code.google.com by christop...@gmail.com on 19 Aug 2013 at 3:04

GoogleCodeExporter commented 8 years ago
The log looks ok. Initially you get the "request aborted", but then the port is 
initialised (SNMP binding is listening on 0.0.0.0/162) and it works fine. This 
is normal - other than you don't receive any responses.

I'm not sure what to suggest really. It looks like it's working, but something 
outside of the binding is stopping it receiving the responses.

Didn't you have this problem earlier and it "fixed itself" when you turned 
something off overnight?

Original comment by ch...@cd-jackson.com on 19 Aug 2013 at 4:43

GoogleCodeExporter commented 8 years ago
Yes.
But this time it occurs right after a reboot. -> No other program is running.

I also think port 162 is just for traps, right?
I don't see anything about port 161.

But I cannot exclude a user-error. ;)

Original comment by christop...@gmail.com on 19 Aug 2013 at 7:03

GoogleCodeExporter commented 8 years ago
Yes, port 162 is the standard port for traps, this is why the binding listens 
on this port. Port 161 is the standard port that devices listen for GET/SET 
requests, but the source port can be anything (I just use 162 in the binding to 
avoid having to open two ports).

If you think it's a problem with the port (which I think is unlikely since the 
port is apparently being opened ok) then you can change the port in the 
openhab.cfg file.

I can't think of anything in the binding that can cause this. I would use 
Wireshark to see what's going on, but if there's a problem with the response 
(ie the device isn't sending one), then it won't probably won't show up, but 
it's worth a try.

Original comment by ch...@cd-jackson.com on 19 Aug 2013 at 7:22

GoogleCodeExporter commented 8 years ago
"netstat -anb" shows there are to services listening on the port 162.

 UDP    0.0.0.0:162            *:*
[java.exe]
 UDP    0.0.0.0:162            *:*
[java.exe]

After closing openHAB there is still one task running.

I closed some common apps (like Outlook, Chrome, etc.) and all of a sudden it 
the task was gone and openhab worked after I restarted it.

I have no clue how this happened and what programm caused this.
BUt I will investigate it if it occurs again.

Until then this issue can be closed as "user eroor" I guess.

Original comment by christop...@gmail.com on 20 Aug 2013 at 2:51

GoogleCodeExporter commented 8 years ago

Original comment by teichsta on 5 Nov 2013 at 10:53

GoogleCodeExporter commented 8 years ago
This issue has been migrated to Github. If this issue id is greater than103 its 
id has been preserved on Github. You can open your issue by calling the URL 
https://github.com/openhab/openhab/issues/<issueid>. Issues with ids less or 
equal 103 new ids were created.

Original comment by teichsta on 17 Nov 2013 at 8:08

GoogleCodeExporter commented 8 years ago
see above!

Issue has been migrated to Github and should be discussed there.

Original comment by teichsta on 21 Nov 2013 at 1:51