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

Running the Dashboard Docker Image #2248

Closed
christophwille opened this issue Feb 15, 2024 · 10 comments
Closed

Running the Dashboard Docker Image #2248

christophwille opened this issue Feb 15, 2024 · 10 comments

Comments

@christophwille
Copy link

docker pull mcr.microsoft.com/dotnet/nightly/aspire-dashboard:8.0.0-preview.3 
docker run --rm -it -p 18888:18888 -p 4317:18889  mcr.microsoft.com/dotnet/nightly/aspire-dashboard:8.0.0-preview.3

When going to http://localhost:18888/, I get the following (fail) output from the console:

info: Aspire.Dashboard[0]
      Now listening on: http://0.0.0.0:18888
info: Aspire.Dashboard[0]
      OTLP server running at: http://0.0.0.0:18889
warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
      Storing keys in a directory '/home/app/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed. For more information go to https://aka.ms/aspnet/dataprotectionwarning
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {26c8391a-bd95-4284-8b92-420a58964eee} may be persisted to storage in unencrypted form.
info: Aspire.Dashboard.Model.DashboardClient[0]
      DOTNET_RESOURCE_SERVICE_ENDPOINT_URL is not specified. Dashboard client services are unavailable.
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
      Unhandled exception rendering component: DashboardClient is disabled. Check the IsEnabled property before calling this.
      System.InvalidOperationException: DashboardClient is disabled. Check the IsEnabled property before calling this.
         at Aspire.Dashboard.Model.DashboardClient.EnsureInitialized() in /_/src/Aspire.Dashboard/Model/DashboardClient.cs:line 135
         at Aspire.Dashboard.Model.DashboardClient.Aspire.Dashboard.Model.IDashboardClient.get_WhenConnected() in /_/src/Aspire.Dashboard/Model/DashboardClient.cs:line 301
         at Aspire.Dashboard.Components.ApplicationName.OnInitializedAsync() in /_/src/Aspire.Dashboard/Components/Controls/ApplicationName.razor.cs:line 29
         at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'p7hax2t1XD7heIt-rX0VpvaxEmoNfU1vV8SGg8kDIC4'.
      System.InvalidOperationException: DashboardClient is disabled. Check the IsEnabled property before calling this.
         at Aspire.Dashboard.Model.DashboardClient.EnsureInitialized() in /_/src/Aspire.Dashboard/Model/DashboardClient.cs:line 135
         at Aspire.Dashboard.Model.DashboardClient.Aspire.Dashboard.Model.IDashboardClient.get_WhenConnected() in /_/src/Aspire.Dashboard/Model/DashboardClient.cs:line 301
         at Aspire.Dashboard.Components.ApplicationName.OnInitializedAsync() in /_/src/Aspire.Dashboard/Components/Controls/ApplicationName.razor.cs:line 29
         at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
warn: Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer[100]
      Unhandled exception rendering component: Cannot access a disposed object.
      System.ObjectDisposedException: Cannot access a disposed object.
         at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.GrowBuffer(Int32 desiredCapacity)
         at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
         at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
         at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
         at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'p7hax2t1XD7heIt-rX0VpvaxEmoNfU1vV8SGg8kDIC4'.
      System.ObjectDisposedException: Cannot access a disposed object.
         at Microsoft.AspNetCore.Components.RenderTree.ArrayBuilder`1.GrowBuffer(Int32 desiredCapacity)
         at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext& diffContext, Int32 newFrameIndex)
         at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext& diffContext, Int32 oldStartIndex, Int32 oldEndIndexExcl, Int32 newStartIndex, Int32 newEndIndexExcl)
         at Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.ComputeDiff(Renderer renderer, RenderBatchBuilder batchBuilder, Int32 componentId, ArrayRange`1 oldTree, ArrayRange`1 newTree)
         at Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(RenderBatchBuilder batchBuilder, RenderFragment renderFragment, Exception& renderFragmentException)
         at Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()

What am I missing? Should I be using a newer tag https://mcr.microsoft.com/v2/dotnet/nightly/aspire-dashboard/tags/list? Current tags as of writing this issue:

{
    "name": "dotnet/nightly/aspire-dashboard",
    "tags": [
        "8.0-preview",
        "8.0-preview-amd64",
        "8.0-preview-arm64v8",
        "8.0-preview-cbl-mariner-distroless",
        "8.0-preview-cbl-mariner-distroless-amd64",
        "8.0-preview-cbl-mariner-distroless-arm64v8",
        "8.0.0-preview.3",
        "8.0.0-preview.3-amd64",
        "8.0.0-preview.3-arm64v8",
        "8.0.0-preview.3-cbl-mariner-distroless",
        "8.0.0-preview.3-cbl-mariner-distroless-amd64",
        "8.0.0-preview.3-cbl-mariner-distroless-arm64v8",
        "8.0.0-preview.4",
        "8.0.0-preview.4-amd64",
        "8.0.0-preview.4-arm64v8",
        "latest"
    ]
}
@madhub
Copy link

madhub commented Feb 16, 2024

same here

@davidfowl
Copy link
Member

davidfowl commented Feb 16, 2024

There are bugs in the current dashboard image when run without a resource server. The image hasn't been updated since the original push (preview3). When we get another update it should be runnable as a standalone otlp server (preview4/latest)

cc @joperezr

@joperezr
Copy link
Member

I have a PR out to update it to a build from today: dotnet/dotnet-docker#5203

@radical
Copy link
Member

radical commented Feb 16, 2024

I have a PR out to update it to a build from today: dotnet/dotnet-docker#5203

Are these updates going to be automated?

@lbussell
Copy link

Are these updates going to be automated?

dotnet/dotnet-docker#5154

@christophwille
Copy link
Author

christophwille commented Feb 16, 2024

I can confirm that

docker pull mcr.microsoft.com/dotnet/nightly/aspire-dashboard:8.0.0-preview.4
docker run --rm -it -p 18888:18888 -p 4317:18889  mcr.microsoft.com/dotnet/nightly/aspire-dashboard:8.0.0-preview.4

Now works for logs & traces from a standard OTLP-exporting ASP.NET 8.0 application

image

Edit: my sample can be found at https://github.com/christophwille/OTel-de-Wille/tree/main/aspnet-aspiredashboard

@davidfowl
Copy link
Member

Excellent @christophwille !

@KalleOlaviNiemitalo
Copy link

@drewnoakes, I'm getting these "DashboardClient is disabled" errors when attempting to use Aspire.Dashboard.exe standalone as discussed in #1774 (comment). So I'll wait for preview4 then.

@drewnoakes
Copy link
Member

drewnoakes commented Feb 17, 2024

If you don't want to wait and just need a binary, you could build it yourself from this repo to test it out. Or try the docker image mentioned above.

@davidfowl
Copy link
Member

davidfowl commented Feb 17, 2024

@KalleOlaviNiemitalo use the preview 4 version of the image. Look at the command above

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

No branches or pull requests

8 participants