Impossible de configurer https avec letsencrypt

Bonjour,
Suite à un crash de ma carte mémoire, j’ai réinstallé jeedom avec le fichier image.
J’ai suivi le tuto (https://doc.jeedom.com/fr_FR/howtoadvance/letsencrypt.mise_en_place) pour activer le https.
Cependant, j’ai une erreur avec cette ligne de commande : ./letsencrypt-auto --help
Erreur : bash: ./letsencrypt-auto: Aucun fichier ou dossier de ce type

quand je fais un ls du dossier letsencrypt, j’ai ceci :

*root@jeedom:/opt/letsencrypt# ls*
*acme                        certbot-dns-dnsmadeeasy  certbot-nginx            mypy.ini*
*AUTHORS.md                  certbot-dns-gehirn       CHANGELOG.md             pytest.ini*
*certbot                     certbot-dns-google       CODE_OF_CONDUCT.md       README.rst*
*certbot-apache              certbot-dns-linode       CONTRIBUTING.md          snap*
*certbot-ci                  certbot-dns-luadns       docker-compose.yml       tests*
*certbot-compatibility-test  certbot-dns-nsone        Dockerfile-dev           tools*
*certbot-dns-cloudflare      certbot-dns-ovh          letsencrypt-auto-source  tox.cover.py*
*certbot-dns-cloudxns        certbot-dns-rfc2136      letstest                 tox.ini*
*certbot-dns-digitalocean    certbot-dns-route53      LICENSE.txt              windows-installer*
*certbot-dns-dnsimple        certbot-dns-sakuracloud  linter_plugin.py*

Vous pouvez m’aiguiller ? (je n’y connais pas grand chose à linux…)

Merci

Bonjour,
a tu essayer en mode administrateur
ou
sudo ./letsencrypt-auto --help

Si non tu a cet excellent tutoriel qui pourra t’aider
https://youdom.net/2020/02/09/generer-un-certificat-lets-encrypt-sur-apache/

1 « J'aime »

Oui je suis bien en admin, le souci vient du fait que le fichier semble inexistant… Tuto jeedom pas à jour ?

J’ai trouvé également un autre tuto un peu sur l’exemple du tien mais je rencontre également un soucis que j’ai du mal à identifier :
Certbot failed to authenticate some domains (authenticator: apache). The Certifi cate Authority reported these problems:

Hint: The Certificate Authority failed to verify the temporary Apache configurat ion changes made by Certbot. Ensure that the listed domains point to this Apache server and that it is accessible from the internet.

Le lien que je t’ai donner fonctionne et a été tester ici par pleins de membre si tu le suis précisément.

Bonjour,

Indépendamment du tuto utilisé est-ce que les ports 443 ET 80 dont bien ouverts et redirigés vers Jeedom ?

1 « J'aime »

c’est indiqué … dans le tuto

Prérequis :

être propriétaire d’un domaine.
Créer un enregistrement dns A qui pointe vers son Adresse IP Public.
faire une translation du port 80 et 443 vers son serveur web ou reverse proxy.

Salut Olive. Je n’en doutais pas :wink:.

Bonjour,
Merci pour vos retours.
Oui je suis bien propriétaire du domaine et les ports sont bien redirigés (je précise que cela fonctionnait avant le crash de la carte SD). Si on tente le http cela fonctionne.

Je viens de re-essayer le tuto de youdom. J’obiens cette erreur…

root@jeedom:/home/jeedom# certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
/etc/letsencrypt/options-ssl-apache.conf has been manually modified; updated fil e saved to /usr/lib/python3/dist-packages/certbot_apache/options-ssl-apache.conf . We recommend updating /etc/letsencrypt/options-ssl-apache.conf for security pu rposes.
Plugins selected: Authenticator apache, Installer apache
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter ‹ c › to cancel): maison.bebelcyl.fr
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for maison.bebelcyl.fr
Enabled Apache rewrite module
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. maison.bebelcyl.fr (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://maison.bebelcyl.fr/.well-known/acme-challenge/hfbMNcVDUaHWLofhkip_sJ6DsP2Yuw6zVixeMdXMf6w: Error getting validation data

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: maison.bebelcyl.fr
    Type: connection
    Detail: Fetching
    http://maison.bebelcyl.fr/.well-known/acme-challenge/hfbMNcVDUaHWLofhkip_sJ6DsP2Yuw6zVixeMdXMf6w:
    Error getting validation data

    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.

dans ta gestion de domaine et de sous domaine tu a bien une ligne qui ressemble à cela ?

maison 14400 CNAME is an alias of bebelcyl.fr

Il me semble (je ne suis pas un spécialiste dans le A/CNAME…

C’est directement le sous domaine que je renvoi sur mon ip

non ton champ A
c’est

A bebelcyl.fr IP
puis un champs
CNAME maison qui est un alias de bebelcyl.fr

ok je viens de recreer un A vec bebelcyl.fr sur l’ip
et un cname de maison.bebelcyl.fr vers bebelcyl.fr

Je vais attendre la mise à jour des DNS voir si ok

1 « J'aime »

Edit
La MAJ des DNS a eu lieu.
J’ai bien accès à mon serveur via http://maison.bebelcyl.fr ou http://bebelcyl.fr.

Mais toujours le mm soucis de Error getting validation data

Je note qu’il renvoi automatiquement le http vers le https (avec erreur de sécurité), il n’y aurait pas un réglage sur le serveur pour rester en http pour le moment ?

non
mais tu a refait ta procédure sur
le sous domaine ?

quand je vais sur ton site on vois bien qu’il n’y a pas de certificat …

oui j’ai fait un certbot -apache avec le sous domaine et même le domaine …

root@jeedom:/home/jeedom# certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter ‹ c › to cancel): bebelcyl.fr
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for bebelcyl.fr
Enabled Apache rewrite module
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. bebelcyl.fr (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://bebelcyl.fr/.well-known/acme-challenge/eQQKY1Cfnhzb8fGLYK3wPF6rsv2bnEhvR_6o1mnx1g4: Error getting validation data

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: bebelcyl.fr
    Type: connection
    Detail: Fetching
    http://bebelcyl.fr/.well-known/acme-challenge/eQQKY1Cfnhzb8fGLYK3wPF6rsv2bnEhvR_6o1mnx1g4:
    Error getting validation data

    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.
    root@jeedom:/home/jeedom# certbot --apache
    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator apache, Installer apache
    No names were found in your configuration files. Please enter in your domain
    name(s) (comma and/or space separated) (Enter ‹ c › to cancel): maison.bebelcyl.fr
    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for maison.bebelcyl.fr
    Enabled Apache rewrite module
    Waiting for verification…
    Cleaning up challenges
    Failed authorization procedure. maison.bebelcyl.fr (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://maison.bebelcyl.fr/.well-known/acme-challenge/hjvj2iOjynXGDYdAepDclkFKku7izkoE4uBufqf5aGU: Error getting validation data

IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: maison.bebelcyl.fr
    Type: connection
    Detail: Fetching
    http://maison.bebelcyl.fr/.well-known/acme-challenge/hjvj2iOjynXGDYdAepDclkFKku7izkoE4uBufqf5aGU:
    Error getting validation data

    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.
    root@jeedom:/home/jeedom#

refait ta procédure avec que maison.bebelcyl.fr
comme dans l’exemple

si tu a bien le " congratulation " comme ci-dessous

image

Merci de prendre le temps de m’aiguiller.
Je dois désinstaller qqch avant ?

Non mais si tu fait trop de demande tu va te faire ban un certain temps !

Toujours la mm erreur

root@jeedom:/home/jeedom# certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
No names were found in your configuration files. Please enter in your domain
name(s) (comma and/or space separated) (Enter ‹ c › to cancel): bebelcyl.fr Obtaining a new certificate
Performing the following challenges:
http-01 challenge for bebelcyl.fr
Enabled Apache rewrite module
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. bebelcyl.fr (http-01): urn:ietf:params:acme:erro r:connection :: The server could not connect to the client to verify the domain :: Fetching http://bebelcyl.fr/.well-known/acme-challenge/ba_A9ymVjNsCpQe-CX6reW sXkiDRr32KGvYV_dxT1gs: Error getting validation data

IMPORTANT NOTES:

Voici le log du fichier

root@jeedom:/var/log/letsencrypt# tail letsencrypt.log
orderr = self._get_order_and_authorizations(csr.data, self.config.allow_subs et_of_names)
File « /usr/lib/python3/dist-packages/certbot/client.py », line 389, in _get_ord er_and_authorizations
authzr = self.auth_handler.handle_authorizations(orderr, best_effort)
File « /usr/lib/python3/dist-packages/certbot/auth_handler.py », line 82, in han dle_authorizations
self._respond(aauthzrs, resp, best_effort)
File « /usr/lib/python3/dist-packages/certbot/auth_handler.py », line 168, in _r espond
self._poll_challenges(aauthzrs, chall_update, best_effort)
File « /usr/lib/python3/dist-packages/certbot/auth_handler.py », line 239, in _p oll_challenges
raise errors.FailedChallenges(all_failed_achalls)
certbot.errors.FailedChallenges: Failed authorization procedure. bebelcyl.fr (ht tp-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://bebelcyl.fr/.well-known/acme -challenge/ba_A9ymVjNsCpQe-CX6reWsXkiDRr32KGvYV_dxT1gs: Error getting validation data

tu a pas mis
maison.bebelcyl.fr