You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On this page, "Looking at the code", the steps fail. The web site throws an exception i think because it is trying to load kubernetes configuration. I set the environment variable at the command-line: ASPNETCORE_ENVIRONMENT=Development but it did not help.
STEPS:
Clone the repo
Open the project in Visual Studio Code and navigate to /Source/docker-compose.override.yml file in the Explorer window then right click and select 'Open in Terminal'
In the terminal run the command docker-compose build
In the terminal run the command docker-compose up
EXPECTED:
Web site loads along with API servers
ACTUAL:
Web site throws an exception per below output.
ERROR MESSAGE:
Starting source_middle-api_1 ... done
Starting source_website_1 ... done
Starting source_backend-api_1 ... done
Attaching to source_middle-api_1, source_website_1, source_backend-api_1 website_1 |
website_1 | Unhandled Exception: k8s.Exceptions.KubeConfigException: kubeconfig file not found at /root/.kube/config
website_1 | at k8s.KubernetesClientConfiguration.LoadKubeConfigAsync(FileInfo kubeconfig, Boolean useRelativePaths)
website_1 | at k8s.KubernetesClientConfiguration.LoadKubeConfig(FileInfo kubeconfig, Boolean useRelativePaths)
website_1 | at k8s.KubernetesClientConfiguration.BuildConfigFromConfigFile(FileInfo kubeconfig, String currentContext, String masterUrl, Boolean useRelativePaths)
website_1 | at AKSWebsite.Startup.ConfigureServices(IServiceCollection services) in /src/AKSWebsite/Startup.cs:line 52
website_1 | --- End of stack trace from previous location where exception was thrown ---
website_1 | at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
website_1 | at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
website_1 | at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
website_1 | at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
website_1 | at AKSWebsite.Program.Main(String[] args) in /src/AKSWebsite/Program.cs:line 17
middle-api_1 | : Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
middle-api_1 | User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
backend-api_1 | info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
backend-api_1 | User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
source_website_1 exited with code 139
middle-api_1 | Hosting environment: Development
middle-api_1 | Content root path: /app
middle-api_1 | Now listening on: http://[::]:80
middle-api_1 | Application started. Press Ctrl+C to shut down.
backend-api_1 | Hosting environment: Development
backend-api_1 | Content root path: /app
backend-api_1 | Now listening on: http://[::]:80
backend-api_1 | Application started. Press Ctrl+C to shut down.
The text was updated successfully, but these errors were encountered:
robcamer
changed the title
Web site fails to run when run locally
Web site throws exception in Startup.cs when run locally
Mar 2, 2020
Apologies for the issues you having there, I'm currently in the process of re-writing this workshop, and the docs are not fully up to date. I will update the docs to inform people of this.
On this page, "Looking at the code", the steps fail. The web site throws an exception i think because it is trying to load kubernetes configuration. I set the environment variable at the command-line: ASPNETCORE_ENVIRONMENT=Development but it did not help.
STEPS:
EXPECTED:
Web site loads along with API servers
ACTUAL:
Web site throws an exception per below output.
ERROR MESSAGE:
Starting source_middle-api_1 ... done
Starting source_website_1 ... done
Starting source_backend-api_1 ... done
Attaching to source_middle-api_1, source_website_1, source_backend-api_1
website_1 |
website_1 | Unhandled Exception: k8s.Exceptions.KubeConfigException: kubeconfig file not found at /root/.kube/config
website_1 | at k8s.KubernetesClientConfiguration.LoadKubeConfigAsync(FileInfo kubeconfig, Boolean useRelativePaths)
website_1 | at k8s.KubernetesClientConfiguration.LoadKubeConfig(FileInfo kubeconfig, Boolean useRelativePaths)
website_1 | at k8s.KubernetesClientConfiguration.BuildConfigFromConfigFile(FileInfo kubeconfig, String currentContext, String masterUrl, Boolean useRelativePaths)
website_1 | at AKSWebsite.Startup.ConfigureServices(IServiceCollection services) in /src/AKSWebsite/Startup.cs:line 52
website_1 | --- End of stack trace from previous location where exception was thrown ---
website_1 | at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
website_1 | at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
website_1 | at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()
website_1 | at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
website_1 | at AKSWebsite.Program.Main(String[] args) in /src/AKSWebsite/Program.cs:line 17
middle-api_1 | : Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
middle-api_1 | User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
backend-api_1 | info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
backend-api_1 | User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
source_website_1 exited with code 139
middle-api_1 | Hosting environment: Development
middle-api_1 | Content root path: /app
middle-api_1 | Now listening on: http://[::]:80
middle-api_1 | Application started. Press Ctrl+C to shut down.
backend-api_1 | Hosting environment: Development
backend-api_1 | Content root path: /app
backend-api_1 | Now listening on: http://[::]:80
backend-api_1 | Application started. Press Ctrl+C to shut down.
The text was updated successfully, but these errors were encountered: