SSL does not seem to work for me
Posted: Saturday 09 February 2019 17:19
I am using a Linux Ubuntu host running in a virtual machine on a QNAP Nas.
All works fine however the server seems unable to handle HTTPS. I should be able to have the basic server_cert.pem certificate working and deal with no proper padlock, however that does not work. The following is an extract from the logs.
2019-02-09 16:11:17.973 Status: Domoticz V4.9701 (c)2012-2018 GizMoCuz
2019-02-09 16:11:17.976 Status: Build Hash: b47a877f, Date: 2018-06-23 15:27:56
2019-02-09 16:11:17.977 Status: Startup Path: /home/homeadmin/domoticz/
2019-02-09 16:11:18.145 Sunrise: 07:25:00 SunSet: 17:06:00
2019-02-09 16:11:18.145 Day length: 09:41:00 Sun at south: 12:05:00
2019-02-09 16:11:18.145 Civil twilight start: 06:51:00 Civil twilight end: 17:41:00
2019-02-09 16:11:18.145 Nautical twilight start: 06:12:00 Nautical twilight end: 18:20:00
2019-02-09 16:11:18.145 Astronomical twilight start: 05:33:00 Astronomical twilight end: 18:58:00
2019-02-09 16:11:18.257 Active notification Subsystems: email, pushover (2/13)
2019-02-09 16:11:18.264 Starting shared server on: :::6144
2019-02-09 16:11:18.145 Status: EventSystem: reset all events...
2019-02-09 16:11:18.252 Status: PluginSystem: Started, Python version '3.6.7'.
2019-02-09 16:11:18.258 Status: WebServer(HTTP) started on address: :: with port 8080
2019-02-09 16:11:18.264 Status: Proxymanager started.
2019-02-09 16:11:18.266 Status: TCPServer: shared server started...
2019-02-09 16:11:18.266 Status: RxQueue: queue worker started...
2019-02-09 16:11:18.261 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2019-02-09 16:11:18.261 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2019-02-09 16:11:18.261 Error: [web:443] missing SSL private key file ./server_cert.pem!
2019-02-09 16:11:18.261 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
2019-02-09 16:11:18.262 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2019-02-09 16:11:18.262 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2019-02-09 16:11:18.262 Error: [web:443] missing SSL private key file ./server_cert.pem!
2019-02-09 16:11:18.262 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: [web:443] missing SSL private key file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
2019-02-09 16:11:18.263 Error: WebServer(SSL) check privileges for opening ports below 1024
2019-02-09 16:11:20.267 Status: Hardware Monitor: Started
2019-02-09 16:11:20.276 Status: EventSystem: reset all events...
2019-02-09 16:11:20.277 Status: EventSystem: reset all device statuses...
2019-02-09 16:11:20.416 Status: Python EventSystem: Initalizing event module.
2019-02-09 16:11:20.418 Status: EventSystem: Queue thread started...
2019-02-09 16:11:20.418 Status: EventSystem: Started
2019-02-09 16:11:20.656 Status: PluginSystem: Entering work loop.
2019-02-09 16:11:21.872
2019-02-09 16:11:21.293 Status: RFXCOM: Using serial port: /dev/ttyUSB0
2019-02-09 16:11:21.948 Error: RFXCOM: Invalid data received!....
2019-02-09 16:15:09.705 Status: Incoming connection from: 192.168.1.99
As you can see the whole middle is dedicated to telling me the server_cert.pem does not exist. I checked and it does.
When I set this up it was using the second method of autostartup configuring the domoticz.service and using systemctl to manage it. I thought that it would use domoticz.sh within the home directory to kick this off so all would be fine. I am now confused. It all works fine in http, just not in https.
If anyone has any ideas I could follow that would be really helpful.
All works fine however the server seems unable to handle HTTPS. I should be able to have the basic server_cert.pem certificate working and deal with no proper padlock, however that does not work. The following is an extract from the logs.
2019-02-09 16:11:17.973 Status: Domoticz V4.9701 (c)2012-2018 GizMoCuz
2019-02-09 16:11:17.976 Status: Build Hash: b47a877f, Date: 2018-06-23 15:27:56
2019-02-09 16:11:17.977 Status: Startup Path: /home/homeadmin/domoticz/
2019-02-09 16:11:18.145 Sunrise: 07:25:00 SunSet: 17:06:00
2019-02-09 16:11:18.145 Day length: 09:41:00 Sun at south: 12:05:00
2019-02-09 16:11:18.145 Civil twilight start: 06:51:00 Civil twilight end: 17:41:00
2019-02-09 16:11:18.145 Nautical twilight start: 06:12:00 Nautical twilight end: 18:20:00
2019-02-09 16:11:18.145 Astronomical twilight start: 05:33:00 Astronomical twilight end: 18:58:00
2019-02-09 16:11:18.257 Active notification Subsystems: email, pushover (2/13)
2019-02-09 16:11:18.264 Starting shared server on: :::6144
2019-02-09 16:11:18.145 Status: EventSystem: reset all events...
2019-02-09 16:11:18.252 Status: PluginSystem: Started, Python version '3.6.7'.
2019-02-09 16:11:18.258 Status: WebServer(HTTP) started on address: :: with port 8080
2019-02-09 16:11:18.264 Status: Proxymanager started.
2019-02-09 16:11:18.266 Status: TCPServer: shared server started...
2019-02-09 16:11:18.266 Status: RxQueue: queue worker started...
2019-02-09 16:11:18.261 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2019-02-09 16:11:18.261 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2019-02-09 16:11:18.261 Error: [web:443] missing SSL private key file ./server_cert.pem!
2019-02-09 16:11:18.261 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
2019-02-09 16:11:18.262 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2019-02-09 16:11:18.262 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2019-02-09 16:11:18.262 Error: [web:443] missing SSL private key file ./server_cert.pem!
2019-02-09 16:11:18.262 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: [web:443] missing SSL private key file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
2019-02-09 16:11:18.263 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
2019-02-09 16:11:18.263 Error: WebServer(SSL) check privileges for opening ports below 1024
2019-02-09 16:11:20.267 Status: Hardware Monitor: Started
2019-02-09 16:11:20.276 Status: EventSystem: reset all events...
2019-02-09 16:11:20.277 Status: EventSystem: reset all device statuses...
2019-02-09 16:11:20.416 Status: Python EventSystem: Initalizing event module.
2019-02-09 16:11:20.418 Status: EventSystem: Queue thread started...
2019-02-09 16:11:20.418 Status: EventSystem: Started
2019-02-09 16:11:20.656 Status: PluginSystem: Entering work loop.
2019-02-09 16:11:21.872
2019-02-09 16:11:21.293 Status: RFXCOM: Using serial port: /dev/ttyUSB0
2019-02-09 16:11:21.948 Error: RFXCOM: Invalid data received!....
2019-02-09 16:15:09.705 Status: Incoming connection from: 192.168.1.99
As you can see the whole middle is dedicated to telling me the server_cert.pem does not exist. I checked and it does.
When I set this up it was using the second method of autostartup configuring the domoticz.service and using systemctl to manage it. I thought that it would use domoticz.sh within the home directory to kick this off so all would be fine. I am now confused. It all works fine in http, just not in https.
If anyone has any ideas I could follow that would be really helpful.