Skip to content

Instantly share code, notes, and snippets.

@spboyer
Created May 2, 2018 18:20
Show Gist options
  • Save spboyer/b4ac4486fed3dda577d94f0d53eb0ca1 to your computer and use it in GitHub Desktop.
Save spboyer/b4ac4486fed3dda577d94f0d53eb0ca1 to your computer and use it in GitHub Desktop.
ASP.NET Core 2.1 - Docker HTTPS Kestrel Can't Start
$ docker-compose up                                                                                                                                            ✔  6490  13:46:10
Recreating namesweb_namesweb_1 ... done
Attaching to namesweb_namesweb_1
namesweb_1  | info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
namesweb_1  |       User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
namesweb_1  | info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[58]
namesweb_1  |       Creating key {85e4bc76-7e37-4d9b-98d7-487f7a9cd12e} with creation date 2018-05-02 17:48:29Z, activation date 2018-05-02 17:48:29Z, and expiration date 2018-07-31 17:48:29Z.
namesweb_1  | warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
namesweb_1  |       No XML encryptor configured. Key {85e4bc76-7e37-4d9b-98d7-487f7a9cd12e} may be persisted to storage in unencrypted form.
namesweb_1  | info: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[39]
namesweb_1  |       Writing data to file '/root/.aspnet/DataProtection-Keys/key-85e4bc76-7e37-4d9b-98d7-487f7a9cd12e.xml'.
namesweb_1  | crit: Microsoft.AspNetCore.Server.Kestrel[0]
namesweb_1  |       Unable to start Kestrel.
namesweb_1  | System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found.
namesweb_1  | To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
namesweb_1  | For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
namesweb_1  |    at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action`1 configureOptions)
namesweb_1  |    at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions)
namesweb_1  |    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)
namesweb_1  |    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
namesweb_1  |    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
namesweb_1  |
namesweb_1  | Unhandled Exception: System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found.
namesweb_1  | To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
namesweb_1  | For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
namesweb_1  |    at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action`1 configureOptions)
namesweb_1  |    at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions)
namesweb_1  |    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)
namesweb_1  |    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
namesweb_1  |    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
namesweb_1  |    at Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken cancellationToken)
namesweb_1  |    at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String shutdownMessage)
namesweb_1  |    at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)
namesweb_1  |    at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
namesweb_1  |    at namesweb.Program.Main(String[] args) in /src/Program.cs:line 18
namesweb_namesweb_1 exited with code 139
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment