我正在使用适用于 Python 的 Azure 服务总线库从队列中读取消息。x 时间段后我收到以下错误:
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/site-packages/uamqp/authentication/cbs_auth.py", line 76, in create_authenticator
self._connection.container_id)
File "./src/cbs.pyx", line 73, in uamqp.c_uamqp.CBSTokenAuth.__cinit__
ValueError: Unable to open CBS link.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/site-packages/azure/servicebus/receive_handler.py", line 309, in open
self._handler.open(connection=self.connection)
File "/opt/anaconda3/lib/python3.7/site-packages/uamqp/client.py", line 259, in open
self._build_session()
File "/opt/anaconda3/lib/python3.7/site-packages/uamqp/client.py", line 214, in _build_session
on_attach=self._on_attach)
File "/opt/anaconda3/lib/python3.7/site-packages/uamqp/authentication/cbs_auth.py", line 82, in create_authenticator
"Please confirm target hostname exists: {}".format(connection.container_id, connection.hostname))
uamqp.errors.AMQPConnectionError: Unable to open authentication session on connection b'SBReceiver-00000000-0000-0000-0000-000000000000'.
Please confirm target hostname exists: b'myhostname.servicebus.windows.net'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/opt/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/path/to/main.py", line 648, in <module>
main()
File "/path/to/main.py", line 631, in main
run_service_bus()
File "/path/to/main.py", line 482, in run_service_bus
with my_client.get_receiver() as queue_receiver:
我认为这里发生的事情是在一段时间后我拥有的令牌过期了。处理这个问题的正确方法是什么?
临摹微笑
相关分类