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

Connection refused #26

Closed
AndreasJJ opened this issue Jun 3, 2019 · 4 comments
Closed

Connection refused #26

AndreasJJ opened this issue Jun 3, 2019 · 4 comments

Comments

@AndreasJJ
Copy link

AndreasJJ commented Jun 3, 2019

Successfully built 584500ec72e1
Successfully tagged flask-docker-container-boilerplate_web:latest
WARNING: Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating flask-docker-container-boilerplate_web_1 ... done

### Deleting dummy certificate for meem.no ...

### Requesting Let's Encrypt certificate for meem.no ...
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for meem.no
http-01 challenge for www.meem.no
Using the webroot path /var/www/certbot for all unmatched domains.
Waiting for verification...
Challenge failed for domain meem.no
Challenge failed for domain www.meem.no
http-01 challenge for meem.no
http-01 challenge for www.meem.no
Cleaning up challenges
Some challenges have failed.

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

   Domain: meem.no
   Type:   connection
   Detail: Fetching
   http://meem.no/.well-known/acme-challenge/qPqfKmnb_0Khm89bPyQnywU7D1ufzMp0JUQ7nX6m69w:
   Connection refused

   Domain: www.meem.no
   Type:   connection
   Detail: Fetching
   http://www.meem.no/.well-known/acme-challenge/axhzfLr7JZtePGupyRW-zNPwuNYxb99txR7WKZXY8D8:
   Connection refused

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA 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.

### Reloading web ...
nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/meem.no/fullchain.pem") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/meem.no/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
@melvinmajor
Copy link

Hi, I have the same issue, how did you managed to correct it?
My NGINX Docker runs but impossible to have it accessible even though ports 80 and 443 are open.

@nathantau
Copy link

Having the same issue as above @melvinmajor

@YoniSchirris
Copy link

I'm also getting similar errors.

I have no more "example.org" in any of the files
I'm only testing for a single domain pointing to a static IP on a linux EC2 server where I run docker-compose
I've tried the exact steps in the medium tutorial, and I've taken the latest code from the github repo.
I've tried it with the proposed nginx server, and with my own set-up of my server which, if run by itself, works (but only over HTTP)

I have the feeling the server with docker-compose doesn't start correctly. But I have no idea how to check this or how to fix it

@AmanL04
Copy link

AmanL04 commented May 28, 2020

My setup: Running with upstream node apps.

The error I was getting when I ran ./init-letsencrypt.sh was always "Challenge failed for domain <domain-name>"

So I first mounted the nginx access and error logs to a volume and it always showed 1 of 2 things

1. nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/<domain-name>/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/etc/letsencrypt/live/<domain-name>/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
2. nginx: [emerg] host not found in upstream "auth" in /etc/nginx/sites-enabled/default.conf:13

-> The certificate error made sense as it did not exist and hence this error occured
-> The upstream error was the one I kept ignoring thinking it was due to certbot or nginx. But this in reality was the real error.

SOLUTION

My nginx server had no clue about the "auth" upstream as it would only be available when my docker service - "auth" would be up. So after a lot of ignoring the error, I just ran docker-compose up before the script and then ran the script.

Voila solved my issue.

Hope my stupidness helps others hours of googling. Cheers!

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

No branches or pull requests

5 participants