После этого руководства Я настраиваю свой Vision AI DevKit с помощью Azure.На самом деле это руководство позволяет мне ввести некоторые учетные данные Wi-Fi и вставить строку подключения на портале установки для моего пограничного устройства в Azure.Я полностью выполнил руководство, используя мобильную точку доступа для Wi-Fi, но обратил внимание на следующий шаг подключения к прямому видео потоку RTSP на камере с этого адреса rtsp://<IP address>:8900/live
Мне нужно развернуть пользовательский модуль на моем устройстве.
Итак, я следую этому руководству для настраиваемого модуля , чтобы сделать это, и на портале Azure я подтверждаю, что на устройстве представлены как пограничные системные модули, так и настраиваемый пограничный модуль, но яm теперь сталкивается с некоторыми трудными для отладки ошибками времени выполнения для edgeHub
и VisionSample
.
Ниже я использую adb
, чтобы получить более подробную информацию об ошибках времени выполнения на
adb shell docker logs -f edgeHub
Unhandled Exception: System.AggregateException: One or more errors occurred. (Permission denied) ---> System.Net.Sockets.SocketException: Permission denied
at System.Net.Sockets.Socket..ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
at Microsoft.Azure.Amqp.Transport.TcpTransportListener.OnListen()
at Microsoft.Azure.Amqp.Transport.TransportListener.Listen(Action`2 callback)
at Microsoft.Azure.Amqp.Transport.TlsTransportListener.OnListen()
at Microsoft.Azure.Amqp.Transport.TransportListener.Listen(Action`2 callback)
at Microsoft.Azure.Amqp.Transport.AmqpTransportListener.OnListen()
at Microsoft.Azure.Amqp.Transport.TransportListener.Listen(Action`2 callback)
at Microsoft.Azure.Devices.Edge.Hub.Amqp.AmqpProtocolHead.StartAsync() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Amqp/AmqpProtocolHead.cs:line 80
at Microsoft.Azure.Devices.Edge.Hub.Service.Program.MainAsync(IConfigurationRoot configuration) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs:line 97
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at Microsoft.Azure.Devices.Edge.Hub.Service.Program.Main() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Service/Program.cs:line 30
[2019-06-04 20:17:25 +00:00]: Starting Edge Hub
[06/04/2019 08:17:25.766 PM] Edge Hub Main()
[06/04/2019 08:17:28.961 PM] Found intermediate certificates: [CN=iotedged workload ca:09/02/2019 17:29:21],[CN=Test Edge Device CA:09/02/2019 17:29:21],[CN=Test Edge Owner CA:09/02/2019 17:29:21]
2019-06-04 20:17:31.254 +00:00 [INF] - Created persistent store at /tmp/edgeHub
2019-06-04 20:17:31.401 +00:00 [INF] - Created device scope identities cache
2019-06-04 20:17:31.450 +00:00 [INF] - Starting refresh of device scope identities cache
2019-06-04 20:17:31.486 +00:00 [INF] - Starting Edge Hub
2019-06-04 20:17:31.487 +00:00 [INF] -
█████╗ ███████╗██╗ ██╗██████╗ ███████╗
██╔══██╗╚══███╔╝██║ ██║██╔══██╗██╔════╝
███████║ ███╔╝ ██║ ██║██████╔╝█████╗
██╔══██║ ███╔╝ ██║ ██║██╔══██╗██╔══╝
██║ ██║███████╗╚██████╔╝██║ ██║███████╗
╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝
██╗ ██████╗ ████████╗ ███████╗██████╗ ██████╗ ███████╗
██║██╔═══██╗╚══██╔══╝ ██╔════╝██╔══██╗██╔════╝ ██╔════╝
██║██║ ██║ ██║ █████╗ ██║ ██║██║ ███╗█████╗
██║██║ ██║ ██║ ██╔══╝ ██║ ██║██║ ██║██╔══╝
██║╚██████╔╝ ██║ ███████╗██████╔╝╚██████╔╝███████╗
╚═╝ ╚═════╝ ╚═╝ ╚══════╝╚═════╝ ╚═════╝ ╚══════╝
2019-06-04 20:17:31.491 +00:00 [INF] - Version - 1.0.7.1.22377503 (f7c51d92be8336bc6be042e1f1f2505ba01679f3)
2019-06-04 20:17:31.500 +00:00 [INF] - Loaded server certificate with expiration date of "2019-09-02T17:29:21.0000000+00:00"
2019-06-04 20:17:31.556 +00:00 [INF] - Created new message store
2019-06-04 20:17:31.561 +00:00 [INF] - Started task to cleanup processed and stale messages
2019-06-04 20:17:32.032 +00:00 [INF] - Initialized twin manager v1.
2019-06-04 20:17:32.066 +00:00 [INF] - Initializing configuration
2019-06-04 20:17:32.129 +00:00 [INF] - New device connection for device edge-test-vai/$edgeHub
2019-06-04 20:17:32.364 +00:00 [INF] - Attempting to connect to IoT Hub for client edge-test-vai/$edgeHub via AMQP...
2019-06-04 20:17:36.736 +00:00 [WRN] - Encountered an error while refreshing the device scope identities cache. Will retry the operation in some time...
2019-06-04 20:17:59.513 +00:00 [WRN] - Error creating cloud connection for client edge-test-vai/$edgeHub
adb shell docker logs -f VisionSample
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 638, in urlopen
_stacktrace=sys.exc_info()[2])
File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 398, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=1080): Max retries exceeded with url: /login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xb5715a50>: Failed to establish a new connection: [Errno 111] Connection refused',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./python_iotcc_sdk/sdk/main.py", line 178, in <module>
main()
File "./python_iotcc_sdk/sdk/main.py", line 42, in main
with CameraClient.connect(ip_address=ip_addr, username=username, password=password) as camera_client:
File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
return next(self.gen)
File "/app/python_iotcc_sdk/sdk/camera.py", line 108, in connect
ipc_provider.connect()
File "/app/python_iotcc_sdk/sdk/ipcprovider.py", line 223, in connect
response = mysession.post(url,data=payload)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 572, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 524, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 637, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=1080): Max retries exceeded with url: /login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xb5715a50>: Failed to establish a new connection: [Errno 111] Connection refused',))
Error: Time:Tue Jun 4 19:53:21 2019 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:wait_for_connection Line:385 Failure: connect failure 111.
Error: Time:Tue Jun 4 19:53:21 2019 File:/usr/sdk/src/c/c-utility/adapters/socketio_berkeley.c Func:socketio_open Line:769 wait_for_connection failed
Error: Time:Tue Jun 4 19:53:21 2019 File:/usr/sdk/src/c/c-utility/adapters/tlsio_openssl.c Func:on_underlying_io_open_complete Line:760 Invalid tlsio_state. Expected state is TLSIO_STATE_OPENING_UNDERLYING_IO.
Error: Time:Tue Jun 4 19:53:21 2019 File:/usr/sdk/src/c/c-utility/adapters/tlsio_openssl.c Func:tlsio_openssl_open Line:1258 Failed opening the underlying I/O.
Error: Time:Tue Jun 4 19:53:21 2019 File:/usr/sdk/src/c/umqtt/src/mqtt_client.c Func:mqtt_client_connect Line:1000 Error: io_open failed
Error: Time:Tue Jun 4 19:53:21 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:SendMqttConnectMsg Line:2122 failure connecting to address qcs605-32.