IoT Edge系统和自定义模块的运行时状态失败

时间:2019-06-04 22:23:02

标签: android azure docker azure-iot-edge

this guide之后,我正在使用Azure设置Vision AI DevKit。该指南实际上只是让我输入一些wifi凭据,并在Azure中的边缘设备的设置门户中输入了连接字符串。我已经使用移动热点实现wifi来完整地完成了该指南,但是注意到从该地址rtsp://<IP address>:8900/live连接到摄像机上实时RTSP视频流的下一步,我需要部署一个自定义模块我的设备。

因此,我正在按照此custom module指南进行操作,并且在Azure门户中,我确认设备上均报告了边缘系统模块和边缘自定义模块,但是我现在遇到了一些困难调试edgeHubVisionSample的运行时错误。

enter image description here

下面,我使用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.

0 个答案:

没有答案