-
Notifications
You must be signed in to change notification settings - Fork 476
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
All the APIs showing Offline while working on docker containers #37
Comments
First, let me ask you why you have created all new docker and docker-compose files? The files I provide with the project work (as described on the Wiki). When I look at the files and the logging, my initial guess is that it has something to do with the host-names and ports used:
I would suggest to try to get it up & running with the provided docker and docker-compose files. Also check whether the API is running correctly. You can do this when you expose the API to localhost (also described on the Wiki page)? First you will need to check whether the API is running correctly. |
Thank you very much that you have take time to look into the issue. Actually i tried to learn by setting up myself to recreate the same project step by step to get into fine grained of the project so I that I can get detailed insight, I very much like your project therefore I have tried myself to reassemble the wonderful garage that you have constructed, Everything is the same besides some name changes like (customermanagementapi to customerapi). I created dockerfile and compose with the help of visual studio 2019 (Container Orchestrator Support). However i have tried to make sure all the configurations and settings are same so I can make it up and running. Initially I have exposed port 5000/tcp as per your settings, but when I open the web site and tried to browse it won't open therefore i have checked/inspected docker container image build configuration :-
No matter what port you exposed but image container ENV key-value pair always set to 80
I really don't understand how and where did this value come from: "ASPNETCORE_URLS=http://+:80". I have compared with your container image configurations and it is not the same. Your configuration file has additional line
I really don't know if this is the reason for some other but i can see the mismatch. Your docker container image configurations:-
Therefore it does not seem to request at http://customerapi:5000/api/customers rather then to http://localhost:5000/api/customer Since you asked where customer api was working or not, therefore I have checked when container are running and I was able to browse _http://localhost:5000/swagger/index.html _ I can add new customer to the sqlserver container database, and even http://localhost:5000/hc says Healthy As you have directed i cloned the project to make up and running however workshopmanagementapi does not open rather getting following error:-
|
Wow! I finally got it resolved, you know what this is utter painful. I was looking like a hell to go onto check everywhere, I finally got it to work. I know that docker-compose file has order of precedence to startup dependency services but docker file, horrible. I have compared may be hundred times with your docker file and other to make my configurations put in place where is it required but you know it is not the docker file wanted. When I posted for help no one has notice that, until last guy has mentioned about the order therefore I again check and reset the order like below and it works like charm:-
I was exposing port before publishing the app. But i have seen some of docker config files has port expose at the top just after FROM therefore I thought there might not have any order of precedence, but I was wrong! BTW I got it work now with one service customerapi and now I will work on other services and I believe I won't face this problem again and last but not the least can you check your WorkshopmanagementAPI some reason it gives me different error. I don't know as of now but I will try myself as well. Thanks for your help and guidance.. Cheers! |
Great to see that you found the problem. Regarding the WorkshopManagementAPI: when you retrieve a workshopplanning for a certain date and there is no existing WorkshopPlanning yet for that date, the API will return an HTTP status-code 404 - Not Found (see the Can you check whether this is the problem with the WorkshopManagementAPI? |
I found the problem and I have been tried to fix it, actually workshopmanagementapi tries to connect to the sqlserver database, however sqlserver database to become ready state take some times, therefore workshopmanagementapi throw an exception. Database connection resiliency does not seem working in this condition. Stack traces:-
Database connection resiliency policy seems not working as I have checked the stack traces completely it does not retry even once.
I really don't understand how come workshopmanagementapi is being started first then the customermanagementapi and vehiclemanagementapi even though this service has declared almost end of the all the services but still gets fired-up before these services. Thanks, |
I've looked at the code in the EnsureDatabase method and found the issue. It is the call to |
We are good now!! Thanks |
I have been working on this project for a while and started to deploy on docker containers, but having some issue while doing so, I hope you can give me some ideas about the problem. Docker compose build fine but does not render the pages as it should be. Following are my docker files setup :-
Formerly i have tried to apply docker file to all the projects but after having this problem I tried to start from a project rather than whole therefore, I have tried to recreate/reproduce the problem with a customer management project:-
Docker file CustomerManagement API
Launch settings.json
Docker file Web:-
Launch settings.json
Docker compose.yml file
docker-compose.override.yml file
When Refit (RestClient) try to fetch a record from the customerapi (GetCustomers) endpoint, where problem started to happen. I don't know how to step into other projects while debugging from docker compose. I have set a break point in couple of places but it won't hit the customerapi controller action method, since it is a micro-service being called by web front end. I have extracted following errors from a long lines of stack traces if you can help:-
I have tried to run your project but it also give me problem same at WorkshopmanagementAPI but it does display customer and vehicle api. I don't understand where is the problem. I have spent quite a bit time to do a research on it, but could not find any answer therefore i have posted for your help. Hope you won't mind it.
Thanks
The text was updated successfully, but these errors were encountered: