-
Notifications
You must be signed in to change notification settings - Fork 161
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
Service is not register in Eureka because of Autofac #1186
Comments
Hi @xXAvoraXx, any chance you can provide a minimal app that reproduces the issue? At a glance, this looks like either the LoggerFactory isn't registered with AutoFac or there is an issue with retrieving the options |
Can you @TimHess check this repo -> https://github.com/xXAvoraXx/SteeltoeProject I have prepared a small demo version for you to review. |
@xXAvoraXx the project runs fine if you run it directly, it's only when you use docker compose that it fails. This output suggests the issue is that the Core project isn't included in the container:
|
How do I test it without running it in docker-compose? All our projects run on docker-compose, including prod. |
You can use |
Can you check the project again? I placed the "core" project in the Dockerfile.
|
The Autofac community was no help in this regard. I need your help. @TimHess |
Well, I've identified the issue. The fix is trivial and you can work around it by removing the trailing semicolon on this line A Thanks for the report! It's unfortunate the way this bug manifested, it really isn't clear why it all fails, but at least it's a simple fix. |
I'm really surprised :) I've been trying for 2 days because of a simple comma, I never thought of it. |
Describe the bug
I am trying to register my .net 7 web api application to eureka server, but I am getting the following error, why?
Code Explain
I use Autofac for service registrations, I make autofac configurations in a separate dotnet 7 library project. Even though I wrote the necessary configurations to connect to the Eureka service, I get an error.
Codes: CoreModule
Program.cs
appsettings.json config
Error Details
Steps to reproduce
Steps to reproduce the behavior:
1.
2.
Expected behavior
A clear and concise description of what you expected to happen.
Environment (please complete the following information):
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context or links
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: