"Fatal error generating Agent's connection string"
See original GitHub issueIoT Edge edgeAgent fails with βFatal error generating Agentβs connection stringβ with this script https://docs.microsoft.com/en-us/azure/iot-edge/quickstart
System is Windows 10 Enterprise 1703 laptop
``
PS C:\WINDOWS\system32> Get-Service iotedge
Status Name DisplayName
------ ---- -----------
Running iotedge iotedge
PS C:\WINDOWS\system32> iotedge list
NAME STATUS DESCRIPTION CONFIG
PS C:\WINDOWS\system32> iotedge list
NAME STATUS DESCRIPTION CONFIG
PS C:\WINDOWS\system32> iotedge list
NAME STATUS DESCRIPTION CONFIG
edgeAgent running Up 0 seconds mcr.microsoft.com/azureiotedge-agent:1.0
PS C:\WINDOWS\system32> iotedge list
NAME STATUS DESCRIPTION CONFIG
edgeAgent running Up 4 seconds mcr.microsoft.com/azureiotedge-agent:1.0
PS C:\WINDOWS\system32> iotedge list
NAME STATUS DESCRIPTION CONFIG
edgeAgent running Up 5 seconds mcr.microsoft.com/azureiotedge-agent:1.0
PS C:\WINDOWS\system32> docker logs -f edgeAgent
[2018-07-03 10:17:11 : Starting Edge Agent
[07/03/2018 10:17:11.824 AM] Edge Agent Main()
2018-07-03 10:17:12.103 +00:00 [INF] - Starting module management agent.
2018-07-03 10:17:12.290 +00:00 [INF] - Version - 1.0.0.14487025
(52ef77db24126bf473265fc09c53d35290a2dd6b)
2018-07-03 10:17:12.291 +00:00 [INF] -
ββββββ βββββββββββ ββββββββββ ββββββββ
βββββββββββββββββββ βββββββββββββββββββ
ββββββββ βββββ βββ βββββββββββββββββ
ββββββββ βββββ βββ βββββββββββββββββ
βββ βββββββββββββββββββββββ βββββββββββ
βββ βββββββββββ βββββββ βββ βββββββββββ
βββ βββββββ βββββββββ βββββββββββββββ βββββββ ββββββββ
βββββββββββββββββββββ ββββββββββββββββββββββββ ββββββββ
ββββββ βββ βββ ββββββ βββ ββββββ ββββββββββ
ββββββ βββ βββ ββββββ βββ ββββββ βββββββββ
ββββββββββββ βββ βββββββββββββββββββββββββββββββββ
βββ βββββββ βββ βββββββββββββββ βββββββ ββββββββ
2018-07-03 10:17:12.447 +00:00 [INF] - Edge agent attempting to connect to IoT Hub via AMQP...
2018-07-03 10:17:13.119 +00:00 [INF] - Created persistent store at /tmp/edgeAgent
2018-07-03 10:17:18.442 +00:00 [WRN] - Empty edge agent config was received. Attempting to read config from backup file
(backup.json) instead
2018-07-03 10:17:18.451 +00:00 [INF] - Edge agent config backup file does not exist - backup.json
2018-07-03 10:17:28.476 +00:00 [WRN] - Empty edge agent config was received. Attempting to read config from backup file
(backup.json) instead
2018-07-03 10:17:28.476 +00:00 [INF] - Edge agent config backup file does not exist - backup.json
2018-07-03 10:17:38.482 +00:00 [WRN] - Empty edge agent config was received. Attempting to read config from backup file
(backup.json) instead
2018-07-03 10:17:38.483 +00:00 [INF] - Edge agent config backup file does not exist - backup.json
2018-07-03 10:17:42.510 +00:00 [INF] - Edge agent attempting to connect to IoT Hub via AMQP over WebSocket...
2018-07-03 10:17:43.523 +00:00 [INF] - Edge agent connected to IoT Hub via AMQP over WebSocket.
2018-07-03 10:17:44.439 +00:00 [INF] - Plan execution started for deployment 17
2018-07-03 10:17:44.466 +00:00 [INF] - Executing command: "Update and start module edgeAgent"
PS C:\WINDOWS\system32> docker logs -f edgeAgent
Error: No such container: edgeAgent
PS C:\WINDOWS\system32> docker logs -f edgeAgent
2018-07-03 10:18:02.761 +00:00 [INF] - Starting module management agent.
2018-07-03 10:18:02.938 +00:00 [INF] - Version - 1.0.0-preview022.11567621 (12a8e1bb63e619b17ca685efd470ad3f412034f4)
2018-07-03 10:18:02.939 +00:00 [INF] -
ββββββ βββββββββββ ββββββββββ ββββββββ
βββββββββββββββββββ βββββββββββββββββββ
ββββββββ βββββ βββ βββββββββββββββββ
ββββββββ βββββ βββ βββββββββββββββββ
βββ βββββββββββββββββββββββ βββββββββββ
βββ βββββββββββ βββββββ βββ βββββββββββ
βββ βββββββ βββββββββ βββββββββββββββ βββββββ ββββββββ
βββββββββββββββββββββ ββββββββββββββββββββββββ ββββββββ
ββββββ βββ βββ ββββββ βββ ββββββ ββββββββββ
ββββββ βββ βββ ββββββ βββ ββββββ βββββββββ
ββββββββββββ βββ βββββββββββββββββββββββββββββββββ
βββ βββββββ βββ βββββββββββββββ βββββββ ββββββββ
2018-07-03 10:18:02.958 +00:00 [FTL] - Fatal error generating Agent's connection string.
System.FormatException: Malformed Token
at Microsoft.Azure.Devices.Client.Extensions.CommonExtensionMethods.ToDictionary(String valuePairString, Char kvpDelimiter, Char kvpSeparator)
at Microsoft.Azure.Devices.Client.IotHubConnectionStringBuilder.Parse(String iotHubConnectionString)
at Microsoft.Azure.Devices.Client.IotHubConnectionStringBuilder.CreateWithIAuthenticationOverride(String iotHubConnectionString, IAuthenticationMethod authenticationMethod)
at Microsoft.Azure.Devices.Edge.Agent.Service.Program.<MainAsync>d__4.MoveNext()
PS C:\WINDOWS\system32>
``
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Azure Monitor Application Insights for Java
This article shows you how to configure Azure Monitor Application Insights for Java. Connection string and role name. Connection string and roleΒ ...
Read more >Failed to connect to database using user [XXXX] and ... - Search
This error could occur when the connection string is wrongly provided while configuring source database connection (in InformaticaΒ ...
Read more >Trying to connect to SQL Server using C# - Stack Overflow
I am trying to connect to SQL Server and get data. This is what I did, but it's not working: string connectionString; SqlConnection...
Read more >Inability to connect to database should be treated as fatal ...
Problem /Motivation Drupal tries to perform actions with database even when the connection to the database has failed.
Read more >Agent Deployment Fatal Error
Solved: We are new to ePolicy Orchestrator, and currently working on deploying to a basic set of PCs for testing and training. I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
Top Related Hashnode Post
No results found
Top GitHub Comments
Good catch, thanks! The deployment was using the old microsoft/azureiotedge-agent:1.0-preview image.
I was using Set Modules from within the Portal, fresh hub, fresh device, and a fresh install of the runtime, so I overlooked what I expected to be correct defaults. Iβm not 100% sure how the preview tag got in there, but things are working once I ensure we use the mcr.microsoft.com/azureiotedge-agent:1.0 image.
FWIW, my best guess at how I got the -preview tag is that I had an old entry from a bug bash in my hosts file, so might have hit a bad endpoint while using Set Modules.
Closing this issue as it looks to have been resolved. Iβve linked the blog article describing the migration procedure to the GA for future reference: https://azure.microsoft.com/en-us/blog/iot-edge-ga-migration/