Accès HTTPS - port 443 - Impossible

Forum dédié à l'accès à DomoticZ depuis l'extérieur de chez vous : routage de ports, VPN, VPS ...
La sécurité, c'est important !!
aklain
Messages : 27
Inscription : 12 mars 2018, 09:06
Localisation : Langres (52)
Contact :

Accès HTTPS - port 443 - Impossible

Message par aklain »

Bonjour à tous,

J'ai quitté le monde de Jeedom pour revenir à Domoticz notamment pour profiter de la protection d'une connexion en HTTPS.

J'ai suivi la procédure suivante : https://larumeurdaklain.blogspot.fr/201 ... oticz.html pour installer Domoticz.

J'ai bien vérifié que sur /etc/init.d/domoticz.sh
la ligne

Code : Tout sélectionner

DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
soit bien dé-commenté.

Hors, j’accède parfaitement bien à Domoticz sur le port 80 mais quand je tente d'y accéder sur le 443, j'ai juste un message "la connexion a échouée".

Je précise que lors d'une analyse nmap, le port 443 semble fermé...
J'ai également suivi la procédure pour ajouter un certificat avec Lets Encrypt http://www.domoticz.com/wiki/Native_sec ... ts_Encrypt

Merci d'avance pour votre aide.
Dernière modification par aklain le 26 mars 2018, 22:39, modifié 1 fois.
Selon que vous serez puissant ou misérable, les jugements de cour vous rendront blanc ou noir.
https://larumeurdaklain.blogspot.fr/
vil1driver
Messages : 5661
Inscription : 30 janv. 2015, 11:07
Localisation : Rennes (35)

Re: Accès HTTPS - port 443 - Impossible

Message par vil1driver »

salut,

jeedom pas accessible en https c'est nouveau ça :shock:

parfois de bons choix sont fait pour de mauvaises raisons, ;)

en est d'accord, tu testes bien en local ? d'un pc à un autre chez toi ? en utilisant l'ip privée de ton domoticz ?
MAJ = VIDER LE CACHE(<-Clicable)
/!\Les mises à jour de Domoticz sont souvent sources de difficultés, ne sautez pas dessus
modules.lua

Un ex domoticzien
aklain
Messages : 27
Inscription : 12 mars 2018, 09:06
Localisation : Langres (52)
Contact :

Re: RE: Re: Accès HTTPS - port 443 - Impossible

Message par aklain »

vil1driver a écrit :salut,

jeedom pas accessible en https c'est nouveau ça :shock:

parfois de bons choix sont fait pour de mauvaises raisons, ;)

en est d'accord, tu testes bien en local ? d'un pc à un autre chez toi ? en utilisant l'ip privée de ton domoticz ?
Il y a également d'autres raisons pour que je quitte Jeedom. Notamment un gros soucis de fiabilité, des plugins que j'utilisais qui ont disparus et un changement d'esprit que je n'apprécie pas.
Enfin...

Alors oui, je confirme, je fais tous les tests en local. Je n'ouvrirai mes ports vers l'extérieur qu'une fois que le https sera fonctionnel.

Envoyé de mon Mi A1 en utilisant Tapatalk
Selon que vous serez puissant ou misérable, les jugements de cour vous rendront blanc ou noir.
https://larumeurdaklain.blogspot.fr/
vil1driver
Messages : 5661
Inscription : 30 janv. 2015, 11:07
Localisation : Rennes (35)

Re: Accès HTTPS - port 443 - Impossible

Message par vil1driver »

bienvenu

tu as bien relancé le service après avoir configuré domoticz.sh ?
que donne ceci ?

Code : Tout sélectionner

sudo netstat -tlnpu | grep domoticz
rien d'autre n'utiliserait déjà ce port ?

Code : Tout sélectionner

sudo netstat -tlnpu | grep 443
MAJ = VIDER LE CACHE(<-Clicable)
/!\Les mises à jour de Domoticz sont souvent sources de difficultés, ne sautez pas dessus
modules.lua

Un ex domoticzien
aklain
Messages : 27
Inscription : 12 mars 2018, 09:06
Localisation : Langres (52)
Contact :

Re: Accès HTTPS - port 443 - Impossible

Message par aklain »

J'ai effectivement relancé le service avec les commandes :

Code : Tout sélectionner

