Azure / Azure/data-api-builder

[Bug]: Error message 'Could not initialize the engine with the runtime config file: dab-config.json' isn't clear enough

オープン
#2,260 コメント 7 件 リアクション 0 件 担当者 1 名 @abhishekkumams が担当を希望しています GitHub で見る
🛠️troubleshooting bug cri
主要言語
C#
スター
1.5k
フォーク
370
平均マージ
3日 22時間
マージ済み PR(30日)
9

説明

### What happened?

Running latest docker image with the provided example from here https://learn.microsoft.com/en-us/azure/data-api-builder/how-to-run-container
Only alteration I made was to the password in the file.
{
"$schema": "https://github.com/Azure/data-api-builder/releases/latest/download/dab.draft.schema.json",
"data-source": {
"database-type": "mssql",
"connection-string": "Server=host.docker.internal\\mssql,1433;Initial Catalog=Library;User Id=sa;Password=;TrustServerCertificate=true;"
},
"entities": {
"book": {
"source": "dbo.Books",
"permissions": [
{
"actions": [
"read"
],
"role": "anonymous"
}
]
}
}
}

Main issue is that the error message is too abstract in that it doesn't say anything useful to the 'end user' on what is the issue with the config file.

### Version

1.1.7

### What database are you using?

Azure SQL

### What hosting model are you using?

Container Apps, Custom Docker host

### Which API approach are you accessing DAB through?

REST, GraphQL

### Relevant log output

```Text
Starting the runtime engine...
Loading config file from dab-config.json.
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
No XML encryptor configured. Key {2abf94d1-f041-473a-9bbc-d440b03ca439} may be persisted to storage in unencrypted form.
fail: Azure.DataApiBuilder.Service.Startup[0]
Unable to complete runtime initialization. Refer to exception for error details.
System.NullReferenceException: Object reference not set to an instance of an object.
at Azure.DataApiBuilder.Core.Configurations.RuntimeConfigValidator.ValidateAppInsightsTelemetryConnectionString(RuntimeConfig runtimeConfig) in /_/src/Core/Configurations/RuntimeConfigValidator.cs:line 128
at Azure.DataApiBuilder.Core.Configurations.RuntimeConfigValidator.ValidateConfigProperties() in /_/src/Core/Configurations/RuntimeConfigValidator.cs:line 84
at Azure.DataApiBuilder.Service.Startup.PerformOnConfigChangeAsync(IApplicationBuilder app) in /_/src/Service/Startup.cs:line 602
fail: Azure.DataApiBuilder.Service.Startup[0]
Could not initialize the engine with the runtime config file: dab-config.json
info: Microsoft.Hosting.Lifetime[0]
Application is shutting down...
Unable to launch the Data API builder engine.
```

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。