Main Author: Anantha Boyapalle
Copyright 2016-17, Dell, Inc.
SNMP Micro Service - device service for connecting SNMP devices to EdgeX.
Main Author: Anantha Boyapalle
Copyright 2016-17, Dell, Inc.
SNMP Micro Service - device service for connecting SNMP devices to EdgeX.
I got a strange problem. When I fellow the EdgeX document '5.3. SNMP - Adding a Device to EdgeX' to add my SNMP device. I couldn't get any data from my SNMP device. Originally, I thought it was because no one was listening to the response packet of SNMP agent. But it seems like there is another reason. Someone knows why the source port of SNMP microservice packet is arbitrary value, and how the SNMP microservice to listen this packet. Thanks a lot.
Tracking process:
(1) Use a command 'sudo docker logs -f edgex-device-snmp' to get information. the key information as bellow
[2018-11-28 01:51:30.959] boot - 8 INFO [Thread-190] --- SNMPDriver: ProcessCommand: get, interface: HTTP, address: 172.16.12.29, attributes: OID:1.3.6.1.4.1.10297.100.2.1.1.0:community:public, value: 1
[2018-11-28 01:51:36.961] boot - 8 ERROR [Thread-190] --- SNMPDriver: Exception in getValue():org.edgexfoundry.exception.DeviceNotFoundException: could not find device 'Connection timed out'.
(2) Use Wireshark to check the packet. There are request and response packets. But the soource port of request packet is 58477
(3) Check listening ports with a command 'netstat'. No one cares about it.
$ netstat -l
(4) Download and trace the source code 'device-snmp' on the github edgexfoundry. There is no 58477.
(5) Modify the file 'docker-compose.yml' to add port listen on edgex-device-snmp and run 'docker-compose up -d device-snmp' to restart the container. Everything works fine now.
device-snmp:
image: edgexfoundry/docker-device-snmp:0.6.0
ports:
- "49989:49989"
- "58477:58477"
container_name: edgex-device-snmp
hostname: edgex-device-snmp
networks:
- edgex-network
volumes:
- db-data:/data/db
- log-data:/edgex/logs
- consul-config:/consul/config
- consul-data:/consul/data
depends_on:
- data
- command
(6) The strangest thing is that I remove it later, and restart the SNMP container. It still works fine. And I restart the SNMP container everytime, the source port of packet will change to another number.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.