dotnet-architecture / eShopOnContainers

Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 7, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor. Moved to https://github.com/dotnet/eShop.

Home Page:https://dot.net/architecture

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Databases not getting created while installing the Eshop application

rgandhi715 opened this issue · comments

I installed the eshop application on AKS cluster using the documentation provided on https://github.com/dotnet-architecture/eShopOnContainers/wiki/Deploy-to-Azure-Kubernetes-Service-(AKS)

However the Databses under SQL server were not created after installation.

Below are the logs for SQL-data containers:
Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'OrderingDb'
Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'IdentityDb'
Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'CatalogDb'
Login failed for user 'sa'. Reason: Failed to open the explicitly specified database 'WebhooksDb'

Then I created the all 4 Databases manually, then login and basket services started working. But the checkout services is throwing error:
image

Ordering API logs:
image

What are the steps to resolve this issue. And create databases while deploying the application?

Hi, I have also encountered the same issue (in M1 Mac Laptops).
There seems to be problem with SQL server on Mac (M1) so I changed it to azure-sql-edge
The fix which worked was -
In docker-compose.yml, docker-compose.windows.yml, docker-compose-tests.yml
Change the sqldata image-
sqldata:
image: mcr.microsoft.com/azure-sql-edge:latest

Remove all containers -
docker rm $(docker ps -aq)
Rebuild all containers -
docker-compose build --no-cache
Run -
docker-compose up

Thank you so much @SumanHansada for testing eShop and sharing your experience. I hope it will help users.

Hi @ rgandhi715, Could you please let me know if you are able to resolve your issue with the above-shared instructions?

Thank you @SumanHansada

Yes I was able to resolve the issue by the solution provided by @SumanHansada
Used Image: mcr.microsoft.com/azure-sql-edge:latest

Thank you so much @rgandhi715 for confirming. Thanks @SumanHansada. I am closing this issue now.