meysamhadeli / booking-microservices

Practical microservices, built with .Net 8, DDD, CQRS, Event Sourcing, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
MIT License
941 stars 188 forks source link

unauthorized exception #284

Closed amrshah closed 7 months ago

amrshah commented 7 months ago

Hi I am trying to run this project on local machine using docker compose. The command fails with following message:

unauthorized: authentication required

this happens somewhere at pulling eventstore. I closed the terminal already, forgetting to copy the full log geenrated on running the command: docker-compose -f ./deployments/docker-compose/docker-compose.yaml up -d

I found this while digging out: https://github.com/EventStore/EventStore/issues/2706

Any insights please?

Thanks

amrshah commented 7 months ago

Here is the terminal output:

PS G:\DotNet\applications\booking-microservices> docker-compose -f ./deployments/docker-compose/docker-compose.yaml up -d
[+] Running 16/36
 - jaeger 5 layers [⠀⠀⠀⠀⠀]      0B/0B      Pulling                                                                                                                  452.5s
 - mongo 8 layers [⠀⠀⠀⠀⠀⠀⠀⠀]      0B/0B      Pulling                                                                                                                452.5s
 ! identity Warning                                                                                                                                                  10.8s
 ✔ eventstore 10 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                         450.3s
 - postgres 14 layers [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]      0B/0B      Pulling                                                                                                      452.5s
 ! passenger Warning                                                                                                                                                  8.3s
 - kibana 13 layers [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]      0B/0B      Pulling                                                                                                         452.4s
 ! booking Warning                                                                                                                                                   10.5s
 - grafana 10 layers [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]      0B/0B      Pulling                                                                                                           452.4s
 - rabbitmq 12 layers [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]      0B/0B      Pulling                                                                                                        452.4s
 - node_exporter 3 layers [⠀⠀⠀]      0B/0B      Pulling                                                                                                             452.4s
 ! flight Warning                                                                                                                                                     6.7s
 ! gateway Warning                                                                                                                                                    9.8s
 - prometheus 12 layers [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀]      0B/0B      Pulling                                                                                                      452.4s
 - elasticsearch 9 layers [⣷⠀⠀⠀⠀⠀⠀⠀⠀] 27.64MB/28.58MB Pulling                                                                                                       452.4s
unauthorized: authentication required
amrshah commented 7 months ago

Running the docker compose again and again after each fail; i was finally able to get rid of that error; Later I was stuck at getting this error:

DeadlineExceeded: DeadlineExceeded: mcr.microsoft.com/dotnet/aspnet:8.0-preview: failed to do request: Head "https://mcr.microsoft.com/v2/dotnet/aspnet/manifests/8.0-preview": proxyconnect tcp: dial tcp 192.168.65.1:3128: i/o timeout

Rebooted my machine and above error is gone and now the build is running but I'm getting many TimeOutExceptions.

e.g. like below:

 => => #   Failed to download package 'Microsoft.Extensions.Logging.Abstractions.7.0.0' from 'https://api.nuget.org/v3-
 => => # flatcontainer/microsoft.extensions.logging.abstractions/7.0.0/microsoft.extensions.logging.abstractions.7.0.0.
 => => # nupkg'.
 => => #   The download of 'https://api.nuget.org/v3-flatcontainer/microsoft.extensions.logging.abstractions/7.0.0/micr
 => => # osoft.extensions.logging.abstractions.7.0.0.nupkg' timed out because no data was received for 60000ms.
 => => #     Exception of type 'System.TimeoutException' was thrown.

Let's see if I'm finally able to build and run. Logging these info here for anyone else who might face same/similar issues

meysamhadeli commented 7 months ago

Hi, Problem fixed and I tested locally and also in Github Codespace and I didn't get any error. You can try to run docker-compose command in Github Codespace before running locally. maybe you have some problem in your local machine.