Closed sobehard closed 4 years ago
Hi @sobehard ,
Thank you for your feedback, please try to use the version from the master branch of the thingsboard-gateway repository.
Hi @zbeacon ,
I just downloaded the last code from master branch and test the ssl/tls connection. There is another issue occur when I try to run the thingsboard-gateway. Below is the error traceback from the log.
Traceback (most recent call last):
File "tb_gateway.py", line 31, in <module>
main()
File "tb_gateway.py", line 22, in main
TBGatewayService(path.dirname(path.abspath(__file__)) + '/config/tb_gateway.yaml'.replace('/', path.sep))
File "/usr/local/lib/python3.6/dist-packages/thingsboard_gateway-2.5.0-py3.6.egg/thingsboard_gateway/gateway/tb_gateway_service.py", line 87, in __init__
self.tb_client = TBClient(config["thingsboard"])
File "/usr/local/lib/python3.6/dist-packages/thingsboard_gateway-2.5.0-py3.6.egg/thingsboard_gateway/gateway/tb_client.py", line 53, in __init__
self.client._client.tls_insecure_set(False)
File "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 743, in tls_insecure_set
self._ssl_context.check_hostname = not value
ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or CERT_REQUIRED
^CException ignored in: <module 'threading' from '/usr/lib/python3.6/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 1294, in _shutdown
t.join()
File "/usr/lib/python3.6/threading.py", line 1056, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
Ok, please try again the version from master branch.
I updated the thingsboard-gateway and try the latest gatewa code, but he same issue still appear. Below is the screenshot of the log.
It looks like it wasn't updated, please try to pull again.
Above screenshot show the git pull log.
The issue still appear after second update.
Have you removed the old version before installation?
Commands for removing and installation are:
sudo pip3 uninstall thingsboard-gateway pip3 uninstall thingsboard-gateway
python3 setup.py install
Oh sorry, you're right. I'm using wrong command (sudo apt remove python3-thingsboard-gateway) to uninstall the thingsboard-gateway just now. The thingsboard gateway is able to run now.
Describe the issue There is an issue related to the mqtt over ssl/tls which make the thingsboard gateway become inactive and stop converting mqtt message from local sensor to the cloud (thingsboard). At first, everything is working fine without any issue. After some time, the issue will come out and I need to force restart the thingsboard gateway in order to receive data from local sensor. I'm not sure the exact timing and the thing that caused this issue.
tb_gateway.yml file setting
Error traceback (If it was raised):
Versions (please complete the following information):