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

[QUESTION] Please, answer +1 if the solution is working properly for you (Through VS2017 or CLI environment)

CESARDELATORRE opened this issue · comments

A small favor, can you answer +1 to this thread if the solution is working for you (Through VS2017 or CLI environment)? - Bits compilation-Deploy-Run in Docker.
We'd like to know if the environment/solution is working for most of the people or not.

Better if you specify what environment you are using, like answering any of the following:

+1 (VS2017)
+1 (CLI)
+1 (Both)

Answer with a -1 if you have issues and you couldn't make it work (compile/deploy/run to Docker), any of the following:

-1 (VS2017)
-1 (CLI)
-1 (Both)

We could create a survey, but we're not looking for specific statistics jus a sense of how it is working for the majority, and this way based on issues might be quicker for you guys than going to surveymonkey or anything like that.

Thank you! :)

commented

+1 (Windows CLI, on Win10 Entr, RAM 7GB, got a lot of problems with SQL Container, managed to make it work after assigning docker 4352 MB and freeing RAM) ... wondering what HW is required to develop seriously with containers in real world scenarios. Any points?

@kifjj That's why we mentioned to set at least 4096 MB of memory to Docker and recommend a 16GB ram machine in the setup instructions. Take into account that this is only because SQL Server container requirements in a dev or testing environment where you spin everything up as containers. In a real production environment it is recommended to take out the DBs from Docker and put your Databases in a High Available system like Azure SQL DBA or a SQL Server cluster, on-premises. So the memory you'd need for that would be less.
Your microservices using .NET Core need very small amounts of memory, so you can have many and that won't be, usually, the issue in dev-test environments.
For a development/testing Docker environment, a 16GB machine would be good for most of the scenarios. It depends on how many "infrastructure containers" (like SQL, Redis and others) you have included. But usually, 16GB would be good to go for most dev/test environments.
For production, it really depends how scalable you'll need your system to be. When using an orchestrator (not just Docker) like Docker Swarm, Kubernetes, Meals DCOS in Azure Container Service or using Azure Service Fabric, it will depend on how many instances per microservice-type you want to have for high scalability. Not just memory but number of VMs, as well.
In short, HW requirements? it really depends on how large is your application in regards infrastructure (that impacts dev/test) and how scalable you want it to be in production

+1 (Both environments, CLI & VS2017) - Windows 10 Enterprise, RAM 16GB. Testing on Multiple machines.
:)

Hi CESAR

I am getting timeout error when the MVC application first starts.
At: CatalogService.cs line 54.
dataString = await _apiClient.GetStringAsync(catalogUrl);

VS2017, windows 10 , 16GB RAM

Oops. It was docker memory i guess. I set it to 4096MB and it started working now. :)

+1 (VS2017) - Windows 10 Enterprise, RAM 16GB

I tried to install the solution to Server 2016 with VS2017 without success. There doesn't seem to be a suitable docker installation for Windows 2016. I tried to install docker via powershell but cannot find a way to perform necessary configuration as outlined in this document. The reason I want to use Windows 2016 is that I cannot create a windows 10 image in my azure subscription.

Also just realized that docker for windows will not work for Azure VMs. As such, is there a way to have the eShop sample app setup and running in Azure?

commented

@CESARDELATORRE thanks for your explanation. Everything makes sense, just a point I am missing.
Since in prod SQL Srv will not be in a container (which makes total sense) wouldn't be better to keep it out even in dev?

Hi @kifjj
One reason for using SQL Server in a container is for helping with managing external dependencies in development. We are not using only SQL Server but also Redis (in the Basket microservice), and RabbitMQ for microservice-to-microservice communication (still not in master branch but merged soon).
Forcing everyone to install and configure all these external dependencies would prevent most people to run the application. By using all these dependencies in Docker container you only need to pull the repo, build the images and everything is working fine.
Of course you can use SQL Server standalone: just update docker-compose files and everything should be fine :)

Thanks!

@kifjj @eiximenis Reasons given by eiximenis (Eduard) plus:
When using databases on containers that are spin-up and populated with the same sample data, that makes a perfect scenario for Integration-Tests, as the tests are predictable based on the same set of data.
However, you can of course have your databases on any regular SQL Server on-premises or Azure SQL DB. You'll just need to create the DB, change the connection-strings, and you're done. Even the sample data can be populated to those databases, too., as we do that with EF code.

One more point, you cannot use VMs in Azure for a DEVELOPMENT environment with "Docker for Windows" that would need a nested VM in Hyper-V, and that is not supported in Azure. However, you could, of course, deploy the containers to an Azure Linux VM that would be a Docker Linux host, for testing/production environment, but not development with Visual Studio, etc..

+1 VS17. Looks great.

+1 VS2017, Win 10.
By the way "ordering.api" depends on "sql.data", if anyone always fails with "PrepareForLaunch" task failed, pulling sql.data(microsoft/mssql-server-linux) blabla error, you can manually pull the image before debugging, using docker pull microsoft/mssql-server-linux.

+1 (CLI) mac

but when i try to check the web feature, there are some errors.

RAM: 8G

@geminiyellow What errors are you getting? - Remember, related to the Identity Authentication container based on IdentityServer4, when deploying from a Mac, you need to use the "production" docker-compose.prod.yml because the by default 10.0.75.1 IP is only available when using Docker for Windows.
Afaik that IP is not used in a Mac. So you need to explicitly set your external IP in the .env file at https://github.com/dotnet/eShopOnContainers/blob/master/.env

"localhost" won't work from the Mac when authenticating and the redirection because of that reason, you'll need to always use an specific IP when using the Mac.
In a real production system you would also use any specific DNS name for the Docker host or orchestrator DNS name.

+1 (VS2017) Win 10 Pro, RAM 16GB

+1 (Both) Windows 10 Pro, 32 GB RAM.

I did have to change the VS startup project to the Docker project (which wasn't mentioned in the 'main steps') but that's mentioned in the full instructions and was pretty clearly needed. :)

commented

+1 (VS2017)

commented

i want know that can Visual Studio for Mac 2017 run the solution ?

@dongdongmao Not currently. Probably in the future.
Visual Studio for Mac still doesn't support Docker containers as VS 2017 for Windows does.
What you could use is Visual Studio Code for Mac, as editor and using its Docker extension: https://code.visualstudio.com/docs/languages/dockerfile

Then, using Docker CLI like docker-compose build/up from bash to build images and to deploy the containers.

commented

+1 (CLI) mac

but when i click LOGIN an unhandled exception occurred while processing the request.

InvalidOperationException: IDX10803: Unable to obtain configuration from: 'http://10.0.75.1:5105/.well-known/openid-configuration'.
Microsoft.IdentityModel.Protocols.ConfigurationManagerd__24.MoveNext()

VS 2017
ERROR: for sql.data Cannot start service sql.data: driver failed programming external connectivity on endpoint dockercompose3536241391_sql.data_1 (e4672897e3ee71a9cbebcb666e9034ccca0d97d5756d18fe8275ba3331c51049): Error starting userland proxy: Bind for 0.0.0.0:5433: unexpected error Permission denied

