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

Pub-sub tutorial csharp-subscriber pod crash, running .NET8 in .NET7 container #1000

Closed
antontroshin opened this issue Mar 14, 2024 · 1 comment · Fixed by #1001
Closed

Comments

@antontroshin
Copy link
Contributor

Expected Behavior

When following the tutorial to run pub-sub in Kubernetes, during the deployment step, all applications are expected to start and be healthy.
https://github.com/dapr/quickstarts/tree/master/tutorials/pub-sub#deploy-assets

Actual Behavior

csharp-subscriber pods crash looping with the following error from pod

You must install or update .NET to run this application.

App: /app/csharp-subscriber.dll
Architecture: arm64
Framework: 'Microsoft.NETCore.App', version '8.0.0' (arm64)
.NET location: /usr/share/dotnet/

The following frameworks were found:
  7.0.16 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=8.0.0&arch=arm64&rid=debian.11-arm64

The project file has .NET target 8.0

<TargetFramework>net8.0</TargetFramework>

While docker uses .NET 7 base image.

FROM mcr.microsoft.com/dotnet/aspnet:7.0

Steps to Reproduce the Problem

Follow the pub-sub tutorial to run apps in Kubernetes
https://github.com/dapr/quickstarts/tree/master/tutorials/pub-sub#run-in-kubernetes

  1. Setup Redis
  2. Deploy assets
  3. Observe pods of csharp-subscriber crashing
  4. Observe log with kubectl logs deployments/csharp-subscriber
@sitistas
Copy link

sitistas commented Apr 8, 2024

One workaround is to use a previous version of the image, for my case the version 1.12 worked fine.
Just change the image field in the cshapr-subscriber.yaml file as follows:

...
        image: ghcr.io/dapr/samples/pubsub-csharp-subscriber:1.12
...

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

Successfully merging a pull request may close this issue.

2 participants