Skip to content
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

Modules all restarted automatically, causing modules to no longer communicate. #65

Closed
Hammatt opened this issue Jul 24, 2018 · 19 comments
Closed

Comments

@Hammatt
Copy link

Hammatt commented Jul 24, 2018

Expected Behavior

I would expect that modules should be able to stay up indefinitely, with no intervention, and be-self healing in that they should properly be able to stand back up if they stop for some reason.

Current Behavior

Last night, all running modules on a test device (including edgeAgent and edgeHub module) restarted at the same time for some reason which is unclear to me. Since restarting, the modules have stopped sending messages to eachother over the local edge infrastructure using ModuleClient.SendEventAsync.

Steps to Reproduce

I wish I knew. Our modules had been all running for 7 days, mostly under heavy load / soak testing.

Context (Environment)

two basic modules, a "server module" and a "cloud upload module", the server module accepts a proprietary type of connection (layer over TCP) and then saves a file which is streamed to it. this module then sends a message to the cloud upload module telling it the location of the file that it has saved (on a shared volume) and the file is then uploaded to the cloud for processing. This has been working well and this is the first time I've seen an issue like this after running this setup for a number of months (albeit normally restarting the devices more frequently than this!)

Device (Host) Operating System

Ubuntu 18.04 Server.

Architecture

amd64

Container Operating System

Linux containers

Runtime Versions

iotedged

iotedge 1.0.0 (52ef77d)

Edge Agent

1.0.0.14487025 (52ef77d)

Edge Hub

1.0.0.14487025 (52ef77d)

Docker

Client:
 Version:           18.06.0-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        0ffa825
 Built:             Wed Jul 18 19:09:54 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.0-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       0ffa825
  Built:            Wed Jul 18 19:07:56 2018
  OS/Arch:          linux/amd64
  Experimental:     false

Logs

I believe that the thing that caused the modules to restart may have been the daemon. here are the logs of that for the time period:

