-
Notifications
You must be signed in to change notification settings - Fork 152
Add two troubleshooters #1249
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
Merged
Merged
Add two troubleshooters #1249
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e6fafd1
two troubleshooters
danmoseley 865e34b
typo
danmoseley 15e66e3
Apply suggestions from code review
danmoseley a6922f0
'feedback'
danmoseley 58131d8
trailing
danmoseley 2465f59
Update connection-string-missing.md
danmoseley 84842a0
Update container-runtime-unhealthy.md
danmoseley d2d9470
Update connection-string-missing.md
danmoseley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: The connection string is missing | ||
description: Learn how to troubleshoot the error "ConnectionString is missing" during execution of your app. | ||
ms.date: 07/03/2024 | ||
--- | ||
|
||
# The specified name is already in use | ||
|
||
## Symptoms | ||
|
||
When your app accesses a service that needs one of the components in your app, it may fail with an exception similar to the following: | ||
|
||
> "InvalidOperationException: ConnectionString is missing." | ||
|
||
## Possible solutions | ||
|
||
Verify that the name of the resource, for instance a database resource, is the same in the AppHost and the Service that fails. | ||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
For example, if the AppHost defines a PostgreSQL resource with the name db1 like this: | ||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```csharp | ||
var db1 = builder.AddPostgres("pg1").AddDatabase("db1"); | ||
``` | ||
|
||
Then the service needs to resolve the resource with the same name `db1`. | ||
|
||
```csharp | ||
var builder = WebApplication.CreateBuilder(args); | ||
|
||
builder.AddNpgsqlDbContext<MyDb1Context>("db1"); | ||
``` | ||
|
||
Any other value than the one provided in the AppHost will result in the exception message described above. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: Container runtime appears to be unhealthy | ||
description: Learn how to troubleshoot the error "Container runtime 'docker' was found but appears to be unhealthy" during execution of your app. | ||
ms.date: 07/03/2024 | ||
--- | ||
|
||
# Container runtime appears to be unhealthy | ||
|
||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Symptoms | ||
|
||
When starting the AppHost the dashboard doesn't show up and an exception stack trace similar to this example is displayed in the console: | ||
|
||
```sh | ||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
info: Aspire.Hosting.DistributedApplication[0] | ||
Aspire version: 8.1.0-dev | ||
info: Aspire.Hosting.DistributedApplication[0] | ||
Distributed application starting. | ||
info: Aspire.Hosting.DistributedApplication[0] | ||
Application host directory is: D:\aspire\playground\PostgresEndToEnd\PostgresEndToEnd.AppHost | ||
fail: Microsoft.Extensions.Hosting.Internal.Host[11] | ||
Hosting failed to start | ||
Aspire.Hosting.DistributedApplicationException: Container runtime 'docker' was found but appears to be unhealthy. The error from the container runtime check was error during connect: this error may indicate that the docker daemon is not running: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.45/containers/json?limit=1": open //./pipe/docker_engine: The system cannot find the file specified.. | ||
``` | ||
|
||
## Possible solutions | ||
|
||
Confirm that Docker is installed and running. | ||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* On Windows, check that in the system tray the Docker icon is present and marked as "Running". | ||
Check failure on line 29 in docs/troubleshooting/container-runtime-unhealthy.md
|
||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* On Linux, check that "docker ps -a" returns success. | ||
danmoseley marked this conversation as resolved.
Show resolved
Hide resolved
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.