microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.02k stars 399 forks source link

Stateless ASP.NET Core Service using ASP.NET Core 3.0 make application unhealthy #548

Open heavenwing opened 4 years ago

heavenwing commented 4 years ago

Steps to Reproduce:

  1. Create a empty Stateless ASP.NET Core Service using ASP.NET Core 3.0
  2. Publish it into local 1node cluster
  3. This website is active and ready, can be accessed normally, but application instance is unhealthy

image

And, when I add PublishTrimmed into csproj file, website became notready.

MedAnd commented 4 years ago

@heavenwing - out of interest, are you also using gRPC? The community is missing a good reference example of .Net Core 3.0 stateful/stateless microservices using gRPC as opposed to Service Fabric Remoting....

Jameskami commented 4 years ago

I'd love to update to Core 3. I had no problem upgrading from 2 to 2.2, but 3.0 won't deploy a healthy service. And I can't access it either. @MedAnd where have you found an example of 3.0 stateful/stateless microservice without gRPC?

MedAnd commented 4 years ago

@Jameskami - unfortunately the existing Service Fabric samples have not been updated to .Net Core 3 although the team is aware of the ask. I do know some customers that have successfully been using .Net Core 3 with Azure Service Fabric however the tooling and process is not fully automated/painless as per above issue from @heavenwing.

PS. Looping in @masnider in case he can share any more info...

dbreshears commented 4 years ago

@heavenwing. We don't have any known issues with .NET core 3.0 services in the general case. I just tested a stateless and stateless web project on 16.3.6 + 6.5.676.9590 with and without PublishTrimmed on 1-node and runs fine. What versions of VS + SF runtime/sdk do you have installed? Any repro projects or fabric traces you can share?

Jameskami commented 4 years ago

@MedAnd So I was able to get a new stateless service (web) and an actor to work with core 3. It's just that it's very difficult to migrate an existing service

masnider commented 4 years ago

@heavenwing can you help us figure out your repro? @Jameskami can you provide more info about the steps you took and what was hard?

heavenwing commented 4 years ago

@masnider I tried to upgrade local cluster to latest version, this issue disappear. Also I tried to publish this empty Stateless ASP.NET Core Service into a production cluster (with old version, 6.5.639.9590) , it's working strangely.

Jameskami commented 4 years ago

@masnider Once I got it working I realized there's nothing in the way on the service fabric side. I just had to deal with libraries that core 2 was fine with but will silently fail and make the service unhealthy. For example, swagger seemed harmless enough, but it will make a stateless web service unhealthy until you upgrade to the preview