Jul 23 22:55:54 gigabyte iotedged[1122]: 2018-07-23T22:55:54Z [INFO] - Checking edge runtime status
Jul 23 22:55:54 gigabyte iotedged[1122]: 2018-07-23T22:55:54Z [INFO] - Edge runtime is running.
Jul 23 22:56:03 gigabyte iotedged[1122]: 2018-07-23T22:56:03Z [INFO] - [mgmt] - - - [2018-07-23 22:56:03.880145623 UTC] "POST /modules/edgeHub/stop?api-version=2018-06-28 HTTP/1.1" 204 No Content - "-" "-" pid(1726)
Jul 23 22:56:03 gigabyte iotedged[1122]: 2018-07-23T22:56:03Z [ERR!] - server connection error: (unknown) Broken pipe (os error 32)
Jul 23 22:56:54 gigabyte iotedged[1122]: 2018-07-23T22:56:54Z [INFO] - Checking edge runtime status
Jul 23 22:56:54 gigabyte iotedged[1122]: 2018-07-23T22:56:54Z [INFO] - Edge runtime status is failed, starting module now...
Jul 23 22:56:56 gigabyte iotedged[1122]: 2018-07-23T22:56:56Z [INFO] - [mgmt] - - - [2018-07-23 22:56:56.121918573 UTC] "GET /systeminfo?api-version=2018-06-28 HTTP/1.1" 200 OK 42 "-" "-" pid(7500)
Jul 23 22:56:56 gigabyte iotedged[1122]: 2018-07-23T22:56:56Z [INFO] - [work] - - - [2018-07-23 22:56:56.245839355 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/decrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2024 "-" "-" pid(7500)
Jul 23 22:56:56 gigabyte iotedged[1122]: 2018-07-23T22:56:56Z [INFO] - [mgmt] - - - [2018-07-23 22:56:56.404117051 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 2127 "-" "-" pid(7500)
Jul 23 22:56:57 gigabyte iotedged[1122]: 2018-07-23T22:56:57Z [INFO] - [work] - - - [2018-07-23 22:56:57.050943285 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/sign?api-version=2018-06-28 HTTP/1.1" 200 OK 57 "-" "-" pid(7500)
Jul 23 22:56:58 gigabyte iotedged[1122]: 2018-07-23T22:56:58Z [INFO] - [work] - - - [2018-07-23 22:56:58.461708900 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(7500)
Jul 23 22:56:58 gigabyte iotedged[1122]: 2018-07-23T22:56:58Z [WARN] - Container already in this state
Jul 23 22:56:58 gigabyte iotedged[1122]: 2018-07-23T22:56:58Z [INFO] - [mgmt] - - - [2018-07-23 22:56:58.605138993 UTC] "POST /modules/edgeHub/stop?api-version=2018-06-28 HTTP/1.1" 304 Not Modified - "-" "-" pid(7500)
Jul 23 22:56:59 gigabyte iotedged[1122]: 2018-07-23T22:56:59Z [INFO] - [mgmt] - - - [2018-07-23 22:56:59.304726148 UTC] "POST /modules/edgeHub/start?api-version=2018-06-28 HTTP/1.1" 204 No Content - "-" "-" pid(7500)
Jul 23 22:56:59 gigabyte iotedged[1122]: 2018-07-23T22:56:59Z [WARN] - Container already in this state
Jul 23 22:56:59 gigabyte iotedged[1122]: 2018-07-23T22:56:59Z [INFO] - [mgmt] - - - [2018-07-23 22:56:59.313659890 UTC] "POST /modules/dicomscpmodule/stop?api-version=2018-06-28 HTTP/1.1" 304 Not Modified - "-" "-" pid(7500)
Jul 23 22:56:59 gigabyte iotedged[1122]: 2018-07-23T22:56:59Z [INFO] - [work] - - - [2018-07-23 22:56:59.739710487 UTC] "POST /modules/%24edgeHub/genid/{obfuscated}/certificate/server?api-version=2018-06-28 HTTP/1.1" 201 Created 8497 "-" "-" pid(7711)
Jul 23 22:56:59 gigabyte iotedged[1122]: 2018-07-23T22:56:59Z [INFO] - [mgmt] - - - [2018-07-23 22:56:59.973137735 UTC] "POST /modules/dicomscpmodule/start?api-version=2018-06-28 HTTP/1.1" 204 No Content - "-" "-" pid(7500)
Jul 23 22:56:59 gigabyte iotedged[1122]: 2018-07-23T22:56:59Z [WARN] - Container already in this state
Jul 23 22:56:59 gigabyte iotedged[1122]: 2018-07-23T22:56:59Z [INFO] - [mgmt] - - - [2018-07-23 22:56:59.974284432 UTC] "POST /modules/clouduploadmodule/stop?api-version=2018-06-28 HTTP/1.1" 304 Not Modified - "-" "-" pid(7500)
Jul 23 22:57:00 gigabyte iotedged[1122]: 2018-07-23T22:57:00Z [INFO] - [work] - - - [2018-07-23 22:57:00.113127732 UTC] "GET /trust-bundle?api-version=2018-06-28 HTTP/1.1" 200 OK 1774 "-" "-" pid(7857)
Jul 23 22:57:00 gigabyte iotedged[1122]: 2018-07-23T22:57:00Z [INFO] - [mgmt] - - - [2018-07-23 22:57:00.771513074 UTC] "POST /modules/clouduploadmodule/start?api-version=2018-06-28 HTTP/1.1" 204 No Content - "-" "-" pid(7500)
Jul 23 22:57:00 gigabyte iotedged[1122]: 2018-07-23T22:57:00Z [INFO] - [work] - - - [2018-07-23 22:57:00.778437784 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(7500)
Jul 23 22:57:00 gigabyte iotedged[1122]: 2018-07-23T22:57:00Z [INFO] - [work] - - - [2018-07-23 22:57:00.885624442 UTC] "GET /trust-bundle?api-version=2018-06-28 HTTP/1.1" 200 OK 1774 "-" "-" pid(7991)
Jul 23 22:57:02 gigabyte iotedged[1122]: 2018-07-23T22:57:02Z [INFO] - [work] - - - [2018-07-23 22:57:02.755945218 UTC] "POST /modules/%24edgeHub/genid/{obfuscated}/sign?api-version=2018-06-28 HTTP/1.1" 200 OK 57 "-" "-" pid(7711)
Jul 23 22:57:06 gigabyte iotedged[1122]: 2018-07-23T22:57:06Z [INFO] - [mgmt] - - - [2018-07-23 22:57:06.143968869 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 2129 "-" "-" pid(7500)
Jul 23 22:57:06 gigabyte iotedged[1122]: 2018-07-23T22:57:06Z [INFO] - [work] - - - [2018-07-23 22:57:06.144498424 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(7500)
Jul 23 22:57:07 gigabyte iotedged[1122]: 2018-07-23T22:57:07Z [INFO] - [work] - - - [2018-07-23 22:57:07.049742588 UTC] "POST /modules/clouduploadmodule/genid/{obfuscated}/sign?api-version=2018-06-28 HTTP/1.1" 200 OK 57 "-" "-" pid(7991)
Jul 23 22:57:09 gigabyte iotedged[1122]: 2018-07-23T22:57:09Z [INFO] - [work] - - - [2018-07-23 22:57:09.918683570 UTC] "POST /modules/dicomscpmodule/genid/{obfuscated}/sign?api-version=2018-06-28 HTTP/1.1" 200 OK 57 "-" "-" pid(7857)
Jul 23 22:57:11 gigabyte iotedged[1122]: 2018-07-23T22:57:11Z [INFO] - [mgmt] - - - [2018-07-23 22:57:11.478415066 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 2129 "-" "-" pid(7500)

(I've taken out the genid because its being used to encrypt/decrypt/sign so I thought it might be counted as a secret, but let me know if it is actually needed to debug this).

We can see the stop requests coming through to the modules:
edgeAgent:

2018-07-23 22:55:53.214 +00:00 [INF] - Termination requested, initiating shutdown.
2018-07-23 22:55:53.215 +00:00 [INF] - Main thread terminated
2018-07-23 22:55:53.220 +00:00 [INF] - Initiating shutdown cleanup.
2018-07-23 22:55:53.223 +00:00 [INF] - Stopping all modules...
2018-07-23 22:55:53.225 +00:00 [INF] - Waiting for cleanup to finish
2018-07-23 22:55:53.231 +00:00 [INF] - Plan execution started for deployment -1
2018-07-23 22:55:53.231 +00:00 [INF] - Executing command: "Stop module clouduploadmodule"
2018-07-23 22:55:53.783 +00:00 [INF] - Executing command: "Stop module edgeHub"
[2018-07-23 22:56:55 : Starting Edge Agent
[07/23/2018 10:56:55.116 PM] Edge Agent Main()
2018-07-23 22:56:55.290 +00:00 [INF] - Starting module management agent.
2018-07-23 22:56:55.442 +00:00 [INF] - Version - 1.0.0.14487025 (52ef77db24126bf473265fc09c53d35290a2dd6b)
2018-07-23 22:56:55.443 +00:00 [INF] -
        █████╗ ███████╗██╗   ██╗██████╗ ███████╗
       ██╔══██╗╚══███╔╝██║   ██║██╔══██╗██╔════╝
       ███████║  ███╔╝ ██║   ██║██████╔╝█████╗
       ██╔══██║ ███╔╝  ██║   ██║██╔══██╗██╔══╝
       ██║  ██║███████╗╚██████╔╝██║  ██║███████╗
       ╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝

 ██╗ ██████╗ ████████╗    ███████╗██████╗  ██████╗ ███████╗
 ██║██╔═══██╗╚══██╔══╝    ██╔════╝██╔══██╗██╔════╝ ██╔════╝
 ██║██║   ██║   ██║       █████╗  ██║  ██║██║  ███╗█████╗
 ██║██║   ██║   ██║       ██╔══╝  ██║  ██║██║   ██║██╔══╝
 ██║╚██████╔╝   ██║       ███████╗██████╔╝╚██████╔╝███████╗
 ╚═╝ ╚═════╝    ╚═╝       ╚══════╝╚═════╝  ╚═════╝ ╚══════╝

2018-07-23 22:56:55.573 +00:00 [INF] - Edge agent attempting to connect to IoT Hub via AMQP...
2018-07-23 22:56:56.045 +00:00 [INF] - Created persistent store at /tmp/edgeAgent
2018-07-23 22:56:57.823 +00:00 [INF] - Edge agent connected to IoT Hub via AMQP.
2018-07-23 22:56:58.577 +00:00 [INF] - Plan execution started for deployment 13
2018-07-23 22:56:58.585 +00:00 [INF] - Executing command: "Command Group: (
  [Stop module edgeHub]
  [Start module edgeHub]
  [Saving edgeHub to store]
)"
2018-07-23 22:56:58.587 +00:00 [INF] - Executing command: "Stop module edgeHub"
2018-07-23 22:56:58.616 +00:00 [INF] - Executing command: "Start module edgeHub"
2018-07-23 22:56:59.307 +00:00 [INF] - Executing command: "Saving edgeHub to store"
2018-07-23 22:56:59.312 +00:00 [INF] - Executing command: "Command Group: (
  [Stop module servermodule]
  [Start module servermodule]
  [Saving servermodule to store]
)"
2018-07-23 22:56:59.312 +00:00 [INF] - Executing command: "Stop module servermodule"
2018-07-23 22:56:59.314 +00:00 [INF] - Executing command: "Start module servermodule"
2018-07-23 22:56:59.973 +00:00 [INF] - Executing command: "Saving servermodule to store"
2018-07-23 22:56:59.973 +00:00 [INF] - Executing command: "Command Group: (
  [Stop module clouduploadmodule]
  [Start module clouduploadmodule]
  [Saving clouduploadmodule to store]
)"
2018-07-23 22:56:59.973 +00:00 [INF] - Executing command: "Stop module clouduploadmodule"
2018-07-23 22:56:59.974 +00:00 [INF] - Executing command: "Start module clouduploadmodule"
2018-07-23 22:57:00.771 +00:00 [INF] - Executing command: "Saving clouduploadmodule to store"
2018-07-23 22:57:00.772 +00:00 [INF] - Plan execution ended for deployment 13
2018-07-23 22:57:01.139 +00:00 [INF] - Updated reported properties
2018-07-23 22:57:06.470 +00:00 [INF] - Updated reported properties
2018-07-23 23:05:58.023 +00:00 [INF] - HealthRestartPlanner is clearing restart stats for module 'servermodule' as it has been running healthy for 00:10:00.
2018-07-23 23:05:58.023 +00:00 [INF] - HealthRestartPlanner is clearing restart stats for module 'clouduploadmodule' as it has been running healthy for 00:10:00.
2018-07-23 23:05:58.023 +00:00 [INF] - Plan execution started for deployment 13
2018-07-23 23:05:58.024 +00:00 [INF] - Executing command: "Saving servermodule to store"
2018-07-23 23:05:58.025 +00:00 [INF] - Executing command: "Saving clouduploadmodule to store"
2018-07-23 23:05:58.025 +00:00 [INF] - Plan execution ended for deployment 13
2018-07-23 23:06:03.347 +00:00 [INF] - Updated reported properties
2018-07-23 23:06:08.374 +00:00 [INF] - HealthRestartPlanner is clearing restart stats for module 'edgeHub' as it has been running healthy for 00:10:00.
2018-07-23 23:06:08.374 +00:00 [INF] - Plan execution started for deployment 13
2018-07-23 23:06:08.374 +00:00 [INF] - Executing command: "Saving edgeHub to store"
2018-07-23 23:06:08.374 +00:00 [INF] - Plan execution ended for deployment 13
2018-07-23 23:06:13.674 +00:00 [INF] - Updated reported properties

edgeHub:

2018-07-23 22:55:53.214 +00:00 [INF] - Termination requested, initiating shutdown.
2018-07-23 22:55:53.216 +00:00 [INF] - Closing protocol heads - (HTTP, MQTT, AMQP)
2018-07-23 22:55:53.219 +00:00 [INF] - Closing HTTP head
2018-07-23 22:55:53.241 +00:00 [INF] - Stopping
2018-07-23 22:55:53.247 +00:00 [INF] - Closed HTTP head
2018-07-23 22:55:53.252 +00:00 [INF] - Waiting for cleanup to finish
2018-07-23 22:55:53.298 +00:00 [INF] - Closing link Events for DevDevice/clouduploadmodule
2018-07-23 22:55:53.299 +00:00 [INF] - Closing link TwinReceiving for DevDevice/clouduploadmodule
2018-07-23 22:55:53.299 +00:00 [INF] - Closing link TwinSending for DevDevice/clouduploadmodule
2018-07-23 22:55:53.299 +00:00 [INF] - Closing link ModuleMessages for DevDevice/clouduploadmodule
2018-07-23 22:55:53.317 +00:00 [INF] - Closing link Events for DevDevice/servermodule
2018-07-23 22:55:53.317 +00:00 [INF] - Closing link TwinReceiving for DevDevice/servermodule
2018-07-23 22:55:53.317 +00:00 [INF] - Closing link TwinSending for DevDevice/servermodule
[2018-07-23 22:56:59 : Starting Edge Hub
[07/23/2018 10:56:59.357 PM] Edge Hub Main()
2018-07-23 22:57:00.462 +00:00 [INF] - Starting Edge Hub
2018-07-23 22:57:00.473 +00:00 [INF] - Version - 1.0.0.14487025 (52ef77db24126bf473265fc09c53d35290a2dd6b)
2018-07-23 22:57:00.474 +00:00 [INF] -
        █████╗ ███████╗██╗   ██╗██████╗ ███████╗
       ██╔══██╗╚══███╔╝██║   ██║██╔══██╗██╔════╝
       ███████║  ███╔╝ ██║   ██║██████╔╝█████╗
       ██╔══██║ ███╔╝  ██║   ██║██╔══██╗██╔══╝
       ██║  ██║███████╗╚██████╔╝██║  ██║███████╗
       ╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝

 ██╗ ██████╗ ████████╗    ███████╗██████╗  ██████╗ ███████╗
 ██║██╔═══██╗╚══██╔══╝    ██╔════╝██╔══██╗██╔════╝ ██╔════╝
 ██║██║   ██║   ██║       █████╗  ██║  ██║██║  ███╗█████╗
 ██║██║   ██║   ██║       ██╔══╝  ██║  ██║██║   ██║██╔══╝
 ██║╚██████╔╝   ██║       ███████╗██████╔╝╚██████╔╝███████╗
 ╚═╝ ╚═════╝    ╚═╝       ╚══════╝╚═════╝  ╚═════╝ ╚══════╝

2018-07-23 22:57:00.474 +00:00 [INF] - Installing intermediate certificates.
2018-07-23 22:57:00.556 +00:00 [INF] - Attempting to connect to IoT Hub for client DevDevice/$edgeHub via AMQP...
2018-07-23 22:57:00.607 +00:00 [INF] - Connected to IoT Hub for client DevDevice/$edgeHub via AMQP, with client operation timeout 60000.
2018-07-23 22:57:00.614 +00:00 [INF] - Created cloud connection for client DevDevice/$edgeHub
2018-07-23 22:57:00.615 +00:00 [INF] - New cloud connection created for device DevDevice/$edgeHub
2018-07-23 22:57:00.620 +00:00 [INF] - Initializing configuration
2018-07-23 22:57:00.984 +00:00 [INF] - Created persistent store at /tmp/edgeHub
2018-07-23 22:57:01.002 +00:00 [INF] - Created new message store
2018-07-23 22:57:01.003 +00:00 [INF] - Started task to cleanup processed and stale messages
2018-07-23 22:57:01.049 +00:00 [INF] - New device connection for device DevDevice/$edgeHub
2018-07-23 22:57:03.955 +00:00 [INF] - Entering connected state
2018-07-23 22:57:06.052 +00:00 [INF] - Obtained edge hub config from module twin
2018-07-23 22:57:06.142 +00:00 [INF] - Set the following 1 route(s) in edge hub
2018-07-23 22:57:06.144 +00:00 [INF] - scptouploader: FROM /messages/modules/servermodule/outputs/FileAvailableToUpload INTO BrokeredEndpoint("/modules/clouduploadmodule/inputs/FileAvailableToUpload")
2018-07-23 22:57:06.145 +00:00 [INF] - Updated message store TTL to 7200 seconds
2018-07-23 22:57:06.146 +00:00 [INF] - Updated the edge hub store and forward configuration
2018-07-23 22:57:06.146 +00:00 [INF] - Initialized edge hub configuration
2018-07-23 22:57:06.223 +00:00 [INF] - Starting protocol heads - (HTTP, MQTT, AMQP)
2018-07-23 22:57:06.225 +00:00 [INF] - Starting HTTP head
2018-07-23 22:57:06.297 +00:00 [INF] - User profile is available. Using '"/home/edgehubuser/.aspnet/DataProtection-Keys"' as key repository; keys will not be encrypted at rest.
2018-07-23 22:57:06.556 +00:00 [WRN] - Overriding address(es) '"http://+:80"'. Binding to endpoints defined in "UseKestrel()" instead.
2018-07-23 22:57:06.577 +00:00 [INF] - Started HTTP head
2018-07-23 22:57:06.581 +00:00 [INF] - Starting MQTT head
2018-07-23 22:57:06.622 +00:00 [INF] - Initializing TLS endpoint on port 8883 for MQTT head.
2018-07-23 22:57:06.667 +00:00 [INF] - Starting AMQP head
2018-07-23 22:57:06.674 +00:00 [INF] - Started MQTT head
2018-07-23 22:57:06.754 +00:00 [INF] - Started AMQP head
2018-07-23 22:57:07.210 +00:00 [INF] - Attempting to connect to IoT Hub for client DevDevice/clouduploadmodule via AMQP...
2018-07-23 22:57:07.212 +00:00 [INF] - Connected to IoT Hub for client DevDevice/clouduploadmodule via AMQP, with client operation timeout 60000.
2018-07-23 22:57:07.212 +00:00 [INF] - Created cloud connection for client DevDevice/clouduploadmodule
2018-07-23 22:57:07.212 +00:00 [INF] - New cloud connection created for device DevDevice/clouduploadmodule
2018-07-23 22:57:07.221 +00:00 [INF] - New token requested by client DevDevice/clouduploadmodule, but using existing token as it is usable.
2018-07-23 22:57:07.307 +00:00 [INF] - New device connection for device DevDevice/clouduploadmodule
2018-07-23 22:57:07.314 +00:00 [INF] - Bind device proxy for device DevDevice/clouduploadmodule
2018-07-23 22:57:07.315 +00:00 [INF] - Initialized AMQP connection handler for DevDevice/clouduploadmodule
2018-07-23 22:57:07.324 +00:00 [INF] - Opened link Events for DevDevice/clouduploadmodule
2018-07-23 22:57:07.483 +00:00 [INF] - Opened link TwinReceiving for DevDevice/clouduploadmodule
2018-07-23 22:57:07.516 +00:00 [INF] - Opened link TwinSending for DevDevice/clouduploadmodule
2018-07-23 22:57:07.547 +00:00 [INF] - Opened link ModuleMessages for DevDevice/clouduploadmodule
2018-07-23 22:57:10.038 +00:00 [INF] - Attempting to connect to IoT Hub for client DevDevice/servermodule via AMQP...
2018-07-23 22:57:10.038 +00:00 [INF] - Connected to IoT Hub for client DevDevice/servermodule via AMQP, with client operation timeout 60000.
2018-07-23 22:57:10.038 +00:00 [INF] - Created cloud connection for client DevDevice/servermodule
2018-07-23 22:57:10.038 +00:00 [INF] - New cloud connection created for device DevDevice/servermodule
2018-07-23 22:57:10.044 +00:00 [INF] - New token requested by client DevDevice/servermodule, but using existing token as it is usable.
2018-07-23 22:57:10.405 +00:00 [INF] - New device connection for device DevDevice/servermodule
2018-07-23 22:57:10.405 +00:00 [INF] - Bind device proxy for device DevDevice/servermodule
2018-07-23 22:57:10.405 +00:00 [INF] - Initialized AMQP connection handler for DevDevice/servermodule
2018-07-23 22:57:10.405 +00:00 [INF] - Opened link Events for DevDevice/servermodule
2018-07-23 22:57:10.434 +00:00 [INF] - Opened link TwinReceiving for DevDevice/servermodule
2018-07-23 22:57:10.801 +00:00 [INF] - Opened link TwinSending for DevDevice/servermodule
2018-07-23 23:27:01.010 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload
2018-07-23 23:27:01.017 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload and 0 messages from message store.
2018-07-23 23:55:07.001 +00:00 [INF] - Existing token not found for DevDevice/clouduploadmodule. Getting new token from the client...
2018-07-23 23:55:07.014 +00:00 [INF] - Obtained new token for client DevDevice/clouduploadmodule that expires in 00:01:59.9855629
2018-07-23 23:55:09.997 +00:00 [INF] - Existing token not found for DevDevice/servermodule. Getting new token from the client...
2018-07-23 23:55:09.997 +00:00 [INF] - Obtained new token for client DevDevice/servermodule that expires in 00:02:00.0021347
2018-07-23 23:56:58.045 +00:00 [INF] - Existing token not found for DevDevice/clouduploadmodule. Getting new token from the client...
2018-07-23 23:56:58.045 +00:00 [INF] - Obtained new token for client DevDevice/clouduploadmodule that expires in 00:58:08.9545903
2018-07-23 23:57:01.047 +00:00 [INF] - Existing token not found for DevDevice/servermodule. Getting new token from the client...
2018-07-23 23:57:01.048 +00:00 [INF] - Obtained new token for client DevDevice/servermodule that expires in 00:58:08.9518749
2018-07-23 23:57:31.015 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload
2018-07-23 23:57:31.015 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload and 0 messages from message store.
2018-07-24 00:28:01.015 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload

And one of the modules:

23-07-2018 22:55:53.21 Verbose:  Module cancellation requested.
23-07-2018 22:55:53.21 Verbose:  Cancelling module main task...
23-07-2018 22:55:53.21 Verbose:  ...stopping check queued image task.
23-07-2018 22:55:53.21 Information:  Gateway Module Stopped event logged. gatewayId: DevDevice.   module: clouduploadmodule.
23-07-2018 22:57:00.81 Verbose:  Starting init...
23-07-2018 22:57:07.33 Verbose:  ...IoT Hub module client initialized
23-07-2018 22:57:07.42 Verbose:  ...dicom private dictionary initialized
23-07-2018 22:57:07.52 Verbose:  ...desired property update callback initialized
23-07-2018 22:57:07.55 Verbose:  ...edge local message handler initialized

Additional Information

All of the modules started back up, but none of them seem to be communicating to eachother. the servermodule is still receiving connections from the outside (from TCP connections coming in from outside the host system), and thinks that it is sending messages accross the edge infrastructure, but they're never showing up in the other module.

also of note:

  • both modules are still responding to twin updates from the portal, but still do not communicate with eachother.
  • all modules are communicating over amqp

There are two separate issues here in my eyes,

  1. the modules all restarted for some unknown (to me) reason
  2. the modules started back up and reported as "healthy" but are not actually communicating with eachother, meaning that it's not really working at all.

I will try to leave this device in a broken state for some time in case there are any other logs that we might need.

@Hammatt
Copy link
Author

Hammatt commented Jul 24, 2018

Some additional info:
seems as though the other dev device which was running at the time had the same thing happen! all modules decided to restart at the same time and aren't sending messages to eachother now!

@dsajanice
Copy link
Member

@varunpuranik Could you please take a look?

@Hammatt do you have iotedged logs from before timestamp 22:55:53

@Hammatt
Copy link
Author

Hammatt commented Jul 24, 2018

@dsajanice I sure do, here you go:

Jul 23 22:54:23 gigabyte iotedged[1122]: 2018-07-23T22:54:23Z [INFO] - [mgmt] - - - [2018-07-23 22:54:23.322103976 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:54:23 gigabyte iotedged[1122]: 2018-07-23T22:54:23Z [INFO] - [work] - - - [2018-07-23 22:54:23.322257190 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:54:28 gigabyte iotedged[1122]: 2018-07-23T22:54:28Z [INFO] - [mgmt] - - - [2018-07-23 22:54:28.335378939 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:54:28 gigabyte iotedged[1122]: 2018-07-23T22:54:28Z [INFO] - [work] - - - [2018-07-23 22:54:28.335592741 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:54:33 gigabyte iotedged[1122]: 2018-07-23T22:54:33Z [INFO] - [mgmt] - - - [2018-07-23 22:54:33.350419123 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:54:33 gigabyte iotedged[1122]: 2018-07-23T22:54:33Z [INFO] - [work] - - - [2018-07-23 22:54:33.350565880 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:54:38 gigabyte iotedged[1122]: 2018-07-23T22:54:38Z [INFO] - [mgmt] - - - [2018-07-23 22:54:38.369453299 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:54:38 gigabyte iotedged[1122]: 2018-07-23T22:54:38Z [INFO] - [work] - - - [2018-07-23 22:54:38.369607267 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:54:43 gigabyte iotedged[1122]: 2018-07-23T22:54:43Z [INFO] - [mgmt] - - - [2018-07-23 22:54:43.386767951 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:54:43 gigabyte iotedged[1122]: 2018-07-23T22:54:43Z [INFO] - [work] - - - [2018-07-23 22:54:43.387339490 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:54:48 gigabyte iotedged[1122]: 2018-07-23T22:54:48Z [INFO] - [mgmt] - - - [2018-07-23 22:54:48.404906717 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:54:48 gigabyte iotedged[1122]: 2018-07-23T22:54:48Z [INFO] - [work] - - - [2018-07-23 22:54:48.405093854 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:54:53 gigabyte iotedged[1122]: 2018-07-23T22:54:53Z [INFO] - [mgmt] - - - [2018-07-23 22:54:53.421040903 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:54:53 gigabyte iotedged[1122]: 2018-07-23T22:54:53Z [INFO] - [work] - - - [2018-07-23 22:54:53.421220426 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:54:54 gigabyte iotedged[1122]: 2018-07-23T22:54:54Z [INFO] - Checking edge runtime status
Jul 23 22:54:54 gigabyte iotedged[1122]: 2018-07-23T22:54:54Z [INFO] - Edge runtime is running.
Jul 23 22:54:58 gigabyte iotedged[1122]: 2018-07-23T22:54:58Z [INFO] - [mgmt] - - - [2018-07-23 22:54:58.447603132 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:54:58 gigabyte iotedged[1122]: 2018-07-23T22:54:58Z [INFO] - [work] - - - [2018-07-23 22:54:58.447744494 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:03 gigabyte iotedged[1122]: 2018-07-23T22:55:03Z [INFO] - [mgmt] - - - [2018-07-23 22:55:03.461239077 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:03 gigabyte iotedged[1122]: 2018-07-23T22:55:03Z [INFO] - [work] - - - [2018-07-23 22:55:03.461740690 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:08 gigabyte iotedged[1122]: 2018-07-23T22:55:08Z [INFO] - [mgmt] - - - [2018-07-23 22:55:08.494047740 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:08 gigabyte iotedged[1122]: 2018-07-23T22:55:08Z [INFO] - [work] - - - [2018-07-23 22:55:08.494186104 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:13 gigabyte iotedged[1122]: 2018-07-23T22:55:13Z [INFO] - [mgmt] - - - [2018-07-23 22:55:13.511839958 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:13 gigabyte iotedged[1122]: 2018-07-23T22:55:13Z [INFO] - [work] - - - [2018-07-23 22:55:13.512246371 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:18 gigabyte iotedged[1122]: 2018-07-23T22:55:18Z [INFO] - [work] - - - [2018-07-23 22:55:18.544933952 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:18 gigabyte iotedged[1122]: 2018-07-23T22:55:18Z [INFO] - [mgmt] - - - [2018-07-23 22:55:18.545053220 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:23 gigabyte iotedged[1122]: 2018-07-23T22:55:23Z [INFO] - [mgmt] - - - [2018-07-23 22:55:23.564705472 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:23 gigabyte iotedged[1122]: 2018-07-23T22:55:23Z [INFO] - [work] - - - [2018-07-23 22:55:23.565079489 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:28 gigabyte iotedged[1122]: 2018-07-23T22:55:28Z [INFO] - [mgmt] - - - [2018-07-23 22:55:28.583788632 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:28 gigabyte iotedged[1122]: 2018-07-23T22:55:28Z [INFO] - [work] - - - [2018-07-23 22:55:28.583890685 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:33 gigabyte iotedged[1122]: 2018-07-23T22:55:33Z [INFO] - [mgmt] - - - [2018-07-23 22:55:33.598899943 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:33 gigabyte iotedged[1122]: 2018-07-23T22:55:33Z [INFO] - [work] - - - [2018-07-23 22:55:33.599087034 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:38 gigabyte iotedged[1122]: 2018-07-23T22:55:38Z [INFO] - [mgmt] - - - [2018-07-23 22:55:38.628944433 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:38 gigabyte iotedged[1122]: 2018-07-23T22:55:38Z [INFO] - [work] - - - [2018-07-23 22:55:38.629098577 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:43 gigabyte iotedged[1122]: 2018-07-23T22:55:43Z [INFO] - [mgmt] - - - [2018-07-23 22:55:43.664057459 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:43 gigabyte iotedged[1122]: 2018-07-23T22:55:43Z [INFO] - [work] - - - [2018-07-23 22:55:43.664520631 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:48 gigabyte iotedged[1122]: 2018-07-23T22:55:48Z [INFO] - [mgmt] - - - [2018-07-23 22:55:48.686522661 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:48 gigabyte iotedged[1122]: 2018-07-23T22:55:48Z [INFO] - [work] - - - [2018-07-23 22:55:48.686673535 UTC] "POST /modules/%24edgeAgent/genid/{obfuscated}/encrypt?api-version=2018-06-28 HTTP/1.1" 200 OK 2049 "-" "-" pid(1726)
Jul 23 22:55:53 gigabyte iotedged[1122]: 2018-07-23T22:55:53Z [INFO] - [mgmt] - - - [2018-07-23 22:55:53.227133295 UTC] "GET /modules?api-version=2018-06-28 HTTP/1.1" 200 OK 1967 "-" "-" pid(1726)
Jul 23 22:55:53 gigabyte iotedged[1122]: 2018-07-23T22:55:53Z [INFO] - [mgmt] - - - [2018-07-23 22:55:53.783264279 UTC] "POST /modules/clouduploadmodule/stop?api-version=2018-06-28 HTTP/1.1" 204 No Content - "-" "-" pid(1726)
Jul 23 22:55:54 gigabyte iotedged[1122]: 2018-07-23T22:55:54Z [INFO] - Checking edge runtime status
Jul 23 22:55:54 gigabyte iotedged[1122]: 2018-07-23T22:55:54Z [INFO] - Edge runtime is running.
Jul 23 22:56:03 gigabyte iotedged[1122]: 2018-07-23T22:56:03Z [INFO] - [mgmt] - - - [2018-07-23 22:56:03.880145623 UTC] "POST /modules/edgeHub/stop?api-version=2018-06-28 HTTP/1.1" 204 No Content - "-" "-" pid(1726)
Jul 23 22:56:03 gigabyte iotedged[1122]: 2018-07-23T22:56:03Z [ERR!] - server connection error: (unknown) Broken pipe (os error 32)

I've got logs for days and days before this, lots of it seems to be the same though so I've just included a snippet close to the event here. let me know if you need more.

@Hammatt
Copy link
Author

Hammatt commented Jul 24, 2018

Quick note too. I haven't started to implement #60 yet so it's not related to that issue.

@varunpuranik
Copy link
Contributor

Hi @Hammatt,
From the logs it seems like the EdgeAgent was shut down (sent a SIGTERM) and shutdown the other modules and then itself gracefully. It is not yet clear to me why.. and we haven't seen this behavior before.

I tried to repro your scenario, and i am not able to reproduce it - the modules start and are able to send messages successfully. Since you seem were able to repro it on a couple of boxes, can you try to set the log level to debug. Maybe that will tell us more. You can set the environment variable RuntimeLogLevel to debug on the edgeAgent module to enable debug logs (for both EdgeAgent and EdgeHub).

Also, are you only seeing this when the system restarts after several days? What happens if you restart the system manually by doing a $>sudo systemctl restart iotedge? Are the modules able to come up and start send messages successfully?

@Hammatt
Copy link
Author

Hammatt commented Jul 25, 2018

Hi @varunpuranik,

It's not so much that I can reproduce it on multiple devices, but more that it just randomly happened! I don't think that I would be able to easily make this happen again.

This is the only time I've seen this issue. one machine was up for 7 days and the other was up for 6 days, both had all of their modules randomly restart without me doing anything at the exact same time and when they came back up, the modules would not talk to eachother.

I have restarted one of the machines and all of the modules start up as expected and can message eachother, but in prod we're not really going to have access to these to restart them ourselves like that, so it would be good to understand why.

@varunpuranik
Copy link
Contributor

Yes, I understand.

Okay, so another question - in that state (after restarting and when no messages were being passed), were your modules trying to send messages, and failing? From the logs of one of the modules that you shared, I can see that it initialized successfully, but it is not clear what happened after that. If they were getting any errors from the server, those might be useful. If they weren't even trying to send messages, we can look at why.

@Hammatt
Copy link
Author

Hammatt commented Jul 25, 2018

Logs of the server module sending some messages:

24-07-2018 20:32:57.23 Information: Edge Message Sent event logged. gatewayId: DevDevice. module: servermodule.
24-07-2018 20:32:57.23 Information: Edge Message Sent event logged. gatewayId: DevDevice. module: servermodule.

which means I know ioTHubModuleClient.SendEventAsync("FileAvailableToUpload", myMessage).Wait(); returned, and no exception was thrown.

The cloud upload module logs are very boring for this whole time period and just puts out heartbeats.

Here are the logs from the edgeHub from this time:

2018-07-24 20:48:01.154 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload
2018-07-24 20:48:01.172 +00:00 [INF] - Cleaned up 105 messages from queue for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload and 105 messages from message store.
2018-07-24 20:57:00.982 +00:00 [INF] - Starting compaction of stores
2018-07-24 20:57:00.982 +00:00 [INF] - Starting compaction of store DevDevice/clouduploadmodule/FileAvailableToUpload
2018-07-24 20:57:01.007 +00:00 [INF] - Starting compaction of store default
2018-07-24 20:57:01.021 +00:00 [INF] - Starting compaction of store twins
2018-07-24 20:57:01.043 +00:00 [INF] - Starting compaction of store checkpoints
2018-07-24 20:57:01.044 +00:00 [INF] - Starting compaction of store sessions
2018-07-24 20:57:01.044 +00:00 [INF] - Starting compaction of store messages

This seems to me like the module sending messages is managing to correctly send them, but the module receiving the messages is not receiving them. Any idea what might cause this to happen after a module restart when it usually would work perfectly? perhaps some kind of race condition with connecting to the edgeHub?

@dsajanice
Copy link
Member

What transport protocols are the sending and receiving modules using?

@Hammatt
Copy link
Author

Hammatt commented Jul 25, 2018

Both sending and receiving modules have the following transport settings:

private static ITransportSettings[] PreInitialize()
{
    // Cert verification is not yet fully functional when using Windows OS for the container
    bool myBypassCertVerification = true;// RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
    if (!myBypassCertVerification)
    {
        CertUtils.InstallCert();
    }

    var myAmqpSetting = new AmqpTransportSettings(TransportType.Amqp_Tcp_Only);
    // During dev you might want to bypass the cert verification. It is highly recommended to verify certs systematically in production
    if (myBypassCertVerification)
    {
        myAmqpSetting.RemoteCertificateValidationCallback =
            (inSender, inCertificate, inChain, inSslPolicyErrors) => true;
    }
    ITransportSettings[] mySettings = { myAmqpSetting };
    return mySettings;
}

where PreInitialize is usedlike this:

ITransportSettings[] mySettings = PreInitialize();
ModuleClient myModuleClient = await ModuleClient.CreateFromEnvironmentAsync(mySettings);

You might notice that they're always set to bypass certs, this is because the EdgeModuleCACertificateFile environment variable has gone missing since moving to GA and I haven't had time to look at it yet.

@varunpuranik
Copy link
Contributor

I believe with the information we have it is hard to say why the messages are not going through to the other modules. Can you try turning on debug logs? That might tell us something. However, note that the EdgeHub logs get quite large, so you might want to set docker to rotate the logs.

As for the EdgeModuleCACertificateFile, that is now completely handled by the SDK via the CreateFromEnvironmentAsync call. So if this is a module, you don't need to worry about checking for the cert and bypassing the cert validation, etc. (Note that the story is a bit different for downstream leaf devices connecting to EdgeHub in a Gateway scenario)

@Hammatt
Copy link
Author

Hammatt commented Jul 26, 2018

Hi @varunpuranik
I've managed to get the edgeHub onto debug logging but the edgeAgent doesn't seem to have taken the new environment variable.

[2018-07-26 02:11:53 : Starting Edge Hub
[07/26/2018 02:11:53.616 AM] Edge Hub Main()
2018-07-26 02:11:53.811 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Util.Edged.WorkloadClient] - Making a Http call to unix:///var/run/iotedge/workload.sock to CreateServerCertificateAsync
2018-07-26 02:11:53.978 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Util.Uds.HttpUdsMessageHandler] - Connecting socket /var/run/iotedge/workload.sock
2018-07-26 02:11:53.981 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Util.Uds.HttpUdsMessageHandler] - Connected socket /var/run/iotedge/workload.sock
2018-07-26 02:11:53.985 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Util.Uds.HttpUdsMessageHandler] - Sending request http://workload.sock/modules/%24edgeHub/genid/{obfuscated}/certificate/server?api-version=2018-06-28
2018-07-26 02:11:54.022 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Util.Uds.HttpUdsMessageHandler] - Response received Created
2018-07-26 02:11:54.078 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Util.Edged.WorkloadClient] - Received a valid Http response from unix:///var/run/iotedge/workload.sock for CreateServerCertificateAsync
2018-07-26 02:11:54.666 +00:00 [INF] [EdgeHub] - Starting Edge Hub
2018-07-26 02:11:54.667 +00:00 [INF] [EdgeHub] - Version - 1.0.0.14487025 (52ef77db24126bf473265fc09c53d35290a2dd6b)
2018-07-26 02:11:54.667 +00:00 [INF] [EdgeHub] -
        █████╗ ███████╗██╗   ██╗██████╗ ███████╗
       ██╔══██╗╚══███╔╝██║   ██║██╔══██╗██╔════╝
       ███████║  ███╔╝ ██║   ██║██████╔╝█████╗
       ██╔══██║ ███╔╝  ██║   ██║██╔══██╗██╔══╝
       ██║  ██║███████╗╚██████╔╝██║  ██║███████╗
       ╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝

 ██╗ ██████╗ ████████╗    ███████╗██████╗  ██████╗ ███████╗
 ██║██╔═══██╗╚══██╔══╝    ██╔════╝██╔══██╗██╔════╝ ██╔════╝
 ██║██║   ██║   ██║       █████╗  ██║  ██║██║  ███╗█████╗
 ██║██║   ██║   ██║       ██╔══╝  ██║  ██║██║   ██║██╔══╝
 ██║╚██████╔╝   ██║       ███████╗██████╔╝╚██████╔╝███████╗
 ╚═╝ ╚═════╝    ╚═╝       ╚══════╝╚═════╝  ╚═════╝ ╚══════╝

2018-07-26 02:11:54.667 +00:00 [INF] [EdgeHub] - Installing intermediate certificates.
2018-07-26 02:11:54.699 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - Created DeviceConnectivityManager with connected check frequency 00:05:00 and disconnected check frequency 00:02:00
2018-07-26 02:11:54.742 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Attempting to connect to IoT Hub for client DevDevice/$edgeHub via AMQP...
2018-07-26 02:11:54.790 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Connected to IoT Hub for client DevDevice/$edgeHub via AMQP, with client operation timeout 60000.
2018-07-26 02:11:54.796 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Updated cloud connection for client DevDevice/$edgeHub
2018-07-26 02:11:54.796 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Created cloud connection for client DevDevice/$edgeHub
2018-07-26 02:11:54.798 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - New cloud connection created for device DevDevice/$edgeHub
2018-07-26 02:11:54.803 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - CloudProxy to test device connectivity set
2018-07-26 02:11:54.803 +00:00 [INF] [EdgeHub] - Initializing configuration
2018-07-26 02:11:55.136 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Service.Modules.RoutingModule] - Created persistent store at /tmp/edgeHub
2018-07-26 02:11:55.155 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Created new message store
2018-07-26 02:11:55.155 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Started task to cleanup processed and stale messages
2018-07-26 02:11:55.197 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Binding cloud listener for device DevDevice/$edgeHub
2018-07-26 02:11:55.204 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - New device connection for device DevDevice/$edgeHub
2018-07-26 02:11:55.208 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.RoutingEdgeHub] - Adding subscription DesiredPropertyUpdates for client DevDevice/$edgeHub.
2018-07-26 02:11:57.334 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Received connection status changed callback with connection status Connected and reason Connection_Ok
2018-07-26 02:11:57.698 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:11:57.716 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - Entering connected state
2018-07-26 02:11:57.719 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - ConnectionEstablished for DevDevice/$edgeHub
2018-07-26 02:11:57.726 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Processing ConnectionEstablished for device DevDevice/$edgeHub
2018-07-26 02:11:57.736 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation UpdateReportedPropertiesAsync succeeded
2018-07-26 02:11:57.737 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Updating reported properties for device DevDevice/$edgeHub
2018-07-26 02:11:57.739 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully sent reported properties to cloud for DevDevice/$edgeHub and reported properties version 0
2018-07-26 02:11:57.931 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:11:57.933 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-26 02:11:57.934 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/$edgeHub
2018-07-26 02:11:57.942 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/$edgeHub from cloud at desired version 14 reported version 476
2018-07-26 02:11:57.985 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Updated cached reported property for DevDevice/$edgeHub at reported property version 476 cloudVerified True
2018-07-26 02:11:57.988 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.EdgeHubConnection] - Established IoT Hub connection for edge hub DevDevice/$edgeHub
2018-07-26 02:11:57.998 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Getting twin for DevDevice/$edgeHub on ConnectionEstablished
2018-07-26 02:11:58.147 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:11:58.147 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-26 02:11:58.147 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/$edgeHub
2018-07-26 02:11:58.148 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/$edgeHub from cloud at desired version 14 reported version 476
2018-07-26 02:11:58.164 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Local twin for DevDevice/$edgeHub at higher or equal desired version 14 compared to cloud 14 or reported version 476 compared to cloud 476
2018-07-26 02:11:58.311 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:11:58.311 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-26 02:11:58.311 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/$edgeHub
2018-07-26 02:11:58.311 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/$edgeHub from cloud at desired version 14 reported version 476
2018-07-26 02:11:58.311 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Local twin for DevDevice/$edgeHub at higher or equal desired version 14 compared to cloud 14 or reported version 476 compared to cloud 476
2018-07-26 02:11:59.802 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:11:59.802 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation UpdateReportedPropertiesAsync succeeded
2018-07-26 02:11:59.802 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Updating reported properties for device DevDevice/$edgeHub
2018-07-26 02:11:59.803 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully sent reported properties to cloud for DevDevice/$edgeHub and reported properties version 0
2018-07-26 02:11:59.805 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Updated cached reported property for DevDevice/$edgeHub at reported property version 476 cloudVerified True
2018-07-26 02:11:59.807 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.EdgeHubConnection] - Obtained edge hub config from module twin
2018-07-26 02:11:59.943 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Added sequential store for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload
2018-07-26 02:11:59.948 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater] - Set the following 1 route(s) in edge hub
2018-07-26 02:11:59.949 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater] - scptouploader: FROM /messages/modules/servermodule/outputs/FileAvailableToUpload INTO BrokeredEndpoint("/modules/clouduploadmodule/inputs/FileAvailableToUpload")
2018-07-26 02:11:59.950 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Updated message store TTL to 7200 seconds
2018-07-26 02:11:59.950 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater] - Updated the edge hub store and forward configuration
2018-07-26 02:11:59.951 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater] - Initialized edge hub configuration
2018-07-26 02:11:59.954 +00:00 [DBG] [EdgeHub] - Waiting on shutdown handler to trigger
2018-07-26 02:11:59.958 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Getting next batch for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload starting from 0 with batch size 10.
2018-07-26 02:11:59.964 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Obtained next batch for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload with batch size 0. Next start offset = 0.
2018-07-26 02:11:59.982 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.numHeapArenas: 16
2018-07-26 02:11:59.986 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.pageSize: 8192
2018-07-26 02:11:59.986 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.maxOrder: 11
2018-07-26 02:11:59.986 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.chunkSize: 16777216
2018-07-26 02:11:59.986 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.tinyCacheSize: 512
2018-07-26 02:11:59.986 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.smallCacheSize: 256
2018-07-26 02:11:59.986 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.normalCacheSize: 64
2018-07-26 02:11:59.986 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
2018-07-26 02:11:59.986 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.cacheTrimInterval: 8192
2018-07-26 02:12:00.046 +00:00 [INF] [EdgeHub] - Starting protocol heads - (HTTP, MQTT, AMQP)
2018-07-26 02:12:00.048 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Http.HttpProtocolHead] - Starting HTTP head
2018-07-26 02:12:00.069 +00:00 [DBG] [Microsoft.AspNetCore.Hosting.Internal.WebHost] - Hosting starting
2018-07-26 02:12:00.128 +00:00 [INF] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - User profile is available. Using '"/home/edgehubuser/.aspnet/DataProtection-Keys"' as key repository; keys will not be encrypted at rest.
2018-07-26 02:12:00.146 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver] - Repository contains no viable default key. Caller should generate a key with immediate activation.
2018-07-26 02:12:00.147 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider] - Policy resolution states that a new key should be added to the key ring.
2018-07-26 02:12:00.152 +00:00 [INF] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - Creating key {2ed1559d-78b0-442c-b931-c313cb86d1dd} with creation date 2018-07-26 02:12:00Z, activation date 2018-07-26 02:12:00Z, and expiration date 2018-10-24 02:12:00Z.
2018-07-26 02:12:00.162 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - Descriptor deserializer type for key {2ed1559d-78b0-442c-b931-c313cb86d1dd} is '"Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60"'.
2018-07-26 02:12:00.164 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - No key escrow sink found. Not writing key {2ed1559d-78b0-442c-b931-c313cb86d1dd} to escrow.
2018-07-26 02:12:00.165 +00:00 [WRN] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - No XML encryptor configured. Key {2ed1559d-78b0-442c-b931-c313cb86d1dd} may be persisted to storage in unencrypted form.
2018-07-26 02:12:00.168 +00:00 [INF] [Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository] - Writing data to file '"/home/edgehubuser/.aspnet/DataProtection-Keys/key-2ed1559d-78b0-442c-b931-c313cb86d1dd.xml"'.
2018-07-26 02:12:00.170 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - Key cache expiration token triggered by '"CreateNewKey"' operation.
2018-07-26 02:12:00.171 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository] - Reading data from file '"/home/edgehubuser/.aspnet/DataProtection-Keys/key-2ed1559d-78b0-442c-b931-c313cb86d1dd.xml"'.
2018-07-26 02:12:00.176 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - Found key {2ed1559d-78b0-442c-b931-c313cb86d1dd}.
2018-07-26 02:12:00.179 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver] - Considering key {2ed1559d-78b0-442c-b931-c313cb86d1dd} with expiration date 2018-10-24 02:12:00Z as default key.
2018-07-26 02:12:00.191 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.TypeForwardingActivator] - Forwarded activator type request from "Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" to "Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60"
2018-07-26 02:12:00.197 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory] - Using managed symmetric algorithm '"System.Security.Cryptography.Aes"'.
2018-07-26 02:12:00.198 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory] - Using managed keyed hash algorithm '"System.Security.Cryptography.HMACSHA256"'.
2018-07-26 02:12:00.209 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider] - Using key {2ed1559d-78b0-442c-b931-c313cb86d1dd} as the default key.
2018-07-26 02:12:00.210 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter] - Key ring with default key {2ed1559d-78b0-442c-b931-c313cb86d1dd} was loaded during application startup.
2018-07-26 02:12:00.228 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcJsonOptions] - Compatibility switch "AllowInputFormatterExceptionMessages" in type "MvcJsonOptions" is using default value False
2018-07-26 02:12:00.256 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "AllowCombiningAuthorizeFilters" in type "MvcOptions" is using default value False
2018-07-26 02:12:00.257 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "AllowBindingHeaderValuesToNonStringModelTypes" in type "MvcOptions" is using default value False
2018-07-26 02:12:00.257 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "AllowValidatingTopLevelNodes" in type "MvcOptions" is using default value False
2018-07-26 02:12:00.257 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "InputFormatterExceptionPolicy" in type "MvcOptions" is using default value AllExceptions
2018-07-26 02:12:00.257 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "SuppressBindingUndefinedValueToEnumType" in type "MvcOptions" is using default value False
2018-07-26 02:12:00.278 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions] - Compatibility switch "AllowAreas" in type "RazorPagesOptions" is using default value False
2018-07-26 02:12:00.278 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions] - Compatibility switch "AllowMappingHeadRequestsToGetHandler" in type "RazorPagesOptions" is using default value False
2018-07-26 02:12:00.329 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcViewOptions] - Compatibility switch "SuppressTempDataAttributePrefix" in type "MvcViewOptions" is using default value False
2018-07-26 02:12:00.373 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory] - Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinderProvider"]
2018-07-26 02:12:00.420 +00:00 [WRN] [Microsoft.AspNetCore.Server.Kestrel] - Overriding address(es) '"http://+:80"'. Binding to endpoints defined in "UseKestrel()" instead.
2018-07-26 02:12:00.441 +00:00 [DBG] [Microsoft.AspNetCore.Hosting.Internal.WebHost] - Hosting started
2018-07-26 02:12:00.441 +00:00 [DBG] [Microsoft.AspNetCore.Hosting.Internal.WebHost] - Loaded hosting startup assembly "Microsoft.Azure.Devices.Edge.Hub.Service"
2018-07-26 02:12:00.441 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Http.HttpProtocolHead] - Started HTTP head
2018-07-26 02:12:00.445 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Mqtt.MqttProtocolHead] - Starting MQTT head
2018-07-26 02:12:00.500 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Mqtt.MqttProtocolHead] - Initializing TLS endpoint on port 8883 for MQTT head.
2018-07-26 02:12:00.510 +00:00 [DBG] [DotNetty.Transport.Channels.DefaultChannelId] - -Dio.netty.processId: 265677 (auto-detected)
2018-07-26 02:12:00.518 +00:00 [DBG] [DotNetty.Transport.Channels.DefaultChannelId] - -Dio.netty.machineId: 02:42:AC:FF:FE:12:00:02 (auto-detected)
2018-07-26 02:12:00.519 +00:00 [DBG] [DotNetty.Buffers.ByteBufferUtil] - -Dio.netty.allocator.type: pooled
2018-07-26 02:12:00.522 +00:00 [DBG] [DotNetty.Common.ResourceLeakDetector] - io.netty.leakDetection.level: simple
2018-07-26 02:12:00.522 +00:00 [DBG] [DotNetty.Common.ResourceLeakDetector] - io.netty.leakDetection.maxRecords: 4
2018-07-26 02:12:00.547 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.AmqpProtocolHead] - Starting AMQP head
2018-07-26 02:12:00.556 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Mqtt.MqttProtocolHead] - Started MQTT head
2018-07-26 02:12:00.629 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.AmqpProtocolHead] - Started AMQP head
2018-07-26 02:12:09.324 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.CbsNode] - Cbs receiver link registered
2018-07-26 02:12:09.325 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.CbsLinkHandler] - New CBS receiver link created
2018-07-26 02:12:09.332 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.CbsNode] - Cbs sender link registered
2018-07-26 02:12:09.332 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.CbsLinkHandler] - New CBS sender link created
2018-07-26 02:12:09.333 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.CbsNode] - New token received on the Cbs link
2018-07-26 02:12:09.361 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Attempting to connect to IoT Hub for client DevDevice/servermodule via AMQP...
2018-07-26 02:12:09.363 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Connected to IoT Hub for client DevDevice/servermodule via AMQP, with client operation timeout 60000.
2018-07-26 02:12:09.363 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - ConnectionEstablished for DevDevice/servermodule
2018-07-26 02:12:09.363 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Processing ConnectionEstablished for device DevDevice/servermodule
2018-07-26 02:12:09.363 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Updated cloud connection for client DevDevice/servermodule
2018-07-26 02:12:09.364 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Created cloud connection for client DevDevice/servermodule
2018-07-26 02:12:09.364 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - New cloud connection created for device DevDevice/servermodule
2018-07-26 02:12:09.364 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Getting twin for DevDevice/servermodule on ConnectionEstablished
2018-07-26 02:12:09.367 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:12:09.367 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation OpenAsync succeeded
2018-07-26 02:12:09.371 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.TokenCredentialsAuthenticator] - Authenticated DevDevice/servermodule with IotHub
2018-07-26 02:12:09.372 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Getting new token for DevDevice/servermodule.
2018-07-26 02:12:09.373 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.CbsNode] - Token updated for DevDevice/servermodule
2018-07-26 02:12:09.373 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - New token requested by client DevDevice/servermodule, but using existing token as it is usable.
2018-07-26 02:12:09.450 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - Obtained cloud connection for device DevDevice/servermodule
2018-07-26 02:12:09.451 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Binding cloud listener for device DevDevice/servermodule
2018-07-26 02:12:09.451 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - New device connection for device DevDevice/servermodule
2018-07-26 02:12:09.454 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.EdgeHubConnection] - Updating device DevDevice/servermodule connection status to Connected
2018-07-26 02:12:09.460 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler] - Bind device proxy for device DevDevice/servermodule
2018-07-26 02:12:09.461 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.ConnectionHandler] - Initialized AMQP connection handler for DevDevice/servermodule
2018-07-26 02:12:09.466 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.RoutingEdgeHub] - Adding subscription DesiredPropertyUpdates for client DevDevice/servermodule.
2018-07-26 02:12:09.476 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.LinkHandler] - Opened link TwinReceiving for DevDevice/servermodule
2018-07-26 02:12:09.666 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Received connection status changed callback with connection status Connected and reason Connection_Ok
2018-07-26 02:12:09.669 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.LinkHandler] - Opened link TwinSending for DevDevice/servermodule
2018-07-26 02:12:09.677 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.RoutingEdgeHub] - GetTwin call received from DevDevice/servermodule
2018-07-26 02:12:09.724 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:12:09.725 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation UpdateReportedPropertiesAsync succeeded
2018-07-26 02:12:09.725 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Updating reported properties for device DevDevice/$edgeHub
2018-07-26 02:12:09.725 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully sent reported properties to cloud for DevDevice/$edgeHub and reported properties version 0
2018-07-26 02:12:09.812 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:12:09.812 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-26 02:12:09.812 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/servermodule
2018-07-26 02:12:09.813 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/servermodule from cloud at desired version 15 reported version 21
2018-07-26 02:12:09.960 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:12:09.960 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-26 02:12:09.960 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/servermodule
2018-07-26 02:12:09.961 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/servermodule from cloud at desired version 15 reported version 21
2018-07-26 02:12:09.961 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Local twin for DevDevice/servermodule at higher or equal desired version 15 compared to cloud 15 or reported version 21 compared to cloud 21
2018-07-26 02:12:09.966 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Updated cached reported property for DevDevice/$edgeHub at reported property version 476 cloudVerified True
2018-07-26 02:12:09.972 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.TwinReceivingLinkHandler] - Processed Twin get request for DevDevice/servermodule
2018-07-26 02:12:09.977 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.RoutingEdgeHub] - Reported properties update message received from DevDevice/servermodule
2018-07-26 02:12:10.244 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-26 02:12:10.245 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation UpdateReportedPropertiesAsync succeeded
2018-07-26 02:12:10.245 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Updating reported properties for device DevDevice/servermodule
2018-07-26 02:12:10.245 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully sent reported properties to cloud for DevDevice/servermodule and reported properties version 0
2018-07-26 02:12:10.247 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Updated cached reported property for DevDevice/servermodule at reported property version 21 cloudVerified True
2018-07-26 02:12:10.251 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.TwinReceivingLinkHandler] - Processed Twin reported properties update for DevDevice/servermodule
2018-07-26 02:12:53.249 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.LinkHandler] - Opened link Events for DevDevice/servermodule
2018-07-26 02:12:53.295 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Added message 0d6e23f7-1f22-4791-9d60-97ffc11e9a82 to store for DevDevice/clouduploadmodule/FileAvailableToUpload at offset 0 - messageCount = 0
2018-07-26 02:12:53.298 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Getting next batch for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload starting from 0 with batch size 10.
2018-07-26 02:12:53.299 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-26 02:12:53.301 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-26 02:12:53.312 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Obtained next batch for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload with batch size 1. Next start offset = 1.
2018-07-26 02:12:53.320 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-26 02:12:53.325 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-26 02:12:54.334 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-26 02:12:54.334 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-26 02:12:56.343 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-26 02:12:56.343 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-26 02:12:58.637 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-26 02:12:58.637 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-26 02:13:00.138 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-26 02:13:00.138 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-26 02:13:04.703 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-26 02:13:04.703 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-26 02:13:07.799 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-26 02:13:07.799 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-26 02:13:10.152 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-26 02:13:10.152 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-26 02:13:26.532 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-26 02:13:26.532 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-26 02:14:02.422 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-26 02:14:02.423 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected

Surprisingly enough, the messages are still not flowing through, even though the edgeHub module has been restarted. I still haven't restarted the clouduploadmodule.

I guess from these it's pretty obvious that for some reason the cloudupload module is not actually connected to the messaging service for some reason.

The follow method was ran in the cloud upload module and didn't return any errors, and all the logs showed up as expected:

private static async Task InitAsync(IModuleClient inDeviceClient)
{
    // Open a connection to the Edge runtime
    await inDeviceClient.OpenAsync().ConfigureAwait(false);
    await deviceLogger.WriteGenericLogAsync($"...IoT Hub module client initialized");

    //Initialise the dicom private dictionary.
    PrivateDictionary.Initialize();
    await deviceLogger.WriteGenericLogAsync($"...dicom private dictionary initialized");

    // Attach callback for Twin desired properties updates
    await inDeviceClient.SetDesiredPropertyUpdateCallbackAsync(OnDesiredPropertiesUpdateAsync,
        inDeviceClient).ConfigureAwait(false);
    await deviceLogger.WriteGenericLogAsync($"...desired property update callback initialized");

    // Register callback to be called when a message is received by the module
    await inDeviceClient.SetInputMessageHandlerAsync("FileAvailableToUpload", UploadFileAsync,
        inDeviceClient).ConfigureAwait(false);
    await deviceLogger.WriteGenericLogAsync($"...edge local message handler initialized");
}