sudo systemctl stop domoticz.service
sudo systemctl start domoticz.service
J'ai également redémarré le serveur.

A la commande :

Code : Tout sélectionner

sudo netstat -tlnpu | grep domoticz
La réponse :

Code : Tout sélectionner

tcp6       0      0 :::6144                 :::*                    LISTEN      826/domoticz
tcp6       0      0 :::8080                 :::*                    LISTEN      826/domoticz
Quant à :

Code : Tout sélectionner

sudo netstat -tlnpu | grep 443
Il ne me renvois rien du tout...

Si cela peut aider, un extrait de domoticz.sh :

Code : Tout sélectionner

DAEMON=/home/utilisateur_domoticz/domoticz/$NAME
DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
DAEMON_ARGS="$DAEMON_ARGS -www 8080"
DAEMON_ARGS="$DAEMON_ARGS -sslwww 443"
DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
Selon que vous serez puissant ou misérable, les jugements de cour vous rendront blanc ou noir.
https://larumeurdaklain.blogspot.fr/
vil1driver
Messages : 5661
Inscription : 30 janv. 2015, 11:07
Localisation : Rennes (35)

Re: Accès HTTPS - port 443 - Impossible

Message par vil1driver »

As tu essayé de le lancer manuellement pour voir ce qu'il raconte ?
MAJ = VIDER LE CACHE(<-Clicable)
/!\Les mises à jour de Domoticz sont souvent sources de difficultés, ne sautez pas dessus
modules.lua

Un ex domoticzien
aklain
Messages : 27
Inscription : 12 mars 2018, 09:06
Localisation : Langres (52)
Contact :

Re: RE: Re: Accès HTTPS - port 443 - Impossible

Message par aklain »

vil1driver a écrit :As tu essayé de le lancer manuellement pour voir ce qu'il raconte ?
Comment fait-on pour le lancer manuellement ?

Envoyé de mon Mi A1 en utilisant Tapatalk
Selon que vous serez puissant ou misérable, les jugements de cour vous rendront blanc ou noir.
https://larumeurdaklain.blogspot.fr/
vil1driver
Messages : 5661
Inscription : 30 janv. 2015, 11:07
Localisation : Rennes (35)

Re: Accès HTTPS - port 443 - Impossible

Message par vil1driver »

Code : Tout sélectionner

cd /home/utilisateur_domoticz/domoticz/
sudo ./domoticz -www 8080 -sslwww 443
MAJ = VIDER LE CACHE(<-Clicable)
/!\Les mises à jour de Domoticz sont souvent sources de difficultés, ne sautez pas dessus
modules.lua

Un ex domoticzien
aklain
Messages : 27
Inscription : 12 mars 2018, 09:06
Localisation : Langres (52)
Contact :

Re: Accès HTTPS - port 443 - Impossible

Message par aklain »

Il dit beaucoup de choses :

Code : Tout sélectionner

2018-03-12 21:43:20.564  Domoticz V3.8153 (c)2012-2017 GizMoCuz
2018-03-12 21:43:20.564  Build Hash: 494fff71, Date: 2017-07-30 12:19:41
2018-03-12 21:43:20.565  Startup Path: /home/utilisateur_domoticz/domoticz/
2018-03-12 21:43:20.580  Sunrise: 06:58:00 SunSet:18:37:00
2018-03-12 21:43:20.580  EventSystem: reset all events...
2018-03-12 21:43:20.595  PluginSystem: Started, Python version '3.4.2'.
2018-03-12 21:43:20.597  Active notification Subsystems: email (1/12)
2018-03-12 21:43:20.598  WebServer(HTTP) started on address: :: with port 8080
2018-03-12 21:43:20.599  Error: [web:443] missing SSL DH parameters from file ./server_cert.pem
2018-03-12 21:43:20.599  WebServer(SSL) started on address: :: with port 443
2018-03-12 21:43:20.599  Proxymanager started.
2018-03-12 21:43:20.600  Starting shared server on: :::6144
2018-03-12 21:43:20.600  TCPServer: shared server started...
2018-03-12 21:43:20.600  RxQueue: queue worker started...
2018-03-12 21:43:22.601  EventSystem: reset all events...
2018-03-12 21:43:22.601  EventSystem: reset all device statuses...
2018-03-12 21:43:22.623  Python EventSystem: Module not found - Trying to initialize.
2018-03-12 21:43:22.624  Python EventSystem: Initalizing event module.
2018-03-12 21:43:22.624  EventSystem: Started
2018-03-12 21:43:23.083  PluginSystem: Entering work loop.
2018-03-12 21:43:23.107  OpenZWave: using config in: /home/utilisateur_domoticz/domoticz/Config/
2018-03-12 21:43:23.108 Always, OpenZwave Version 1.4.2692 Starting Up
2018-03-12 21:43:23.108  OpenZWave: Starting...
2018-03-12 21:43:23.108  OpenZWave: Version: 1.4-2692-g3fc69674-dirty
2018-03-12 21:43:23.267  OpenZWave: Driver Ready
Mais du coup, quand je le lance en manuel, j'accède bien à Domoticz en HTTPS!

Quand je l'arrête avec Ctrl+C :

Code : Tout sélectionner

2018-03-12 21:46:12.627  OpenZWave: Awake Nodes queried
^C2018-03-12 21:46:40.304  Closing application!...
2018-03-12 21:46:40.304  Stopping worker...
2018-03-12 21:46:40.304  RxQueue: queue worker stopped...
2018-03-12 21:46:40.305  WebServer(HTTP) stopped
2018-03-12 21:46:40.805  WebServer(SSL) stopped
2018-03-12 21:46:41.305  TCPServer: shared server stopped
2018-03-12 21:46:41.305  Stopping all hardware...
2018-03-12 21:46:41.455  OpenZWave: Closed
2018-03-12 21:46:42.455 Always, ***************************************************************************
2018-03-12 21:46:42.455 Always, *********************  Cumulative Network Statistics  *********************
2018-03-12 21:46:42.455 Always, *** General
2018-03-12 21:46:42.456 Always, Driver run time: . .  . 0 days, 0 hours, 1 minutes
2018-03-12 21:46:42.456 Always, Frames processed: . . . . . . . . . . . . . . . . . . . . 395
2018-03-12 21:46:42.456 Always, Total messages successfully received: . . . . . . . . . . 395
2018-03-12 21:46:42.456 Always, Total Messages successfully sent: . . . . . . . . . . . . 151
2018-03-12 21:46:42.456 Always, ACKs received from controller:  . . . . . . . . . . . . . 151
2018-03-12 21:46:42.456 Always, *** Errors
2018-03-12 21:46:42.456 Always, Unsolicited messages received while waiting for ACK:  . . 0
2018-03-12 21:46:42.457 Always, Reads aborted due to timeouts:  . . . . . . . . . . . . . 0
2018-03-12 21:46:42.457 Always, Bad checksum errors:  . . . . . . . . . . . . . . . . . . 0
2018-03-12 21:46:42.457 Always, CANs received from controller:  . . . . . . . . . . . . . 0
2018-03-12 21:46:42.457 Always, NAKs received from controller:  . . . . . . . . . . . . . 0
2018-03-12 21:46:42.457 Always, Out of frame data flow errors:  . . . . . . . . . . . . . 0
2018-03-12 21:46:42.457 Always, Messages retransmitted: . . . . . . . . . . . . . . . . . 0
2018-03-12 21:46:42.457 Always, Messages dropped and not delivered: . . . . . . . . . . . 0
2018-03-12 21:46:42.457 Always, ***************************************************************************
2018-03-12 21:46:44.928  Scheduler stopped...
2018-03-12 21:46:44.960  EventSystem: Stopped...
2018-03-12 21:46:44.962  EventSystem - Python stopped...
2018-03-12 21:46:45.462  PluginSystem: Exiting work loop.
2018-03-12 21:46:45.465  PluginSystem: Stopped.
2018-03-12 21:46:45.960  Mainworker Stopped...
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Ce qui m'étonne c'est ce message à la fin :

Code : Tout sélectionner

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
  what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument
Selon que vous serez puissant ou misérable, les jugements de cour vous rendront blanc ou noir.
https://larumeurdaklain.blogspot.fr/
Doume
Messages : 550
Inscription : 28 déc. 2014, 10:27
Localisation : Nord (59)
Contact :

Re: Accès HTTPS - port 443 - Impossible

Message par Doume »

Un CTL+C génère une interruption à n'importe quel moment du processus, donc les messages d'exception comme celui là sont une conséquence, non significative !
Répondre