-
Notifications
You must be signed in to change notification settings - Fork 844
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] TBGW 3.4.2 BACnet [Errno 98] Address already in use #1215
Comments
Update,
2023-11-05 21:33:28 2023-11-05 21:33:28 - |DEBUG| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - process_config_request - 176 - Got config update request: {'bacnettest': {'name': 'bacnettest', 'type': 'bacnet', 'logLevel': 'DEBUG', 'configuration': 'bacnettest.json', 'configurationJson': {'general': {'objectName': 'TB_gateway', 'address': '0.0.0.0:47809', 'objectIdentifier': 602, 'maxApduLengthAccepted': 1476, 'segmentationSupported': 'segmentedBoth', 'vendorIdentifier': 15}, 'devices': [{'deviceName': 'ADevice', 'deviceType': 'default', 'address': '192.168.21.242:47808', 'pollPeriod': 300000, 'timeseries': [{'key': 'Buffer Top Temp', 'objectId': 'analogInput:0', 'propertyId': 'presentValue'}]}]}, 'ts': 1699220009668}} |
I have resinstalled and reconfigured a couple more times, and it does seem to be that the issue lies in 2023-11-05 21:33:28 2023-11-05 21:33:28 - |ERROR| - [core.py] - core - run - 174 - an error has occurred: BACnetUplinkConverter.init() missing 1 required positional argument: 'logger' Could this relate to the previous commit fixing a logging issue? Just realised I forgot my config files. tb_gateway.json
bacTest.json { |
Describe the bug
Following PR #1213
I have copied the 2 amended .py files into the container (a completely new copy of the container).
However, with a very simple config (done using remote configuration- great tool!), I get the error log below.
This is the only connector active on this device + container, and I've tried restarting it too, I'm stumped as to what to do - 172.17.0.2 is the IP address of the container, so that's correct.
No data ever arrives in our thignsboard instance from this connector on this container.
Connector name (If bug in the some connector):
BACnet
Error traceback (If available):
2023-11-05 21:18:06 2023-11-05 21:18:06 - |DEBUG| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _handle_active_connectors_update - 340 - Processing active connectors configuration update...
2023-11-05 21:18:07 2023-11-05 21:18:07 - |DEBUG| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - process_config_request - 176 - Got config update request: {'bacnettest': {'name': 'bacnettest', 'type': 'bacnet', 'logLevel': 'DEBUG', 'configuration': 'bacnettest.json', 'configurationJson': {'general': {'objectName': 'TB_gateway', 'address': '172.17.0.2:47808', 'objectIdentifier': 602, 'maxApduLengthAccepted': 1476, 'segmentationSupported': 'segmentedBoth', 'vendorIdentifier': 15}, 'devices': [{'deviceName': 'ADevice', 'deviceType': 'default', 'address': '192.168.21.242:47808', 'pollPeriod': 300000, 'timeseries': [{'key': 'Buffer Top Temp', 'objectId': 'analogInput:0', 'propertyId': 'presentValue'}]}]}, 'ts': 1699219088284}}
2023-11-05 21:18:07 2023-11-05 21:18:07 - |DEBUG| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - _handle_connector_configuration_update - 380 - Processing connectors configuration update...
2023-11-05 21:18:07 2023-11-05 21:18:07 - |DEBUG| - [tb_gateway_remote_configurator.py] - tb_gateway_remote_configurator - create_configuration_file_backup - 595 - Backup file created for configuration file bacnettest.json in //thingsboard_gateway/config/backup/bacnettest.json_backup_1699219087
2023-11-05 21:18:07 2023-11-05 21:18:07 - |ERROR| - [tb_logger.py] - tb_logger - exception - 97 - [Errno 98] Address already in use
2023-11-05 21:18:07 Traceback (most recent call last):
2023-11-05 21:18:07 File "/thingsboard_gateway/connectors/bacnet/bacnet_utilities/tb_gateway_bacnet_application.py", line 42, in init
2023-11-05 21:18:07 super().init(self.__device, self.__config["general"]["address"])
2023-11-05 21:18:07 File "/root/.local/lib/python3.11/site-packages/bacpypes/app.py", line 535, in init
2023-11-05 21:18:07 self.mux = UDPMultiplexer(self.localAddress)
2023-11-05 21:18:07 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-05 21:18:07 File "/root/.local/lib/python3.11/site-packages/bacpypes/bvllservice.py", line 96, in init
2023-11-05 21:18:07 self.directPort = UDPDirector(self.addrTuple)
2023-11-05 21:18:07 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-05 21:18:07 File "/root/.local/lib/python3.11/site-packages/bacpypes/udp.py", line 155, in init
2023-11-05 21:18:07 self.bind(address)
2023-11-05 21:18:07 File "/usr/local/lib/python3.11/asyncore.py", line 331, in bind
2023-11-05 21:18:07 return self.socket.bind(addr)
2023-11-05 21:18:07 ^^^^^^^^^^^^^^^^^^^^^^
2023-11-05 21:18:07 OSError: [Errno 98] Address already in use
2023-11-05 21:18:08 2023-11-05 21:18:08 - |DEBUG| - [bacnet_connector.py] - bacnet_connector - scan_network - 205 - WhoIsRequest has been sent.
2023-11-05 21:18:08 2023-11-05 21:18:08 - |DEBUG| - [bacnet_connector.py] - bacnet_connector - run - 78 - WhoIsRequest has been sent.
2023-11-05 21:18:08 2023-11-05 21:18:08 - |DEBUG| - [bacnet_connector.py] - bacnet_connector - scan_network - 205 - WhoIsRequest has been sent.
'deviceName'
Traceback (most recent call last):
2023-11-05 21:18:07 Traceback (most recent call last):
2023-11-05 21:18:07 File "/thingsboard_gateway/connectors/bacnet/bacnet_utilities/tb_gateway_bacnet_application.py", line 42, in init
2023-11-05 21:18:07 super().init(self.__device, self.__config["general"]["address"])
2023-11-05 21:18:07 File "/root/.local/lib/python3.11/site-packages/bacpypes/app.py", line 535, in init
2023-11-05 21:18:07 self.mux = UDPMultiplexer(self.localAddress)
2023-11-05 21:18:07 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-05 21:18:07 File "/root/.local/lib/python3.11/site-packages/bacpypes/bvllservice.py", line 96, in init
2023-11-05 21:18:07 self.directPort = UDPDirector(self.addrTuple)
2023-11-05 21:18:07 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-11-05 21:18:07 File "/root/.local/lib/python3.11/site-packages/bacpypes/udp.py", line 155, in init
2023-11-05 21:18:07 self.bind(address)
2023-11-05 21:18:07 File "/usr/local/lib/python3.11/asyncore.py", line 331, in bind
2023-11-05 21:18:07 return self.socket.bind(addr)
Versions (please complete the following information):
OS: Windows 11, Docker Desktop 4.24.2
Thingsboard IoT Gateway version [e.g. 2.0]
3.4.2
Python version[e.g. 3.7]
3.11.6
The text was updated successfully, but these errors were encountered: