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

[BUG] In SNMP protocol configuration, GET and SET RPC requests are not working #1627

Open
sangy-ranju opened this issue Dec 18, 2024 · 1 comment
Assignees
Labels

Comments

@sangy-ranju
Copy link

Describe the bug
The SNMP data path is working as expected, with data path working fine. On the control path:

  • Devices are receiving commands from the server.
  • Logs are accessible, and operations like ping, version check, version update, and fetching device details are working as expected.
  • But GET and SET request are giving KeyError: 'device'{}

Connector name (If bug in the some connector):
SNMP Connector

Error traceback (If available):

The device name is not correctly passed from the server's RPC request to the gateway. As a result, the SNMP connector is unable to match the content["device"] key with the expected device name.

Logs:

DatapointKey(key=ReceivedFromBulkWalk, report_strategy=None): {'1.3.6.1.2.1.1.2.0': '1.3.6.1.4.1.8072.3.2.10'}, DatapointKey(key=ReceivedFromBulkGet, report_strategy=None): {'1.3.6.1.2.1.1.2.0': '1.3.6.1.4.1.8072.3.2.10', '1.3.6.1.2.1.1.3.0': '3:02:54.170000'}}), metadata={})]
2024-12-12 23:01:29 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _rpc_request_handler - 1568 - Connector "snmp" for RPC request "snmp_undefined" found
2024-12-12 23:01:29 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _rpc_request_handler - 1571 - Sending command RPC snmp_undefined to connector SNMPTest
2024-12-12 23:01:29 - |DEBUG| - [tb_gateway_service.py] - tb_gateway_service - _rpc_request_handler - 1574 - ******** content:{"method": "snmp_undefined", "params": {"requestFilter": "getData", "method": "get", "withResponse": false, "oid": ["1.3.6.1.2.1.1.1.0"]}, "id": "31"}****
2024-12-12 23:01:29 - |DEBUG| - [snmp_connector.py] - snmp_connector - server_side_rpc_handler - 275 - Received content:
2024-12-12 23:01:29 - |ERROR| - [tb_logger.py] - tb_logger - exception - 162 - 'device'
Traceback (most recent call last):
 /site-packages/thingsboard_gateway/connectors/snmp/snmp_connector.py", line 277, in server_side_rpc_handler
    if content["device"] == device["deviceName"]:
       ~~~~~~~^^^^^^^^^^
KeyError: 'device'
2024-12-12 23:01:29 - |ERROR| - [tb_logger.py] - tb_logger - exception - 162 - 'device'
Traceback (most recent call last):
  File "/python3.11/site-packages/thingsboard_gateway/connectors/snmp/snmp_connector.py", line 277, in server_side_rpc_handler
    if content["device"] == device["deviceName"]:
       ~~~~~~~^^^^^^^^^^
KeyError: 'device'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): _rpc_request_handler
    result = self.available_connectors_by_name[connector_name].server_side_rpc_handler(content) # noqa E501
   
  ==================================

Versions (please complete the following information):

  • OS: [e.g. Ubuntu 18.04]
  • Thingsboard IoT Gateway version 3.6.2
@sangy-ranju
Copy link
Author

Following up on this issue, as there has been no response or update from the team regarding this. Could you please share any feedback?
Looking forward to your response to ensure we address this appropriately.

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

No branches or pull requests

3 participants