@andrelmp Hey! Did you set up Docker Community (aka Docker for Windows) with the required amount of memory? - At least 4096 GB for Docker, as specified in the setting up instructions here:
https://github.com/dotnet/eShopOnContainers/wiki/02.-Setting-eShopOnContainer-solution-up-in-a-Visual-Studio-2017-environment

Also here:
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker

If you did, try re-starting Docker.. Looks like you are having an "environment issue".

Can you start any SQL Server container by itself? like the following Docker CLI commands:
docker pull microsoft/mssql-server-linux
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' -p 1433:1433 -d microsoft/mssql-server-Linux

You should probably face the same issue if you didn't set up the required memory for Docker.

wow that was fast! thank you @CESARDELATORRE
is exactly the memory issue on docker host

+1 for CLI (macOS). After having set Docker to 4GB RAM.

But when running docker container ls I get this - and I am missing the Basket API, right (according to https://github.com/dotnet/eShopOnContainers/wiki/03.-Setting-the-eShopOnContainers-solution-up-in-a-Windows-CLI-environment-(dotnet-CLI,-Docker-CLI-and-VS-Code)#testing-all-the-applications-and-microservices)?

image

BTW; when building the SPA, building the SPA with npm is successful.
But when executing docker-compose -f docker-compose.ci.build.yml up I get this error:

eShopOnContainers git:(dev) ✗ Docker-compose -f docker-compose.ci.build.yml up
Creating eshoponcontainers_ci-build_1
Attaching to eshoponcontainers_ci-build_1
ci-build_1  | /src/src/Web/WebSPA /src
ci-build_1  |
ci-build_1  | > node-sass@4.5.0 install /src/src/Web/WebSPA/node_modules/node-sass
ci-build_1  | > node scripts/install.js
ci-build_1  |
ci-build_1  | node-sass build Binary found at /src/src/Web/WebSPA/node_modules/node-sass/vendor/linux-x64-48/binding.node
ci-build_1  |
ci-build_1  | > node-sass@4.5.0 postinstall /src/src/Web/WebSPA/node_modules/node-sass
ci-build_1  | > node scripts/build.js
ci-build_1  |
ci-build_1  | Binary found at /src/src/Web/WebSPA/node_modules/node-sass/vendor/linux-x64-48/binding.node
ci-build_1  | Testing binary
ci-build_1  | Bus error
ci-build_1  |
ci-build_1  | npm ERR! Linux 4.9.13-moby
ci-build_1  | npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "rebuild" "node-sass"
ci-build_1  | npm ERR! node v6.10.0
ci-build_1  | npm ERR! npm  v3.10.10
ci-build_1  | npm ERR! code ELIFECYCLE
ci-build_1  | npm ERR! node-sass@4.5.0 postinstall: `node scripts/build.js`
ci-build_1  | npm ERR! Exit status 135
ci-build_1  | npm ERR!
ci-build_1  | npm ERR! Failed at the node-sass@4.5.0 postinstall script 'node scripts/build.js'.
ci-build_1  | npm ERR! Make sure you have the latest version of node.js and npm installed.
ci-build_1  | npm ERR! If you do, this is most likely a problem with the node-sass package,
ci-build_1  | npm ERR! not with npm itself.
ci-build_1  | npm ERR! Tell the author that this fails on your system:
ci-build_1  | npm ERR!     node scripts/build.js
ci-build_1  | npm ERR! You can get information on how to open an issue for this project with:
ci-build_1  | npm ERR!     npm bugs node-sass
ci-build_1  | npm ERR! Or if that isn't available, you can get their info via:
ci-build_1  | npm ERR!     npm owner ls node-sass
ci-build_1  | npm ERR! There is likely additional logging output above.
ci-build_1  |
ci-build_1  | npm ERR! Please include the following file with any support request:
ci-build_1  | npm ERR!     /src/src/Web/WebSPA/npm-debug.log
eshoponcontainers_ci-build_1 exited with code 1

@ChristianWeyer
Did you try to run this first from the CLI:
npm rebuild node-sass

before running the docker-compose -f docker-compose.ci.build.yml up ?

But that should be done from the compose execution…, too...

Can you create an issue specific for Mac environment so we track it down when possible?

Thanks for the feedback.

Created a new issue @CESARDELATORRE ;-)

Just got latest on master an now am seeing this:
image

@ardalis That var is defined at the .env file:
https://github.com/dotnet/eShopOnContainers/blob/master/.env
Which, by default should be set as localhost, see that in the file.

Are you getting that file when cloning the repo?

@CESARDELATORRE Yes, I have a .env file. I just switched to latest dev branch but see same behavior. The .env file has this in it:

ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost
ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92

But apparently it's not being read.

@ardalis Weird, try to reset Docker.. I just pulled the DEV branch and everything is working for me from VS 2017 after just hitting F5. Let's take it offline if it still doesn't work for you, ok?

-1 (VS2017) on Win10 Entr, RAM 32GB
when click on LOGIN after a while got this error:
An unhandled exception occurred while processing the request.
TaskCanceledException: A task was canceled.
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
IOException: IDX10804: Unable to retrieve document from: 'http://10.0.75.1:5105/.well-known/openid-configuration'.
Microsoft.IdentityModel.Protocols.HttpDocumentRetriever+d__8.MoveNext()
InvalidOperationException: IDX10803: Unable to obtain configuration from: 'http://10.0.75.1:5105/.well-known/openid-configuration'.
Microsoft.IdentityModel.Protocols.ConfigurationManager+d__24.MoveNext()

-1 CLI
When I run the command docker-compose -f docker-compose.ci.build.yml up I get an error in the end of the command:
ci-build_1 | /usr/share/dotnet/sdk/1.0.1/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Publish.targets(100,5): error MSB3030: Could not copy the file "/src/src/Web/WebSPA/wwwroot/dist/main.411b08094680fcce978b.bundle.js" because it was not found. [/src/src/Web/WebSPA/WebSPA.csproj]
ci-build_1 | /usr/share/dotnet/sdk/1.0.1/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Publish.targets(100,5): error MSB3030: Could not copy the file "/src/src/Web/WebSPA/wwwroot/dist/main.411b08094680fcce978b.bundle.map" because it was not found. [/src/src/Web/WebSPA/WebSPA.csproj]

@buzzfrog
Opening an issue ( #164 ) with that as it is an issue from the latest version of dotnet cli. This used to work for us.
It seems it is already fixed by our team (.NET team) and will be available in the next version, soon.

@richardrcruzc Did you follow the steps specified at the instructions in regards the Firewall ports needed to be opened so the Identity container can work properly?
See:
https://github.com/dotnet/eShopOnContainers/wiki/02.-Setting-eShopOnContainer-solution-up-in-a-Visual-Studio-2017-environment

Also, are you deploying to Docker for Windows or Docker for Mac?
The "external" IP: 10.0.75.1 only works in development environments using Docker for Windows.
It using Docker for Mac, you need to deploy following this setup:
https://github.com/dotnet/eShopOnContainers/wiki/09.-Deploying-eShopOnContainers-to-a-%22Production%22-environment

commented

If i want change database of this project to Mysql.What can I do?

@dongdongmao We're using Entity Framework Core, so you could use the MySQL Docker image (or a real MySQL server), then change the connection strings at the docker-compose.override.yml files. However, that might not be enough. Anything specific related to SQL Server (like the Hi/Lo pattern) should be migrated to a different implementation with MySQL.
I would start just with the Catalog microservice which is the simplest one. You can test it with Swagger by just using it from a browser at http://localhost:5101 so you can query the microservice, update, etc.
You can go to all the docker-compose yml files and remove anything which is not related to the Catalog microservice so you isolate your work on that initial microservice targeting MySQL.

Many package restore error. while opening in vs2017 community and windows 7. could you please have a look on this. i know ducker need windows 10 but atleast it build in windows 7

You need Windows 10 in order to run it on Docker Community Edition for Windows.

quick question will it need windows 10 to build the project? running the application is a different part. Can i migrate to this project to work without any ducker support? As it is a awesome project i just want to learn each part and do not want to miss due to my system limitation.

@babula38 - We haven't tested anything on Windows 8.x or Windows 7. But, without using Docker, you could migrate the projects to standalone Web API services, of course, since .NET Core and VS 2017 support Windows 8.x and Windows 7. Below you have the requirements for .NET Core and VS 2017:
.NET Core is supported on the following versions of Windows:
Windows 7 SP1
Windows 8.1
Windows 10
Windows Server 2008 R2 SP1 (Full Server or Server Core)
Windows Server 2012 SP1 (Full Server or Server Core)
Windows Server 2012 R2 SP1 (Full Server or Server Core)
Windows Server 2016 (Full Server, Server Core or Nano Server)

The requirements for VS 2017 are: Supported Operating Systems Visual Studio 2017 will install and run on the following operating systems: • Windows 10 version 1507 or higher: Home, Professional, Education, and Enterprise (LTSB is not supported) • Windows Server 2016: Standard and Datacenter • Windows 8.1 (with Update 2919355): Basic, Professional, and Enterprise • Windows Server 2012 R2 (with Update 2919355): Essentials, Standard, Datacenter • Windows 7 SP1 (with latest Windows Updates): Home Premium, Professional, Enterprise, Ultimate.

But, we cannot provide support other than to the versions we are testing which is eShopOnContainers running on Docker (and multiple orchestrators in the near future), ok?

commented

Another question.How to run this project by real moblie device.For example Android?

@dongdongmao Basically, you need some knowledge on Xamarin apps when using Visual Studio.
We have done some "light" documentation about the Xamarin app as this project's goals are more about the server side (microservices/containers), however, these are the links you need to take into account:

Xamarin app README:
https://github.com/dotnet/eShopOnContainers/blob/master/src/Mobile/README.md

Setting-up-the-Xamarin-mobile-app to use the Docker Containers/Microservices:
https://github.com/dotnet/eShopOnContainers/wiki/07.-Setting-up-the-Xamarin-mobile-apps

If not using the "mock feature" at the Xamarin app but you want to access the Docker containers for real, then, you need to deploy the containers and access them through your external IP or DNS name if deploying to a cluster. Related to that (external IP of the docker Host), read this:

https://github.com/dotnet/eShopOnContainers/wiki/09.-Deploying-eShopOnContainers-to-a-%22Production%22-environment

About simply deploying the Xamarin app to an Android device, you do it like any other Xamarin app, from Visual Studio, or debugging the Xamarin app with F5, etc.

commented

A problem confused me.I run this project (CLI mac) before and it worked.Now a new problem arises,
i just use docker-compose up but i found the eshop/basket.api not run as a container so i click the button [add to cast] it cant work, and i found this exception below.

Unhandled Exception: RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable
---> RabbitMQ.Client.Exceptions.ConnectFailureException: Connection failed ---> System.Net.Internals.SocketExceptionFactory+ExtendedSocketE
xception: Connection refused 172.18.0.2:5672

@dongdongmao Related to this issue: #157
Yes. This is something that started in the Mac environment (not in Windows) when we added the Event Hub based on a RabbitMQ container. It is caused by the fact that when starting all the containers, in the Mac environment the RabbitMQ container must start not soon enough for the client containers/microservices. For any reason, that is not happening when starting in Docker for Windows.
In any case, this is something we need to fix, we need to make the RabbitMQ connections resilient, so if for any reason it can't connect (when starting or even partial failures in the cloud) we need to implement retry with exponential backoff logic in the client apps.
As a temporal workaround, you could start the RabbitMQ container first (with docker run or a different docker-compose file only for that container) then start the rest of the application with docker-compose (without having the RabbitMQ container in the global docker-compose files).
Please, confirm if that was your issue. We'll reply here when this is fixed.

commented

@CESARDELATORRE but why it can work before? and how can i run RabbitMQ first?

@dongdongmao Not sure if the version you were testing previously was not including the Event Bus and RabbitMQ container as that is something we've developed recently.
In order to run the RabbitMQ container first you'd need to remove it from the global docker-compose files and deploy it independently before deploying the whole solution.
In any case, we're in the process of fixing this resiliency issue so it should be working in a few days, early next week, probably.

commented

@CESARDELATORRE Hi,I have a problem about database of microservice container. For example if i want to show databases of SQL Server, how can i connect to it and is there any tools can help?

You can do it the same way, using SQL SERVER MANAGEMEMT STUDIO. You just need to change the connection parameters, using the external IP of the Docker host. Make sure the firewall is not closing the used port, neither.
Take a look

+1 vs2017 win 10 pro

+1 VS2017 Win 10 Enterprise with 12 GB RAM

I've managed to run through the CLI environment using Ubuntu 16 and VS Code, but I couldn't debug it. Is that possible to debug inside a container using VS Code on Linux?

Nope, in order to directly debug on the Containers you need Visual Studio 2017 on Windows. As of today.

commented

I've managed to run through the CLI Mac and then run Docker-compose -f docker-compose.ci.build.yml up this error happend:

ci-build_1 | ERROR in /src/src/Web/WebSPA/node_modules/extract-text-webpack-plugin/loader.js??ref--10-0!/src/src/Web/WebSPA/no
de_modules/style-loader/index.js!/src/src/Web/WebSPA/node_modules/css-loader/index.js?{"sourceMap":false,"importLoaders":1}!/src/

src/Web/WebSPA/node_modules/postcss-loader/index.js!/src/src/Web/WebSPA/node_modules/sass-loader/index.js!/src/src/Web/WebSPA/nod
e_modules/bootstrap/scss/bootstrap.scss doesn't export content

Hi dongdongmao,
Could you please execute the following command to remove packages and cache and do reinstall?

rimraf node_modules
npm cache clean
npm install

Thanks.

commented

image

I am getting the following error
An unhandled exception occurred while processing the request.

CurlException: Couldn't connect to server
System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)

HttpRequestException: An error occurred while sending the request.
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

HttpRequestException: An error occurred while sending the request.
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult()
System.Net.Http.HttpClient+d__58.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http.ResilientHttpClient+<>c__DisplayClass8_0+<b__0>d.MoveNext() in C:\eShopOnContainers\src\BuildingBlocks\Resilience\Resilience.Http\ResilientHttpClient.cs
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.eShopOnContainers.BuildingBlocks.Resilience.Http.ResilientHttpClient+d__10.MoveNext() in C:\eShopOnContainers\src\BuildingBlocks\Resilience\Resilience.Http\ResilientHttpClient.cs
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.eShopOnContainers.WebMVC.Services.CatalogService+d__5.MoveNext() in C:\eShopOnContainers\src\Web\WebMVC\Services\CatalogService.cs
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
System.Runtime.CompilerServices.TaskAwaiter.GetResult()
Microsoft.eShopOnContainers.WebMVC.Controllers.CatalogController+d__2.MoveNext() in C:\eShopOnContainers\src\Web\WebMVC\Controllers\CatalogController.cs
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__27.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__25.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__22.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker+d__20.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Builder.RouterMiddleware+d__4.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+d__18.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+d__18.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+d__18.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware+d__18.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+d__7.MoveNext()

Do you get this error after refreshing the browser after you wait a couple of minutes so the Containers are all started?
Or are you always getting this error even if you wait for the containers to start?

+1 CLI
On Kubernetes setup, I added bower to requiredCommands.

$requiredCommands = ("docker", "docker-compose", "kubectl", "bower")

SPA still failing with url value cannot be null but still investigating the issue.
image

+1 VS2017 The build hung pulling library/rabbitmq. Can't stop the build, can't close VS2017.... I started again, did the npm stuff fro WebSPA, sorted out some Docker Config and it's all up & running. Good job guys.... looking forward to playing with this ......

+1 (VS2017) Looking Good!

commented

-1 (VS2017)

I run into 2 problems with eShopOnContainers-ServicesAndWebApps.sln that I managed to work around. Hopefully this info helps someone.

NuGet package restore issue

Auto NuGet package restore in VS2017 that kicks in as soon as I open the solution is unable to complete due to the following error. This sometimes prevents VS from completing the restore and, in turn, from building or running the solution. The screenshot only shows some of the projects that fail.

Error occurred while restoring NuGet packages: The operation failed as details for project ... could not be loaded.

nuget

As a workaround, as per this I added the following to NuGet.config and auto package restore does not start anymore. I can run dotnet restore now and the solution works from there.

  <packageRestore>
    <add key="enabled" value="False" />
  </packageRestore>

NPM and Bower package restore issue

VS2017 comes bundled with outdated Node, NPM and Bower. This makes NPM and Bower package restore that also kicks in when you load the solution slow and unable to complete. You also get warnings in the Output window like the one below.

npm WARN engine @angular/cli@1.0.0: wanted: {"node":">= 6.9.0","npm":">= 3.0.0"} (current: {"node":"5.4.1","npm":"3.3.4"})

One workaround is to disable auto package restore for NPM and Bower in VS settings:

npm-bower-1

But since I have my own Node (with global NPM and Bower among other packages) installed that I tend to keep up to date, I prefer to use that. To do so I only needed to disable the external web tools bundled with VS like this:

npm-bower-2

Now auto package restore for NPM and Bower can be re-enabled and works fine.

Dev machine

Tested on a machine powered by a 6-core CPU at 3.3 GHz, 16GB RAM and a SATA III SSD. Running Visual Studio Community 2017 version 15.2 (26430.13) with NuGet Package Manager version 4.2.0. Only installed 2 workflows: ASP.NET and web development and .NET Core cross-platform development. Default settings. No own extensions installed.

Hello colleagues,
Don't know what's wrong. I've got docker running, I have configured it according to instructions. Trying to run Docker-compose - build hangs infinitely on the first pulling step (doesn't matter if I run it from VS or command line):
1>Building webstatus 1>Step 1/6 : FROM microsoft/aspnetcore:1.1.2 1>1.1.2: Pulling from microsoft/aspnetcore

Another issue comes up when I'm trying to launch a complete solution (including mobile), I see the error:
The "CreateAdditionalLibraryResourceCache" task failed unexpectedly (from eShopOnContainers.TestRunner.Droid project)
Am I missed to install something?

@command0r Do not launch the global solution as you will have incompatibilities with the Android emulator which is not compatible with Hyper-V needed by Docker.
As stated in the Wiki and procedures, use the Open solution eShopOnContainers-ServicesAndWebApps.sln
solution.
If you want to test the Xamarin app, you have 3 choices:

  1. Just use the Xamarin app in "mock data" mode that we have in the app, no access to real microservices.
    or
  2. Deploy the services to a different/remote Docker Host and then you can use the Google Android Emulator after disabling Hyper-V
    or
  3. Deploy to a real Android or iPhone device

Finally, about the "docker-compose -build"... it is weird if it is also failing from Visual Studio 2017.
sometimes when building within the build container from the CLI there are issues. But building with VS2017 should work.
If it hangs when pulling the image, looks like you have any network issue?

Can you do this so you download the images in advanced to your local repo?:
Command Prompt:
docker pull microsoft/aspnetcore:1.1.2

That should pull/download the image so it'll be ready in your local repo afterwards. Then, try again.

Hi Cesar,

Thanks for your prompt reply. I've been to your session on MSBuild conference last month btw, it was awesome. My personal experience on the desktop computer is not that good so far (concerning the compute power, it's not an issue, as I have Intel 4.7Ghz, quad core, 32Gb RAM), no obvious network issues, as everything else is working fine. It is all clear about Xamarin, thank you for the detailed answer. Docker pull doesn't work even if I run pull from the command line, please see the screenshot below:
2017-06-14
Never seen anything like that, download process just hangs at some point, so I have to restart the session all over again. I have disabled WF and all possible background processes along with antivirus software - It doesn't help. Is there any way I can trace down what's wrong with the network (if it's a network issue).
I plan to spin up a VM in Azure and try there as well.
In reverse, it worked just fine on my Macbook. I was able to run it from the console from the first attempt.
By the way, any ideas when Docker support for Mac version of VS will be available?
(sorry for the offtopic).

Alex

@command0r Really weird. First time I see that Docker CLI issue in a Windows machine with Docker. If a regular docker pull image doesn't work for you, then you have some kind of Windows machine issue or network issue. Maybe there's a firewall in your company that is not allowing some special communication with Docker Hub? - In any case, this issue doesn't have anything to do with our development, as you'll suppose.
I'll suggest to try the same actions with Docker in a different network, at home, etc. or with a different Windows computer? (if you're saying that with a Mac works, then looks like the issue is with your specific Windows machine, it might have special Windows Domain policies?), try with a clean Windows machine out of any Windows Domain, etc...

Docker support in VS for Mac, supporting deploying and debugging of .NET Core and ASP.NET Core in Docker containers will come soon in the ALPHA channel. :)

This is just not proxy aware un-fortunately like most tech comming out these days making me wonder if Iam the only one that works behind a proxy !!! The project builds fine but wont run when I hit F5 as it runs into a proxy error. I get the error (see below) on the Docker Compose project.

I tried these things :

  1. Set Proxy credentials on the docker settings
  2. set http_proxy and https_proxy env variables.
  3. And finally out of desperation tried this as well --> https://stackoverflow.com/a/12634725

But no joy so far!

I suspect I need to edit Dockerfile or docker-compose.yaml files to pass proxy creds in clear text ?

--- Error Details ---

The remote server returned an error: (407) Proxy Authentication Required

Severity Code Description Project File Line Suppression State Error MSB4018 The "EnsureVsDbgExists" task failed unexpectedly. System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote server returned an error: (407) Proxy Authentication Required. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) --- End of inner exception stack trace --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.DotNet.Docker.BuildTasks.VsDbgHelper.<>c__DisplayClass3_0.<<DownloadGetVsDbgPSScriptAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.DotNet.Docker.BuildTasks.VsDbgHelper.<EnsureLatestVsDbgAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 185

@sg1970 This is related to your Docker environment configuration since you need to use a proxy.
Basically, you need to have access to https://hub.docker.com/ in order to pull/download the base Docker images.
You can try to manually pull/download the base images you see on every dockerfile, or the infrastructure containers, like running the following Docker CLI commands from the command prompt (once Docker is installed):

docker pull microsoft/aspnetcore:1.1.2
docker pull microsoft/mssql-server-linux
docker pull mongo
docker pull redis
docker pull rabbitmq

Here's some info about it, from Docker:
Proxy configuration
If you are behind an HTTP proxy server, for example in corporate settings, before open a connect to registry, you may need to configure the Docker daemon’s proxy settings, using the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables. To set these environment variables on a host using systemd, refer to the control and configure Docker with systemd for variables configuration.

Also, see this thread at stackoverflow
https://stackoverflow.com/questions/23111631/cannot-download-docker-images-behind-a-proxy

I cannot test it because we don't use any traditional proxy in MSFT Corpnet.
In any case, you are experiencing a Docker environment problem, so please, research in Docker's sites, as Docker CLI does support to work with proxies, ok?
Thank you.

@CESARDELATORRE Thanks for the quick response. Greatly appreciate that !

  1. I have access to docker hub (thru the same corporate proxy)
  2. I can manually download the images from command prompt (see logs below)
  3. So I was able to successfully pull all Docker images you listed

But still stuck with the same Proxy ... It just wont run thru Visual Studio !

I realize that it has nothing to do with your code (Works from home) but something to think about.

---Manual Docker Pull ---
C:\>docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
d4w/nsenter latest 9e4f13a0901e 9 months ago 83.8 kB

C:\>docker pull microsoft/aspnetcore:1.1.2
1.1.2: Pulling from microsoft/aspnetcore
9f0706ba7422: Pull complete
8c906b05891b: Pull complete
7378286116c1: Pull complete
6c5e797d4ef1: Pull complete
b660c1be1245: Pull complete
Digest: sha256:8dc2cad5c561aaf44fdc963f5cd8ac36e53b52dae595a50b4212930cca533b5a
Status: Downloaded newer image for microsoft/aspnetcore:1.1.2

C:\>docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
microsoft/aspnetcore 1.1.2 7a07a406c6af About an hour ago 305 MB
d4w/nsenter latest 9e4f13a0901e 9 months ago 83.8 kB

C:\>

@sg1970 Interesting... If it is about Visual Studio and not really about Docker CLI, I'll ping the VS Docker Tools team guys. What is your email? Please, send me an email to CESARDL at Microsoft.com so I copy you into the thread I'll open with the VS Docker Tools team guys.

Hi, I'm experiencing the same problem as @richardrcruzc, namely the following exception when I click the Login link:

IOException: IDX10804: Unable to retrieve document from: 'http://10.0.75.1:5105/.well-known/openid-configuration'.

As @CESARDELATORRE suggested, I followed the setup guide for Windows and used the add-firewall-rules-for-sts-auth-thru-docker.ps1 script to setup the local firewall (by the way it seems that in-bound AND out-bound rules are required since the script is adding both of them). However, the mvc app (http://localhost:5100) can't see the Identity API (which is correctly responding at the http://10.0.75.1:5105/.well-known/openid-configuration url).

Any ideas/suggestions?

@timotyweis and @richardrcruzc Just in case, can you create the Firewall rules by yourself instead of using the PowerShell script? Also, can you check that you have the IP 10.0.75.1 set up for you after you installed Docker for Windows? Check that out with ipconfig, for instance.
It really looks like the firewall is stopping it.
As final test, try disabling the firewall temporally, just for the test and to isolate the issue.

@CESARDELATORRE than you for the answer.
The IP is set up and enabled:

Ethernet adapter vEthernet (DockerNAT):
Connection-specific DNS Suffix  . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : 00-15-5D-3C-6A-01
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.0.75.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
				    fec0:0:0:ffff::2%1
				    fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

I deleted and recreated the firewall rules (I also tried to allow edge traversal) but nothing changed.

Then I disabled the firewall completely and everything appeared to work, so your thoughts are indeed correct. However, i found in the docker forums that also other users had problems under Windows using Hyper-V and the only solution was to disable the firewall completely (suboptimal in my opinion)....

Question: wouldn't be possible to setup IdentityServer in such a way that the internal resolution will be done via http://identity.api but the external via http://localhost:5105 or http://10.0.75.1?

Hi @timotyweis

Then I disabled the firewall completely and everything appeared to wor

Same happens to me. I added firewall rules, then everything went fine. But few days and some restarts later I started to see this error. :(

Now I need to disable firewall to work. As you said there are other users that are having this issue :(

Hey guys, I'm having the same problems as @jduartex .

System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
System.Net.Http.CurlHandler+MultiAgent.FinishRequest(StrongToWeakReference easyWrapper, CURLcode messageResult)

Any idea why this might be happening? I'm on the master branch. It seems to be throwing this exception from just about every service.

Same as @timotyweis here. Turning firewall is not an option at all, any advices?

+1 (VS2017)
-1 (CLI)

Windows 10 Enterprise - 16GB RAM

PS C:\Temp\eShopOnContainers> docker-compose -f docker-compose.ci.build.yml up Starting eshoponcontainers_ci-build_1 ... Starting eshoponcontainers_ci-build_1 ... done Attaching to eshoponcontainers_ci-build_1 ci-build_1 | /src/src/Web/WebSPA /src ci-build_1 | ci-build_1 | > node-sass@4.5.3 install /src/src/Web/WebSPA/node_modules/node-sass ci-build_1 | > node scripts/install.js ci-build_1 | ci-build_1 | node-sass build Binary found at /src/src/Web/WebSPA/node_modules/node-sass/vendor/linux-x64-48/binding.node ci-build_1 | ci-build_1 | > node-sass@4.5.3 postinstall /src/src/Web/WebSPA/node_modules/node-sass ci-build_1 | > node scripts/build.js ci-build_1 | ci-build_1 | Binary found at /src/src/Web/WebSPA/node_modules/node-sass/vendor/linux-x64-48/binding.node ci-build_1 | Testing binary ci-build_1 | Binary is fine ci-build_1 | node-sass@4.5.3 /src/src/Web/WebSPA/node_modules/node-sass ci-build_1 | /src ci-build_1 | /cli-linux /src ci-build_1 | /bin/bash: ./build-bits-linux.sh: /bin/bash^M: bad interpreter: No such file or directory eshoponcontainers_ci-build_1 exited with code 126

@pmsousa please, I made a few fixes for using the CLI. Please, confirm if it works for you now.
These commits:

e017008

5588515

Thanks,
Cesar.

Regarding the firewall problems, I solved it by disabling an inbound rule called "vpnkit". It specifically blocks C:\program files\docker\docker\resources\vpnkit.exe on public networks. And somehow my network is currently identified as public. In fact I have four rules called "vpnkit", and disabling the one that blocks TCP on public networks was enough. You still need the rules added by the Powershell script as well.

So, +1 VS2017!

Hi, I'm using VS2017 and still new with this docker stuff. I've follow the instructions on wiki, but I'm getting an error The "PrepareForLaunch" task failed unexpectedly...

Should I configure the .env file or docker-compose.yml with my own settings?

Thanks.

-----Error Details-----
Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: The ESHOP_AZURE_STORAGE_CATALOG_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_CATALOG_KEY variable is not set. Defaulting to a blank string.
The ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_KEY variable is not set. Defaulting to a blank string.
Creating network "dockercompose3557121983_default" with the default driver
Building webstatus
Building locations.api
Building payment.api
Building graceperiodmanager
Building identity.api
Building basket.api
Building webspa
Building marketing.api
Building ordering.api
Building catalog.api
Building webmvc
Creating dockercompose3557121983_basket.data_1 ...
Creating dockercompose3557121983_nosql.data_1 ...
Creating dockercompose3557121983_sql.data_1 ...
Creating dockercompose3557121983_rabbitmq_1 ...
Creating dockercompose3557121983_webstatus_1 ...
Creating dockercompose3557121983_nosql.data_1
Creating dockercompose3557121983_basket.data_1
Creating dockercompose3557121983_sql.data_1
Creating dockercompose3557121983_rabbitmq_1
Creating dockercompose3557121983_webstatus_1
�[1A�[2K
Creating dockercompose3557121983_sql.data_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_sql.data_1 Cannot start service sql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_sql.data_1 (289aa371b17c67723457229960ef35194ba09331b2030cc6dbf7c8f7fc8e247c): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5433:tcp:172.21.0.2:1433: input/output error
�[1A�[2K
Creating dockercompose3557121983_webstatus_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_webstatus_1 Cannot start service webstatus: driver failed programming external connectivity on endpoint dockercompose3557121983_webstatus_1 (8dae4b2e4160117389f9f080c31ab0e7585b0f2b934f1023310cc9a7979567d6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5107:tcp:172.21.0.3:80: input/output error
�[1A�[2K
Creating dockercompose3557121983_basket.data_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_basket.data_1 Cannot start service basket.data: driver failed programming external connectivity on endpoint dockercompose3557121983_basket.data_1 (a50b713df5ddbc9a00e5016cb7ef98518b7de794a71df684cad009fbacad1927): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.21.0.4:6379: input/output error
�[1A�[2K
Creating dockercompose3557121983_rabbitmq_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_rabbitmq_1 Cannot start service rabbitmq: driver failed programming external connectivity on endpoint dockercompose3557121983_rabbitmq_1 (091c817509d904e1f5b30391bb05a63e6a4d873664908aa2bdb80687fd44f394): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5672:tcp:172.21.0.2:5672: input/output error
�[1A�[2K
Creating dockercompose3557121983_nosql.data_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_nosql.data_1 Cannot start service nosql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_nosql.data_1 (2bbafa382790fe2094b1863066b3a6d19cf24a0664c5b9335c43c19e0e59a817): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:27017:tcp:172.21.0.3:27017: input/output error
ERROR: for webstatus Cannot start service webstatus: driver failed programming external connectivity on endpoint dockercompose3557121983_webstatus_1 (8dae4b2e4160117389f9f080c31ab0e7585b0f2b934f1023310cc9a7979567d6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5107:tcp:172.21.0.3:80: input/output error
ERROR: for sql.data Cannot start service sql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_sql.data_1 (289aa371b17c67723457229960ef35194ba09331b2030cc6dbf7c8f7fc8e247c): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5433:tcp:172.21.0.2:1433: input/output error
ERROR: for nosql.data Cannot start service nosql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_nosql.data_1 (2bbafa382790fe2094b1863066b3a6d19cf24a0664c5b9335c43c19e0e59a817): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:27017:tcp:172.21.0.3:27017: input/output error
ERROR: for rabbitmq Cannot start service rabbitmq: driver failed programming external connectivity on endpoint dockercompose3557121983_rabbitmq_1 (091c817509d904e1f5b30391bb05a63e6a4d873664908aa2bdb80687fd44f394): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5672:tcp:172.21.0.2:5672: input/output error
ERROR: for basket.data Cannot start service basket.data: driver failed programming external connectivity on endpoint dockercompose3557121983_basket.data_1 (a50b713df5ddbc9a00e5016cb7ef98518b7de794a71df684cad009fbacad1927): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.21.0.4:6379: input/output error
Encountered errors while bringing up the project..

For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: The ESHOP_AZURE_STORAGE_CATALOG_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_CATALOG_KEY variable is not set. Defaulting to a blank string.
The ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_KEY variable is not set. Defaulting to a blank string.
Creating network "dockercompose3557121983_default" with the default driver
Building webstatus
Building locations.api
Building payment.api
Building graceperiodmanager
Building identity.api
Building basket.api
Building webspa
Building marketing.api
Building ordering.api
Building catalog.api
Building webmvc
Creating dockercompose3557121983_basket.data_1 ...
Creating dockercompose3557121983_nosql.data_1 ...
Creating dockercompose3557121983_sql.data_1 ...
Creating dockercompose3557121983_rabbitmq_1 ...
Creating dockercompose3557121983_webstatus_1 ...
Creating dockercompose3557121983_nosql.data_1
Creating dockercompose3557121983_basket.data_1
Creating dockercompose3557121983_sql.data_1
Creating dockercompose3557121983_rabbitmq_1
Creating dockercompose3557121983_webstatus_1
�[1A�[2K
Creating dockercompose3557121983_sql.data_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_sql.data_1 Cannot start service sql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_sql.data_1 (289aa371b17c67723457229960ef35194ba09331b2030cc6dbf7c8f7fc8e247c): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5433:tcp:172.21.0.2:1433: input/output error
�[1A�[2K
Creating dockercompose3557121983_webstatus_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_webstatus_1 Cannot start service webstatus: driver failed programming external connectivity on endpoint dockercompose3557121983_webstatus_1 (8dae4b2e4160117389f9f080c31ab0e7585b0f2b934f1023310cc9a7979567d6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5107:tcp:172.21.0.3:80: input/output error
�[1A�[2K
Creating dockercompose3557121983_basket.data_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_basket.data_1 Cannot start service basket.data: driver failed programming external connectivity on endpoint dockercompose3557121983_basket.data_1 (a50b713df5ddbc9a00e5016cb7ef98518b7de794a71df684cad009fbacad1927): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.21.0.4:6379: input/output error
�[1A�[2K
Creating dockercompose3557121983_rabbitmq_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_rabbitmq_1 Cannot start service rabbitmq: driver failed programming external connectivity on endpoint dockercompose3557121983_rabbitmq_1 (091c817509d904e1f5b30391bb05a63e6a4d873664908aa2bdb80687fd44f394): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5672:tcp:172.21.0.2:5672: input/output error
�[1A�[2K
Creating dockercompose3557121983_nosql.data_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3557121983_nosql.data_1 Cannot start service nosql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_nosql.data_1 (2bbafa382790fe2094b1863066b3a6d19cf24a0664c5b9335c43c19e0e59a817): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:27017:tcp:172.21.0.3:27017: input/output error
ERROR: for webstatus Cannot start service webstatus: driver failed programming external connectivity on endpoint dockercompose3557121983_webstatus_1 (8dae4b2e4160117389f9f080c31ab0e7585b0f2b934f1023310cc9a7979567d6): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5107:tcp:172.21.0.3:80: input/output error
ERROR: for sql.data Cannot start service sql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_sql.data_1 (289aa371b17c67723457229960ef35194ba09331b2030cc6dbf7c8f7fc8e247c): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5433:tcp:172.21.0.2:1433: input/output error
ERROR: for nosql.data Cannot start service nosql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_nosql.data_1 (2bbafa382790fe2094b1863066b3a6d19cf24a0664c5b9335c43c19e0e59a817): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:27017:tcp:172.21.0.3:27017: input/output error
ERROR: for rabbitmq Cannot start service rabbitmq: driver failed programming external connectivity on endpoint dockercompose3557121983_rabbitmq_1 (091c817509d904e1f5b30391bb05a63e6a4d873664908aa2bdb80687fd44f394): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5672:tcp:172.21.0.2:5672: input/output error
ERROR: for basket.data Cannot start service basket.data: driver failed programming external connectivity on endpoint dockercompose3557121983_basket.data_1 (a50b713df5ddbc9a00e5016cb7ef98518b7de794a71df684cad009fbacad1927): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:6379:tcp:172.21.0.4:6379: input/output error
Encountered errors while bringing up the project.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerWorkspace.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 192

@CESARDELATORRE I've pulled the latest version and CLI it's still not working (uploaded log from the build container).

build.txt

[SOLVED] Now, I'm also having problems (VS2017) with the Ordering Microservices connecting to SQL Server container, although SQL Server instance is accessible (tested with SSMS). Still debugging the issue...

Thanks,
Pedro

@danuanindito No, you don't need to configure the AZURE env-vars for a local Docker deployment in your dev machine.
Those are just warnings. Those AZURE env-vars are only needed if you want to deploy resoruces (DBs, Service Bus, etc.) in Azure.
Looks like an issue with the SQL container:
ERROR: for dockercompose3557121983_sql.data_1 Cannot start service sql.data: driver failed programming external connectivity on endpoint dockercompose3557121983_sql.data_1 (289aa371b17c67723457229960ef35194ba09331b2030cc6dbf7c8f7fc8e247c): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:5433:tcp:172.21.0.2:1433: input/output error

Please, make sure you configured Docker assigning the minimum amount of memory, etc. following all the steps described here:
https://github.com/dotnet-architecture/eShopOnContainers/wiki/02.-Setting-eShopOnContainers-in-a-Visual-Studio-2017-environment

-1 (VS2017), Windows 10, 16 GB RAM

Compile error while trying to run Docker project using VS2017

@vinothbellie What compilation error are you getting?
We're testing the solution on a daily basis so a compilation error in VS2017 might be related to the dev environment. What specific compilation error are you getting?

@CESARDELATORRE thank you for your reply. I have configure docker by assigning the minimum amount of memory, etc. But I still get an error. It is shown at this file:

..\eShopOnContainers\src\Services\Identity\Identity.API\Startup.cs

with pop up:

An exception of type 'System.AggregateException' occurred in System.Private.CoreLib.ni.dll but was not handled in user code occurred

at line:

public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
...
InitializeGrantStoreAndConfiguration(app).Wait();
...
}

I'm using Windows 10, 16GB RAM
Any idea why this might be happening?

Thanks.

image

I am getting compile error when I try to run Docker Compose startup project.

Using VS2017 Community, 16 Gig RAM and Windows 10 Pro

Severity Code Description Project File Line Source Suppression State
Error MSB4018 The "PrepareForLaunch" task failed unexpectedly.
Microsoft.DotNet.Docker.CommandLineClientException: The ESHOP_AZURE_STORAGE_CATALOG_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_CATALOG_KEY variable is not set. Defaulting to a blank string.
The ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_KEY variable is not set. Defaulting to a blank string.
Creating network "dockercompose3674721571_default" with the default driver
Building webstatus
Building locations.api
Building payment.api
Building graceperiodmanager
Building identity.api
Building basket.api
Building webspa
Building marketing.api
Building ordering.api
Building catalog.api
Building webmvc
Creating dockercompose3674721571_sql.data_1 ...
Creating dockercompose3674721571_nosql.data_1 ...
Creating dockercompose3674721571_basket.data_1 ...
Creating dockercompose3674721571_rabbitmq_1 ...
Creating dockercompose3674721571_webstatus_1 ...
Creating dockercompose3674721571_sql.data_1
Creating dockercompose3674721571_nosql.data_1
Creating dockercompose3674721571_basket.data_1
Creating dockercompose3674721571_rabbitmq_1
Creating dockercompose3674721571_webstatus_1
�[1A�[2K
Creating dockercompose3674721571_sql.data_1 ... �[32mdone�[0m
�[1B�[1A�[2K
Creating dockercompose3674721571_basket.data_1 ... �[32mdone�[0m
�[1B�[1A�[2K
Creating dockercompose3674721571_webstatus_1 ... �[32mdone�[0m
�[1B�[1A�[2K
Creating dockercompose3674721571_rabbitmq_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3674721571_rabbitmq_1 Cannot start service rabbitmq: driver failed programming external connectivity on endpoint dockercompose3674721571_rabbitmq_1 (d81e7cd1744baab5b7bd2a1e36402b92fad0c96f745d85e4f17365c198fa7cf9): Error starting userland proxy: Bind for 0.0.0.0:5672 failed: port is already allocated
Creating dockercompose3674721571_identity.api_1 ...
�[1A�[2K
Creating dockercompose3674721571_nosql.data_1 ... �[32mdone�[0m
�[1BCreating dockercompose3674721571_identity.api_1
�[1A�[2K
Creating dockercompose3674721571_identity.api_1 ... �[32mdone�[0m
�[1B
ERROR: for rabbitmq Cannot start service rabbitmq: driver failed programming external connectivity on endpoint dockercompose3674721571_rabbitmq_1 (d81e7cd1744baab5b7bd2a1e36402b92fad0c96f745d85e4f17365c198fa7cf9): Error starting userland proxy: Bind for 0.0.0.0:5672 failed: port is already allocated
Encountered errors while bringing up the project..

For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting ---> Microsoft.DotNet.Docker.CommandLineClientException: The ESHOP_AZURE_STORAGE_CATALOG_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_CATALOG_KEY variable is not set. Defaulting to a blank string.
The ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_KEY variable is not set. Defaulting to a blank string.
Creating network "dockercompose3674721571_default" with the default driver
Building webstatus
Building locations.api
Building payment.api
Building graceperiodmanager
Building identity.api
Building basket.api
Building webspa
Building marketing.api
Building ordering.api
Building catalog.api
Building webmvc
Creating dockercompose3674721571_sql.data_1 ...
Creating dockercompose3674721571_nosql.data_1 ...
Creating dockercompose3674721571_basket.data_1 ...
Creating dockercompose3674721571_rabbitmq_1 ...
Creating dockercompose3674721571_webstatus_1 ...
Creating dockercompose3674721571_sql.data_1
Creating dockercompose3674721571_nosql.data_1
Creating dockercompose3674721571_basket.data_1
Creating dockercompose3674721571_rabbitmq_1
Creating dockercompose3674721571_webstatus_1
�[1A�[2K
Creating dockercompose3674721571_sql.data_1 ... �[32mdone�[0m
�[1B�[1A�[2K
Creating dockercompose3674721571_basket.data_1 ... �[32mdone�[0m
�[1B�[1A�[2K
Creating dockercompose3674721571_webstatus_1 ... �[32mdone�[0m
�[1B�[1A�[2K
Creating dockercompose3674721571_rabbitmq_1 ... �[31merror�[0m
�[1B
ERROR: for dockercompose3674721571_rabbitmq_1 Cannot start service rabbitmq: driver failed programming external connectivity on endpoint dockercompose3674721571_rabbitmq_1 (d81e7cd1744baab5b7bd2a1e36402b92fad0c96f745d85e4f17365c198fa7cf9): Error starting userland proxy: Bind for 0.0.0.0:5672 failed: port is already allocated
Creating dockercompose3674721571_identity.api_1 ...
�[1A�[2K
Creating dockercompose3674721571_nosql.data_1 ... �[32mdone�[0m
�[1BCreating dockercompose3674721571_identity.api_1
�[1A�[2K
Creating dockercompose3674721571_identity.api_1 ... �[32mdone�[0m
�[1B
ERROR: for rabbitmq Cannot start service rabbitmq: driver failed programming external connectivity on endpoint dockercompose3674721571_rabbitmq_1 (d81e7cd1744baab5b7bd2a1e36402b92fad0c96f745d85e4f17365c198fa7cf9): Error starting userland proxy: Bind for 0.0.0.0:5672 failed: port is already allocated
Encountered errors while bringing up the project.
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of inner exception stack trace ---
at Microsoft.DotNet.Docker.DockerComposeClient.d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.DockerWorkspace.d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.DotNet.Docker.BuildTasks.DockerBaseTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext() docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft\VisualStudio\v15.0\Docker\Microsoft.VisualStudio.Docker.Compose.targets 192 Build

@vinothbellie
Seems than some other program is using the port 5672.

First, ensure that you don't have any docker container running with this port mapped. Type docker ps from CLI and ensure that there is no container using the host port 5672.

If not, maybe any other program is using this port on your machine. From CLI type nestat -fb and look for any "local entry" with the 5672 port and you'll found which executable is using the port.

Thanks Eiximenis - I was running Erlang in port 5672 and it solved the original port mapping issue.

However, when I try to run the Docker Compose, getting the below error.

Starting: "docker" exec -i b2e92a57f8f5 /clrdbg/vsdbg/vsdbg --interpreter=mi
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: starting container process caused "exec: "/clrdbg/vsdbg/vsdbg": stat /clrdbg/vsdbg/vsdbg: no such file or directory"
"docker" exited with code 126 (0x7E).

+1 Works now.

The issues were:

  1. The account for local drive mapping had some issues after restarting to factory settings
  2. The port 5672 was mapped to Erlang

+1 (VS2017)

It works now. I have to reconfigure the connection string, since I changed the password of user "sa"

Im trying to deploy using kubernetes. I had this working in the past but have started from scratch and deploy.ps1 now requires:

[parameter(Mandatory=$true)][string]$configFile,

What does configFile refer to?

Thanks

Hi @chriscooper87

This parameter refers to the configuration file that contains the externalcfg config map. Is used to allow deployments of k8s for different environments (i.e. having sql or redis in Azure).

For a "standard" deployment (when all containers run in k8s) use -configFile ./conf_local.yml

For more info: https://github.com/dotnet-architecture/eShopOnContainers/wiki/10.-Setting-the-solution-up-in-ACS-Kubernetes#configmaps or in https://github.com/dotnet-architecture/eShopOnContainers/blob/master/k8s/README.k8s.md

Thx

following this tutorial to get started: link

executing: docker-compose build

result:
Building ordering.api
Step 1/6 : FROM microsoft/aspnetcore:1.1.2
---> 580052551fbc
Step 2/6 : ARG source
---> Using cache
---> e131aa5caff4
Step 3/6 : WORKDIR /app
---> Using cache
---> cc0325a6e9fc
Step 4/6 : EXPOSE 80
---> Using cache
---> 08b2859e9190
Step 5/6 : COPY ${source:-obj/Docker/publish} .
ERROR: Service 'ordering.api' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder441200074/obj/Docker/publish: no such file or directory

+1 (VS 2017), Windows 10 pro, 32 GB RAM.

Only hiccup I faced was during the SPA build. npm install enhanced-resolve@3.3.0 cleared it up for me.

-1 (VS2017)
[...]
ERROR: for dockercompose859346032_payment.api_1 Cannot start service payment.api: error while creating mount source path '/C/Users/AndreasLundgren/Documents/GitHub/eShopOnContainers/src/Services/Payment/Payment.API': mkdir /C/Users/AndreasLundgren/Documents: permission denied
[...]

And a bunch more similiar permission denied messages. Running visual studio as admin makes no difference and giving permission to all users to these folders also makes no difference.

Might be a docker problem rather than visual studio problem though.

UPDATE 1:
So if anyone else has the same issue this turned out to be caused by the (utterly insane) way admin permission works in windows 10. If you create a new user to run docker drive sharing as (which is required on windows 10 when using for instance an azure AD account) then even if you give that account admin rights that doesn't actually give it access to other users user-folder. My own in this case. So you have to explicity give that user permission even though it's an admin user.

Still can't actually run the store though but this at least fixes the permission issue above.

@alundgren Looks like a Docker environment issue.

Greetings, I followed instructions and when run eShopOnContainers-ServicesAndWebApps.sln, I get following error
[...]
Severity Code Description Project File Line Suppression State
Error The ESHOP_AZURE_STORAGE_CATALOG_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_CATALOG_KEY variable is not set. Defaulting to a blank string.
The ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_NAME variable is not set. Defaulting to a blank string.
The ESHOP_AZURE_STORAGE_MARKETING_KEY variable is not set. Defaulting to a blank string.
The DOCKER_BUILD_SOURCE variable is not set. Defaulting to a blank string.
Creating network "dockercompose16838645363011213331_default" with the default driver
Building webstatus
Service 'webstatus' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder932816264/obj/Docker/publish: no such file or directory.

For more troubleshooting information, go to http://aka.ms/DockerToolsTroubleshooting docker-compose C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Sdks\Microsoft.Docker.Sdk\build\Microsoft.VisualStudio.Docker.Compose.targets 346
[...]

Can you help me what is the issue here? Thanks.

Hi everyone 👍 Which tutorial do you recommend, where I can build such applications (or less extensive) from scratch?