Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Access error #304

Open
anan1213095357 opened this issue Oct 24, 2024 · 0 comments
Open

[Question] Access error #304

anan1213095357 opened this issue Oct 24, 2024 · 0 comments
Labels

Comments

@anan1213095357
Copy link

 if (!Directory.Exists(AppContext.BaseDirectory + "LettuceEncrypt"))
     Directory.CreateDirectory(AppContext.BaseDirectory + "LettuceEncrypt");
 builder.Services.AddLettuceEncrypt();
 builder.WebHost.UseKestrel(options =>
 {
     options.ListenAnyIP(2222, listenOptions => listenOptions.UseHttps());
 });
 if (Environment.GetEnvironmentVariable("REQUIR_CLIENT_CERT") == "true")
 {

     builder.WebHost.UseKestrel(k =>
     {
         var appServices = k.ApplicationServices;
         k.ConfigureHttpsDefaults(h =>
         {
             h.ClientCertificateMode = ClientCertificateMode.RequireCertificate;
             h.UseLettuceEncrypt(appServices);
         });
     });
 }
 if (Environment.GetEnvironmentVariable("CONFIG_KESTREL_VIA_CODE") == "true")
 {
     builder.WebHost.PreferHostingUrls(false);
     builder.WebHost.UseKestrel(k =>
     {
         var appServices = k.ApplicationServices;
         k.Listen(IPAddress.Any, 2222,
             o =>
                 o.UseHttps(h => h.UseLettuceEncrypt(appServices)));
     });
 }

fail: LettuceEncrypt.Internal.AcmeCertificateFactory[0]
Failed to validate ownership of domainName 'sanyouhe.cloud'. Reason: urn:ietf:params:acme:error:connection: 27.154.111.178: Timeout during connect (likely firewall problem), Code = BadRequest
fail: LettuceEncrypt.Internal.AcmeCertificateFactory[0]
Failed to validate ownership of domainName 'www.sanyouhe.cloud'. Reason: urn:ietf:params:acme:error:connection: 27.154.111.178: Timeout during connect (likely firewall problem), Code = BadRequest
fail: LettuceEncrypt.Internal.AcmeStates.ServerStartupState[0]
Failed to automatically create a certificate for sanyouhe.cloud
System.InvalidOperationException: Failed to validate ownership of domainName 'sanyouhe.cloud'
at LettuceEncrypt.Internal.AcmeCertificateFactory.ValidateDomainOwnershipAsync(IAuthorizationContext authorizationContext, CancellationToken cancellationToken)
at LettuceEncrypt.Internal.AcmeCertificateFactory.CreateCertificateAsync(CancellationToken cancellationToken)
at LettuceEncrypt.Internal.AcmeStates.BeginCertificateCreationState.MoveNextAsync(CancellationToken cancellationToken)
fail: LettuceEncrypt.Internal.AcmeCertificateLoader[0]
ACME state machine encountered unhandled error
System.InvalidOperationException: Failed to validate ownership of domainName 'sanyouhe.cloud'
at LettuceEncrypt.Internal.AcmeCertificateFactory.ValidateDomainOwnershipAsync(IAuthorizationContext authorizationContext, CancellationToken cancellationToken)
at LettuceEncrypt.Internal.AcmeCertificateFactory.CreateCertificateAsync(CancellationToken cancellationToken)
at LettuceEncrypt.Internal.AcmeStates.BeginCertificateCreationState.MoveNextAsync(CancellationToken cancellationToken)
at LettuceEncrypt.Internal.AcmeCertificateLoader.ExecuteAsync(CancellationToken stoppingToken)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant