iotedge: TLS handshake failed., System.IO.IOException
Expected Behavior
Module sending data to iothub.
Current Behavior
Getting TLS handshake errors between the edgeHub and a custom C# module when trying to connect to the mqqt.
Output of iotedge check
Click here
Configuration checks (aziot-identity-service)
---------------------------------------------
√ keyd configuration is well-formed - OK
√ certd configuration is well-formed - OK
√ tpmd configuration is well-formed - OK
√ identityd configuration is well-formed - OK
√ daemon configurations up-to-date with config.toml - OK
√ identityd config toml file specifies a valid hostname - OK
√ aziot-identity-service package is up-to-date - OK
√ host time is close to reference time - OK
√ preloaded certificates are valid - OK
√ keyd is running - OK
√ certd is running - OK
√ identityd is running - OK
√ read all preloaded certificates from the Certificates Service - OK
√ read all preloaded key pairs from the Keys Service - OK
√ check all EST server URLs utilize HTTPS - OK
√ ensure all preloaded certificates match preloaded private keys with the same ID - OK
Connectivity checks (aziot-identity-service)
--------------------------------------------
√ host can connect to and perform TLS handshake with iothub AMQP port - OK
√ host can connect to and perform TLS handshake with iothub HTTPS / WebSockets port - OK
√ host can connect to and perform TLS handshake with iothub MQTT port - OK
Configuration checks
--------------------
√ aziot-edged configuration is well-formed - OK
√ configuration up-to-date with config.toml - OK
√ container engine is installed and functional - OK
√ configuration has correct URIs for daemon mgmt endpoint - OK
√ aziot-edge package is up-to-date - OK
√ container time is close to host time - OK
‼ DNS server - Warning
Container engine is not configured with DNS server setting, which may impact connectivity to IoT Hub.
Please see https://aka.ms/iotedge-prod-checklist-dns for best practices.
You can ignore this warning if you are setting DNS server per module in the Edge deployment.
‼ production readiness: logs policy - Warning
Container engine is not configured to rotate module logs which may cause it run out of disk space.
Please see https://aka.ms/iotedge-prod-checklist-logs for best practices.
You can ignore this warning if you are setting log policy per module in the Edge deployment.
‼ production readiness: Edge Agent's storage directory is persisted on the host filesystem - Warning
The edgeAgent module is not configured to persist its /tmp/edgeAgent directory on the host filesystem.
Data might be lost if the module is deleted or updated.
Please see https://aka.ms/iotedge-storage-host for best practices.
‼ production readiness: Edge Hub's storage directory is persisted on the host filesystem - Warning
The edgeHub module is not configured to persist its /tmp/edgeHub directory on the host filesystem.
Data might be lost if the module is deleted or updated.
Please see https://aka.ms/iotedge-storage-host for best practices.
√ Agent image is valid and can be pulled from upstream - OK
√ proxy settings are consistent in aziot-edged, aziot-identityd, moby daemon and config.toml - OK
Connectivity checks
-------------------
√ container on the default network can connect to upstream AMQP port - OK
√ container on the default network can connect to upstream HTTPS / WebSockets port - OK
√ container on the IoT Edge module network can connect to upstream AMQP port - OK
√ container on the IoT Edge module network can connect to upstream HTTPS / WebSockets port - OK
31 check(s) succeeded.
4 check(s) raised warnings. Re-run with --verbose for more details.
2 check(s) were skipped due to errors from other checks. Re-run with --verbose for more details.
Device Information
- Host OS: Ubuntu 22.04
- Architecture: amd64
- Container OS: Docker
Runtime Versions
- aziot-edged: iotedge 1.4.27
- Edge Agent: 1.4
- Edge Hub: 1.4
- Docker/Moby: 24.0.7-1
Logs
logs from the module:
[08:39:57 WRN] Connection changed: Status: Disconnected_Retrying Reason: Communication_Error
[08:39:57 WRN] Connection changed: Status: Disconnected Reason: Retry_Expired
aziot-edged logs
Partially omitted due to github content length. This part contains the only visible error.
jan 10 09:33:38 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:38Z [INFO] - Watchdog checking Edge runtime status
jan 10 09:33:38 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:38Z [INFO] - Edge runtime is running
jan 10 09:33:39 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:39Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:33:39 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:39Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:33:44 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:44Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:33:44 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:44Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:33:49 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:49Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:33:49 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:49Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:33:54 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:54Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:33:54 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:54Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:33:59 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:59Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:33:59 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:33:59Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:04 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:04Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:34:04 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:04Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:09 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:09Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:34:09 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:09Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:14 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:14Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:34:14 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:14Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:19 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:19Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:34:19 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:19Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:21 dev-Virtual-Machine aziot-certd[31454]: 2024-01-10T08:34:21Z [INFO] - <-- GET /certificates/aziot-edged-trust-bundle?api-version=2020-09-01 {"host": "certd.sock"}
jan 10 09:34:21 dev-Virtual-Machine aziot-certd[31454]: 2024-01-10T08:34:21Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:21 dev-Virtual-Machine aziot-keyd[31397]: 2024-01-10T08:34:21Z [INFO] - <-- GET /keypair/device-id?api-version=2021-05-01 {"host": "keyd.sock"}
jan 10 09:34:21 dev-Virtual-Machine aziot-keyd[31397]: 2024-01-10T08:34:21Z [ERR!] - error:1E08010C:DECODER routines:OSSL_DECODER_from_bio:unsupported:../crypto/encode_decode/decoder_lib.c:101:No supported data to decode. Input type: PEM
jan 10 09:34:21 dev-Virtual-Machine aziot-keyd[31397]: 2024-01-10T08:34:21Z [ERR!] - !!! internal error
jan 10 09:34:21 dev-Virtual-Machine aziot-keyd[31397]: 2024-01-10T08:34:21Z [ERR!] - !!! caused by: could not load key pair
jan 10 09:34:21 dev-Virtual-Machine aziot-keyd[31397]: 2024-01-10T08:34:21Z [ERR!] - !!! caused by: could not load key pair: AZIOT_KEYS_RC_ERR_EXTERNAL
jan 10 09:34:21 dev-Virtual-Machine aziot-keyd[31397]: 2024-01-10T08:34:21Z [INFO] - --> 500 {"content-type": "application/json"}
jan 10 09:34:24 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:24Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:34:24 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:24Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:24 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:24Z [INFO] - <-- GET /modules/?api-version=2018-06-28 {"host": "unix:///var/run/iotedge/mgmt.sock", "connection": "Close"}
jan 10 09:34:24 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:24Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:29 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:29Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:34:29 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:29Z [INFO] - --> 200 {"content-type": "application/json"}
jan 10 09:34:34 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:34Z [INFO] - <-- GET /modules?api-version=2022-08-03 {"accept": "application/json", "host": "mgmt.sock:80", "connection": "close"}
jan 10 09:34:34 dev-Virtual-Machine aziot-edged[31393]: 2024-01-10T08:34:34Z [INFO] - --> 200 {"content-type": "application/json"}
edge-agent logs
<6> 2024-01-10 08:28:16.216 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:28:16.216 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:28:16.216 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:28:16.511 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:28:16.512 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:28:16.512 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bModBusModule\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:28:16.519 +00:00 [INF] - Initiating streaming logs for ModBusModule
<6> 2024-01-10 08:28:16.561 +00:00 [INF] - Received 1861 bytes of logs for ModBusModule
<6> 2024-01-10 08:28:16.561 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:28:31.700 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:28:31.701 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:28:31.701 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:28:31.788 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:28:31.789 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:28:31.789 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bedgeHub\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:28:31.795 +00:00 [INF] - Initiating streaming logs for edgeHub
<6> 2024-01-10 08:28:31.796 +00:00 [INF] - Received 437 bytes of logs for edgeHub
<6> 2024-01-10 08:28:31.797 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:30:18.988 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:30:18.989 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:30:18.989 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:30:19.065 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:30:19.066 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:30:19.066 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bModBusModule\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:30:19.073 +00:00 [INF] - Initiating streaming logs for ModBusModule
<6> 2024-01-10 08:30:19.142 +00:00 [INF] - Received 2003 bytes of logs for ModBusModule
<6> 2024-01-10 08:30:19.143 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:35:26.892 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:35:26.892 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:35:26.893 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:35:26.984 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:35:26.984 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:35:26.984 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bedgeHub\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:35:26.989 +00:00 [INF] - Initiating streaming logs for edgeHub
<6> 2024-01-10 08:35:26.990 +00:00 [INF] - Received 586 bytes of logs for edgeHub
<6> 2024-01-10 08:35:26.991 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:35:37.165 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:35:37.166 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:35:37.166 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:35:37.237 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:35:37.237 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:35:37.237 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bModBusModule\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:35:37.244 +00:00 [INF] - Initiating streaming logs for ModBusModule
<6> 2024-01-10 08:35:37.319 +00:00 [INF] - Received 1991 bytes of logs for ModBusModule
<6> 2024-01-10 08:35:37.319 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:36:06.089 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:36:06.089 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:36:06.089 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:36:06.182 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:36:06.182 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:36:06.183 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bedgeAgent\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:36:09.136 +00:00 [INF] - Initiating streaming logs for edgeAgent
<6> 2024-01-10 08:36:09.157 +00:00 [INF] - Received 1800 bytes of logs for edgeAgent
<6> 2024-01-10 08:36:09.158 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:36:44.732 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:36:44.732 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:36:44.732 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:36:44.827 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:36:44.828 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:36:44.828 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bedgeHub\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:36:44.832 +00:00 [INF] - Initiating streaming logs for edgeHub
<6> 2024-01-10 08:36:44.834 +00:00 [INF] - Received 602 bytes of logs for edgeHub
<6> 2024-01-10 08:36:44.834 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:40:11.234 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:40:11.234 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:40:11.234 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:40:11.310 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:40:11.311 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:40:11.311 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bedgeHub\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:40:11.317 +00:00 [INF] - Initiating streaming logs for edgeHub
<6> 2024-01-10 08:40:11.318 +00:00 [INF] - Received 647 bytes of logs for edgeHub
<6> 2024-01-10 08:40:11.319 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:41:01.960 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:41:01.960 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:41:01.961 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:41:02.046 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:41:02.046 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:41:02.046 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bModBusModule\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
<6> 2024-01-10 08:41:02.053 +00:00 [INF] - Initiating streaming logs for ModBusModule
<6> 2024-01-10 08:41:02.128 +00:00 [INF] - Received 2126 bytes of logs for ModBusModule
<6> 2024-01-10 08:41:02.128 +00:00 [INF] - Successfully handled request GetModuleLogs
<6> 2024-01-10 08:43:07.568 +00:00 [INF] - Received direct method call - ping
<6> 2024-01-10 08:43:07.568 +00:00 [INF] - Received request ping with payload
<6> 2024-01-10 08:43:07.568 +00:00 [INF] - Successfully handled request ping
<6> 2024-01-10 08:43:07.648 +00:00 [INF] - Received direct method call - GetModuleLogs
<6> 2024-01-10 08:43:07.648 +00:00 [INF] - Received request GetModuleLogs with payload
<6> 2024-01-10 08:43:07.649 +00:00 [INF] - Processing request to get logs for {"schemaVersion":"1.0","items":{"id":"\\bedgeAgent\\b","filter":{"tail":1500,"since":"15m","until":null,"loglevel":null,"regex":""}},"encoding":1,"contentType":1}
edge-hub logs
<6> 2024-01-10 08:25:17.959 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<6> 2024-01-10 08:26:00.333 +00:00 [INF] - Obtained edge hub config patch update from module twin
<6> 2024-01-10 08:26:00.377 +00:00 [INF] - Updating edge hub configuration
<6> 2024-01-10 08:26:00.398 +00:00 [INF] - Set the following 1 route(s) in edge hub
<6> 2024-01-10 08:26:00.398 +00:00 [INF] - ModBusModuleToIoTHub: FROM /messages/modules/ModBusModule/outputs/* INTO $upstream
<6> 2024-01-10 08:26:00.398 +00:00 [INF] - Updated message store TTL to 7200 seconds
<6> 2024-01-10 08:26:00.398 +00:00 [INF] - Updated the edge hub store and forward configuration
<6> 2024-01-10 08:26:00.551 +00:00 [INF] - Updated reported properties for Arno-dev/$edgeHub
<4> 2024-01-10 08:27:13.667 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 79206572"
<6> 2024-01-10 08:30:17.959 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<4> 2024-01-10 08:31:14.708 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 3a488cc2"
<4> 2024-01-10 08:32:15.057 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 7f59e19c"
<4> 2024-01-10 08:34:17.347 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 73e8128d"
<6> 2024-01-10 08:35:17.329 +00:00 [INF] - Started task to cleanup processed and stale messages for endpoint iothub
<6> 2024-01-10 08:35:17.334 +00:00 [INF] - Cleaned up 0 messages from queue for endpoint iothub and 0 messages from message store.
<6> 2024-01-10 08:35:17.958 +00:00 [INF] - Entering periodic task to reauthenticate connected clients
<4> 2024-01-10 08:35:21.015 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 37368612"
<4> 2024-01-10 08:36:27.235 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 20939f9e"
<4> 2024-01-10 08:37:37.240 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 1e2411c6"
<4> 2024-01-10 08:38:47.745 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 6671ae08"
<4> 2024-01-10 08:39:57.755 +00:00 [WRN] - "TLS handshake failed., System.IO.IOException: Channel is closed, 79c2f250"
Additional Information
Please provide any additional information that may be helpful in understanding the issue.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (8 by maintainers)
Found the issue!
It was related to the TLS version used by the internal generated certificates. Mainly for the mqtt as far as I know. I’ve posed this generated certificated before.
Generated certificate used by mqtt
In here is clearly visible that the tls version is 1.2. Now this is where the issue lays. Our modules are running in .net8.0 on the docker
mcr.microsoft.com/dotnet/aspnet:8.0. As of this version of the docker tls lower then 1.3 is no longer supported (downgraded to security level 0). There are other people having the same issue with databases etc resulting in the same errorTLS handshake failed.We have validated that falling back to a docker and .net version <8.0 fixes this issue (tested on .net7.0). This is however not a long term solution since both 6.0 and 7.0 will be end of support by the end of this year