Coder Social home page Coder Social logo

Connection refused about nginx-certbot HOT 4 CLOSED

wmnnd avatar wmnnd commented on July 23, 2024
Connection refused

from nginx-certbot.

Comments (4)

AmanL04 avatar AmanL04 commented on July 23, 2024 5

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!

from nginx-certbot.

melvinmajor avatar melvinmajor commented on July 23, 2024

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.

from nginx-certbot.

nathantau avatar nathantau commented on July 23, 2024

Having the same issue as above @melvinmajor

from nginx-certbot.

YoniSchirris avatar YoniSchirris commented on July 23, 2024

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

from nginx-certbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.