0

I have A-record on my server:

  1. 192.0.2.4 - my external ip (of course this is a example);
  2. master.example.org - A-record for this ip address

Command:

certbot certonly --webroot --agree-tos --email testcert@example.org -w /home/www/acme/ -d master.example.org -d www.master.example.org

My part of config (master.conf) in nginx configs:

server
{
    listen 192.0.2.4;
    listen 192.0.2.4:443 ssl;

    server_name www.master.example.org;

    expires -100;
    #ssl_certificate_key /etc/letsencrypt/live/master.example.org/privkey.pem;
    #ssl_certificate /etc/letsencrypt/live/master.example.org/fullchain.pem;

    error_page 403 @forbidden;
    error_page 404 @notfound;
    error_page 405 @notallowed;
    error_page 500 @internalerror;

    # letsencrypt
    location ~ ^/\.well-known/acme-challenge
    {
        auth_basic off;
        root /home/www/acme;
    }

Error, after generation of let's encrypt:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for master.example.org
http-01 challenge for www.master.example.org
Using the webroot path /home/www/acme for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. master.example.org (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://master.example.org/.well-known/acme-challenge/kCDuTttqcv1TchrOJy6HHwXtWMuWPkVfZxXMpWXAiXc: Connection refused

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: master.example.org
   Type:   connection
   Detail: Fetching
   http://master.example.org/.well-known/acme-challenge/kCDuTttqcv1TchrOJy6HHwXtWMuWPkVfZxXMpWXAiXc:
   Connection refused

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.

What i should do ? I am really tired, i am searching during a lot of time and i have not found answer, but i need generate this cert. Where i have error ?

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
Piduna
  • 541
  • 4
  • 12
  • 25
  • 'Connection Refused' would indicate that yes, your A record is resolving and a connection attempt is being processed, but it's failing the connection. Are you sure your web service is listening correctly? Check your configuration and ports. – Patrick Jan 31 '18 at 20:52
  • You should restart nginx. – Michael Hampton Jan 31 '18 at 21:00
  • 1
    Your server name is `www.master.example.org` but the error message speaks about `http://master.example.org` so not the same thing except if it is an artifact of your obfuscation... – Patrick Mevzek Feb 03 '18 at 02:22

0 Answers0