Also, thanks for the FYI about the certs!

@varunpuranik
Copy link
Contributor

Yes, looks like the module is not connected. But this seems to be because the module is not even aware that the connection has dropped (I have seen that happen sometimes, seems like a bug in the SDK). Can you restart the clouduploadmodule, that should start the messages.
However, I don't think this is what happens in the case of your original issue, since in that case all modules are re-started.

@Hammatt
Copy link
Author

Hammatt commented Jul 26, 2018

Thanks, I've issued a restart to that module and it has fired up again, it's somewhat of concern that this wasn't self-healing.

I guess that we could do this remotely by creating a blank manifest and deploying that, and then issuing the old manifest back, making the modules restart.

I'll leave debug logging on incase anything happens again so that we can check.

@Hammatt
Copy link
Author

Hammatt commented Jul 27, 2018

Hi @varunpuranik, I've been messing about trying to see if I can find a scenario where I can recreate this behavior and I may have found something with the help of somebody else here.

We've found that if you manually restart the edgeHub module after the other modules are up, it does not correctly route messages.

steps:

  1. start up a couple of modules which talk to eachother, see that they are working
  2. issue a restart to the edgeHub module, either with docker restart or iotedge restart
  3. see that the messages are no longer being routed between.

I wonder if this is what happened to me, and one of the modules simply came up before the edgeHub module was ready?

@varunpuranik
Copy link
Contributor

So, typically what seems to happen (and more with clients using MQTT than AMQP) is that the client does not connect successfully with EdgeHub (it either times out, or fails to authenticate). But if the clients do connect, then messages should flow properly.

Can you please check EdgeHub logs to see if the modules between which you expected messages to flow were indeed connected to the EdgeHub? (Or if you copy the logs here, I can take a look as well)

@Hammatt
Copy link
Author

Hammatt commented Jul 29, 2018

Hi, sorry for the delay. I couldn't remote into the dev machine from home for some reason.

it appears that when the edgeHub is forcefully restarted, the consuming module does not manage to re-connect to it by itself.
Here are the logs:

2018-07-29 20:29:00.599 +00:00 [INF] [EdgeHub] - Starting Edge Hub
2018-07-29 20:29:00.601 +00:00 [INF] [EdgeHub] - Version - 1.0.0.14487025 (52ef77db24126bf473265fc09c53d35290a2dd6b)
2018-07-29 20:29:00.602 +00:00 [INF] [EdgeHub] -
        █████╗ ███████╗██╗   ██╗██████╗ ███████╗
       ██╔══██╗╚══███╔╝██║   ██║██╔══██╗██╔════╝
       ███████║  ███╔╝ ██║   ██║██████╔╝█████╗
       ██╔══██║ ███╔╝  ██║   ██║██╔══██╗██╔══╝
       ██║  ██║███████╗╚██████╔╝██║  ██║███████╗
       ╚═╝  ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝

 ██╗ ██████╗ ████████╗    ███████╗██████╗  ██████╗ ███████╗
 ██║██╔═══██╗╚══██╔══╝    ██╔════╝██╔══██╗██╔════╝ ██╔════╝
 ██║██║   ██║   ██║       █████╗  ██║  ██║██║  ███╗█████╗
 ██║██║   ██║   ██║       ██╔══╝  ██║  ██║██║   ██║██╔══╝
 ██║╚██████╔╝   ██║       ███████╗██████╔╝╚██████╔╝███████╗
 ╚═╝ ╚═════╝    ╚═╝       ╚══════╝╚═════╝  ╚═════╝ ╚══════╝

2018-07-29 20:29:00.602 +00:00 [INF] [EdgeHub] - Installing intermediate certificates.
2018-07-29 20:29:00.715 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - Created DeviceConnectivityManager with connected check frequency 00:05:00 and disconnected check frequency 00:02:00
2018-07-29 20:29:00.874 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Attempting to connect to IoT Hub for client DevDevice/$edgeHub via AMQP...
2018-07-29 20:29:01.048 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Connected to IoT Hub for client DevDevice/$edgeHub via AMQP, with client operation timeout 60000.
2018-07-29 20:29:01.069 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Updated cloud connection for client DevDevice/$edgeHub
2018-07-29 20:29:01.072 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Created cloud connection for client DevDevice/$edgeHub
2018-07-29 20:29:01.076 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - New cloud connection created for device DevDevice/$edgeHub
2018-07-29 20:29:01.098 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - CloudProxy to test device connectivity set
2018-07-29 20:29:01.098 +00:00 [INF] [EdgeHub] - Initializing configuration
2018-07-29 20:29:02.056 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Service.Modules.RoutingModule] - Created persistent store at /tmp/edgeHub
2018-07-29 20:29:02.132 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Created new message store
2018-07-29 20:29:02.132 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Started task to cleanup processed and stale messages
2018-07-29 20:29:02.284 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Binding cloud listener for device DevDevice/$edgeHub
2018-07-29 20:29:02.304 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - New device connection for device DevDevice/$edgeHub
2018-07-29 20:29:02.316 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.RoutingEdgeHub] - Adding subscription DesiredPropertyUpdates for client DevDevice/$edgeHub.
2018-07-29 20:29:05.867 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Received connection status changed callback with connection status Connected and reason Connection_Ok
2018-07-29 20:29:06.480 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:06.513 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - Entering connected state
2018-07-29 20:29:06.521 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - ConnectionEstablished for DevDevice/$edgeHub
2018-07-29 20:29:06.538 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Processing ConnectionEstablished for device DevDevice/$edgeHub
2018-07-29 20:29:06.573 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation UpdateReportedPropertiesAsync succeeded
2018-07-29 20:29:06.578 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Updating reported properties for device DevDevice/$edgeHub
2018-07-29 20:29:06.582 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully sent reported properties to cloud for DevDevice/$edgeHub and reported properties version 0
2018-07-29 20:29:06.907 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:06.914 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-29 20:29:06.919 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/$edgeHub
2018-07-29 20:29:06.949 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/$edgeHub from cloud at desired version 118 reported version 3059
2018-07-29 20:29:07.115 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Updated cached reported property for DevDevice/$edgeHub at reported property version 3059 cloudVerified True
2018-07-29 20:29:07.128 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.EdgeHubConnection] - Established IoT Hub connection for edge hub DevDevice/$edgeHub
2018-07-29 20:29:07.157 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Getting twin for DevDevice/$edgeHub on ConnectionEstablished
2018-07-29 20:29:07.312 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:07.312 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-29 20:29:07.312 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/$edgeHub
2018-07-29 20:29:07.313 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/$edgeHub from cloud at desired version 118 reported version 3059
2018-07-29 20:29:07.335 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Local twin for DevDevice/$edgeHub at higher or equal desired version 118 compared to cloud 118 or reported version 3059 compared to cloud 3059
2018-07-29 20:29:07.483 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:07.483 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-29 20:29:07.483 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/$edgeHub
2018-07-29 20:29:07.483 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/$edgeHub from cloud at desired version 118 reported version 3059
2018-07-29 20:29:07.484 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Local twin for DevDevice/$edgeHub at higher or equal desired version 118 compared to cloud 118 or reported version 3059 compared to cloud 3059
2018-07-29 20:29:08.576 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:08.576 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation UpdateReportedPropertiesAsync succeeded
2018-07-29 20:29:08.576 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Updating reported properties for device DevDevice/$edgeHub
2018-07-29 20:29:08.576 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully sent reported properties to cloud for DevDevice/$edgeHub and reported properties version 0
2018-07-29 20:29:08.582 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Updated cached reported property for DevDevice/$edgeHub at reported property version 3059 cloudVerified True
2018-07-29 20:29:08.584 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.EdgeHubConnection] - Obtained edge hub config from module twin
2018-07-29 20:29:08.957 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Added sequential store for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload
2018-07-29 20:29:08.973 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater] - Set the following 1 route(s) in edge hub
2018-07-29 20:29:08.977 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater] - scptouploader: FROM /messages/modules/servermodule/outputs/FileAvailableToUpload INTO BrokeredEndpoint("/modules/clouduploadmodule/inputs/FileAvailableToUpload")
2018-07-29 20:29:08.982 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Updated message store TTL to 7200 seconds
2018-07-29 20:29:08.983 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater] - Updated the edge hub store and forward configuration
2018-07-29 20:29:08.984 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Config.ConfigUpdater] - Initialized edge hub configuration
2018-07-29 20:29:08.997 +00:00 [DBG] [EdgeHub] - Waiting on shutdown handler to trigger
2018-07-29 20:29:09.007 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Getting next batch for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload starting from 0 with batch size 10.
2018-07-29 20:29:09.032 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Obtained next batch for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload with batch size 0. Next start offset = 0.
2018-07-29 20:29:09.096 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.numHeapArenas: 8
2018-07-29 20:29:09.097 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.pageSize: 8192
2018-07-29 20:29:09.097 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.maxOrder: 11
2018-07-29 20:29:09.097 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.chunkSize: 16777216
2018-07-29 20:29:09.097 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.tinyCacheSize: 512
2018-07-29 20:29:09.097 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.smallCacheSize: 256
2018-07-29 20:29:09.097 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.normalCacheSize: 64
2018-07-29 20:29:09.097 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
2018-07-29 20:29:09.097 +00:00 [DBG] [DotNetty.Buffers.PooledByteBufferAllocator] - -Dio.netty.allocator.cacheTrimInterval: 8192
2018-07-29 20:29:09.272 +00:00 [INF] [EdgeHub] - Starting protocol heads - (HTTP, MQTT, AMQP)
2018-07-29 20:29:09.281 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Http.HttpProtocolHead] - Starting HTTP head
2018-07-29 20:29:09.357 +00:00 [DBG] [Microsoft.AspNetCore.Hosting.Internal.WebHost] - Hosting starting
2018-07-29 20:29:09.593 +00:00 [INF] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - User profile is available. Using '"/home/edgehubuser/.aspnet/DataProtection-Keys"' as key repository; keys will not be encrypted at rest.
2018-07-29 20:29:09.664 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver] - Repository contains no viable default key. Caller should generate a key with immediate activation.
2018-07-29 20:29:09.665 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider] - Policy resolution states that a new key should be added to the key ring.
2018-07-29 20:29:09.684 +00:00 [INF] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - Creating key {} with creation date 2018-07-29 20:29:09Z, activation date 2018-07-29 20:29:09Z, and expiration date 2018-10-27 20:29:09Z.
2018-07-29 20:29:09.723 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - Descriptor deserializer type for key {} is '"Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60"'.
2018-07-29 20:29:09.733 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - No key escrow sink found. Not writing key {} to escrow.
2018-07-29 20:29:09.734 +00:00 [WRN] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - No XML encryptor configured. Key {} may be persisted to storage in unencrypted form.
2018-07-29 20:29:09.748 +00:00 [INF] [Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository] - Writing data to file '"/home/edgehubuser/.aspnet/DataProtection-Keys/key-672cc477-5b82-4c97-8116-6143bb54e1e7.xml"'.
2018-07-29 20:29:09.752 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - Key cache expiration token triggered by '"CreateNewKey"' operation.
2018-07-29 20:29:09.754 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository] - Reading data from file '"/home/edgehubuser/.aspnet/DataProtection-Keys/key-672cc477-5b82-4c97-8116-6143bb54e1e7.xml"'.
2018-07-29 20:29:09.773 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager] - Found key {}.
2018-07-29 20:29:09.788 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.DefaultKeyResolver] - Considering key {} with expiration date 2018-10-27 20:29:09Z as default key.
2018-07-29 20:29:09.828 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.TypeForwardingActivator] - Forwarded activator type request from "Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60" to "Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Culture=neutral, PublicKeyToken=adb9793829ddae60"
2018-07-29 20:29:09.854 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory] - Using managed symmetric algorithm '"System.Security.Cryptography.Aes"'.
2018-07-29 20:29:09.856 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ManagedAuthenticatedEncryptorFactory] - Using managed keyed hash algorithm '"System.Security.Cryptography.HMACSHA256"'.
2018-07-29 20:29:09.898 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider] - Using key {} as the default key.
2018-07-29 20:29:09.904 +00:00 [DBG] [Microsoft.AspNetCore.DataProtection.Internal.DataProtectionStartupFilter] - Key ring with default key {} was loaded during application startup.
2018-07-29 20:29:09.988 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcJsonOptions] - Compatibility switch "AllowInputFormatterExceptionMessages" in type "MvcJsonOptions" is using default value False
2018-07-29 20:29:10.099 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "AllowCombiningAuthorizeFilters" in type "MvcOptions" is using default value False
2018-07-29 20:29:10.099 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "AllowBindingHeaderValuesToNonStringModelTypes" in type "MvcOptions" is using default value False
2018-07-29 20:29:10.100 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "AllowValidatingTopLevelNodes" in type "MvcOptions" is using default value False
2018-07-29 20:29:10.102 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "InputFormatterExceptionPolicy" in type "MvcOptions" is using default value AllExceptions
2018-07-29 20:29:10.103 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcOptions] - Compatibility switch "SuppressBindingUndefinedValueToEnumType" in type "MvcOptions" is using default value False
2018-07-29 20:29:10.193 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions] - Compatibility switch "AllowAreas" in type "RazorPagesOptions" is using default value False
2018-07-29 20:29:10.193 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.RazorPages.RazorPagesOptions] - Compatibility switch "AllowMappingHeadRequestsToGetHandler" in type "RazorPagesOptions" is using default value False
2018-07-29 20:29:10.416 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.MvcViewOptions] - Compatibility switch "SuppressTempDataAttributePrefix" in type "MvcViewOptions" is using default value False
2018-07-29 20:29:10.597 +00:00 [DBG] [Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory] - Registered model binder providers, in the following order: ["Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ServicesModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.HeaderModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FloatingPointTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.EnumTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.SimpleTypeModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CancellationTokenModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ByteArrayModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormFileModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.FormCollectionModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.KeyValuePairModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ArrayModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinderProvider", "Microsoft.AspNetCore.Mvc.ModelBinding.Binders.ComplexTypeModelBinderProvider"]
2018-07-29 20:29:10.813 +00:00 [WRN] [Microsoft.AspNetCore.Server.Kestrel] - Overriding address(es) '"http://+:80"'. Binding to endpoints defined in "UseKestrel()" instead.
2018-07-29 20:29:10.896 +00:00 [DBG] [Microsoft.AspNetCore.Hosting.Internal.WebHost] - Hosting started
2018-07-29 20:29:10.896 +00:00 [DBG] [Microsoft.AspNetCore.Hosting.Internal.WebHost] - Loaded hosting startup assembly "Microsoft.Azure.Devices.Edge.Hub.Service"
2018-07-29 20:29:10.897 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Http.HttpProtocolHead] - Started HTTP head
2018-07-29 20:29:10.912 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Mqtt.MqttProtocolHead] - Starting MQTT head
2018-07-29 20:29:11.098 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Mqtt.MqttProtocolHead] - Initializing TLS endpoint on port 8883 for MQTT head.
2018-07-29 20:29:11.138 +00:00 [DBG] [DotNetty.Transport.Channels.DefaultChannelId] - -Dio.netty.processId:  (auto-detected)
2018-07-29 20:29:11.167 +00:00 [DBG] [DotNetty.Transport.Channels.DefaultChannelId] - -Dio.netty.machineId:  (auto-detected)
2018-07-29 20:29:11.171 +00:00 [DBG] [DotNetty.Buffers.ByteBufferUtil] - -Dio.netty.allocator.type: pooled
2018-07-29 20:29:11.182 +00:00 [DBG] [DotNetty.Common.ResourceLeakDetector] - io.netty.leakDetection.level: simple
2018-07-29 20:29:11.182 +00:00 [DBG] [DotNetty.Common.ResourceLeakDetector] - io.netty.leakDetection.maxRecords: 4
2018-07-29 20:29:11.284 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.AmqpProtocolHead] - Starting AMQP head
2018-07-29 20:29:11.382 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Mqtt.MqttProtocolHead] - Started MQTT head
2018-07-29 20:29:11.558 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.AmqpProtocolHead] - Started AMQP head
2018-07-29 20:29:16.991 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.CbsNode] - Cbs receiver link registered
2018-07-29 20:29:16.996 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.CbsLinkHandler] - New CBS receiver link created
2018-07-29 20:29:17.018 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.CbsNode] - Cbs sender link registered
2018-07-29 20:29:17.018 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.CbsLinkHandler] - New CBS sender link created
2018-07-29 20:29:17.022 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.CbsNode] - New token received on the Cbs link
2018-07-29 20:29:17.128 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Attempting to connect to IoT Hub for client DevDevice/servermodule via AMQP...
2018-07-29 20:29:17.136 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Connected to IoT Hub for client DevDevice/servermodule via AMQP, with client operation timeout 60000.
2018-07-29 20:29:17.136 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - ConnectionEstablished for DevDevice/servermodule
2018-07-29 20:29:17.137 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Processing ConnectionEstablished for device DevDevice/servermodule
2018-07-29 20:29:17.137 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Updated cloud connection for client DevDevice/servermodule
2018-07-29 20:29:17.137 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Created cloud connection for client DevDevice/servermodule
2018-07-29 20:29:17.153 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - New cloud connection created for device DevDevice/servermodule
2018-07-29 20:29:17.199 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - Getting new token for DevDevice/servermodule.
2018-07-29 20:29:17.203 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudConnection] - New token requested by client DevDevice/servermodule, but using existing token as it is usable.
2018-07-29 20:29:17.509 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Received connection status changed callback with connection status Connected and reason Connection_Ok
2018-07-29 20:29:17.524 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:17.524 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation OpenAsync succeeded
2018-07-29 20:29:17.533 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.TokenCredentialsAuthenticator] - Authenticated DevDevice/servermodule with IotHub
2018-07-29 20:29:17.538 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.CbsNode] - Token updated for DevDevice/servermodule
2018-07-29 20:29:17.805 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - Obtained cloud connection for device DevDevice/servermodule
2018-07-29 20:29:17.811 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Binding cloud listener for device DevDevice/servermodule
2018-07-29 20:29:17.812 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.ConnectionManager] - New device connection for device DevDevice/servermodule
2018-07-29 20:29:17.821 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.EdgeHubConnection] - Updating device DevDevice/servermodule connection status to Connected
2018-07-29 20:29:17.843 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Core.Device.DeviceMessageHandler] - Bind device proxy for device DevDevice/servermodule
2018-07-29 20:29:17.846 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.ConnectionHandler] - Initialized AMQP connection handler for DevDevice/servermodule
2018-07-29 20:29:17.881 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.LinkHandler] - Opened link TwinReceiving for DevDevice/servermodule
2018-07-29 20:29:17.896 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.RoutingEdgeHub] - Adding subscription DesiredPropertyUpdates for client DevDevice/servermodule.
2018-07-29 20:29:18.104 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:18.105 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation UpdateReportedPropertiesAsync succeeded
2018-07-29 20:29:18.105 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Updating reported properties for device DevDevice/$edgeHub
2018-07-29 20:29:18.105 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully sent reported properties to cloud for DevDevice/$edgeHub and reported properties version 0
2018-07-29 20:29:18.109 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Updated cached reported property for DevDevice/$edgeHub at reported property version 3059 cloudVerified True
2018-07-29 20:29:18.228 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.LinkHandler] - Opened link TwinSending for DevDevice/servermodule
2018-07-29 20:29:18.301 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.RoutingEdgeHub] - GetTwin call received from DevDevice/servermodule
2018-07-29 20:29:18.448 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:18.449 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation GetTwinAsync succeeded
2018-07-29 20:29:18.449 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Getting twin for device DevDevice/servermodule
2018-07-29 20:29:18.450 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully got twin for DevDevice/servermodule from cloud at desired version 63 reported version 161
2018-07-29 20:29:18.476 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.TwinReceivingLinkHandler] - Processed Twin get request for DevDevice/servermodule
2018-07-29 20:29:18.498 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.RoutingEdgeHub] - Reported properties update message received from DevDevice/servermodule
2018-07-29 20:29:18.759 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.DeviceConnectivityManager] - IotHub call succeeded
2018-07-29 20:29:18.759 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.ConnectivityAwareClient] - Operation UpdateReportedPropertiesAsync succeeded
2018-07-29 20:29:18.759 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.CloudProxy.CloudProxy] - Updating reported properties for device DevDevice/servermodule
2018-07-29 20:29:18.759 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Successfully sent reported properties to cloud for DevDevice/servermodule and reported properties version 0
2018-07-29 20:29:18.762 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.TwinManager] - Updated cached reported property for DevDevice/servermodule at reported property version 161 cloudVerified True
2018-07-29 20:29:18.769 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.TwinReceivingLinkHandler] - Processed Twin reported properties update for DevDevice/servermodule
2018-07-29 20:29:47.129 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.LinkHandler] - Opened link Events for DevDevice/servermodule
2018-07-29 20:29:47.335 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Added message 62976175-93b8-48d6-ba72-70b3cfed216d to store for DevDevice/clouduploadmodule/FileAvailableToUpload at offset 0 - messageCount = 0
2018-07-29 20:29:47.346 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Getting next batch for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload starting from 0 with batch size 10.
2018-07-29 20:29:47.349 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-29 20:29:47.356 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-29 20:29:47.390 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Storage.MessageStore] - Obtained next batch for endpoint DevDevice/clouduploadmodule/FileAvailableToUpload with batch size 1. Next start offset = 1.
2018-07-29 20:29:47.415 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-29 20:29:47.430 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-29 20:29:48.465 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-29 20:29:48.465 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-29 20:29:50.576 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-29 20:29:50.576 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-29 20:29:52.165 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-29 20:29:52.166 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-29 20:29:54.370 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-29 20:29:54.371 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-29 20:29:56.907 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-29 20:29:56.907 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-29 20:30:01.818 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-29 20:30:01.820 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Amqp.LinkHandlers.EventsLinkHandler] - EventsLinkHandler processed 1 messages for DevDevice/servermodule
2018-07-29 20:30:02.365 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-29 20:30:02.365 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-29 20:30:16.481 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-29 20:30:16.481 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected
2018-07-29 20:30:48.913 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Sending 1 message(s) to module DevDevice/clouduploadmodule.
2018-07-29 20:30:48.913 +00:00 [ERR] [Microsoft.Azure.Devices.Edge.Hub.Core.Routing.ModuleEndpoint] - Module DevDevice/clouduploadmodule is not connected

Is it the responsibility of the custom module (or maybe the sdk?) to know that the hub module has restarted somehow and to re-connect? or should the hub module reconnect itself somehow?

@varunpuranik
Copy link
Contributor

Yes, it is indeed the responsibility of the client to reconnect... so in this case it would be the custom module. And yes, if you are using the SDK, I would expect it to do that. Feel free to log a github issue against the SDK if you feel that is the case.

@myagley
Copy link
Contributor

myagley commented Oct 1, 2018

I'm going to close this issue due to inactivity, but please feel free to reopen. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants