Page 1 of 1

Letsencrypt certificate error in Domoticz log

Posted: Saturday 15 May 2021 9:41
by gschmidt
Hi,

I used to have Native secure access with Lets Encrypt at the host (Rpi Domoticz) side with a free duckdns domain.
This method installs the server_cert.pem file in the domoticz folder.

But recently I have changed this (with a new domain name) to an HAproxy server, which does the SSL offloading in the frontend of the proxy server.
So Native secure access with Lets Encrypt installed at the Host is not needed anymore.
but when I remove the certificate from the Domoticz folder I get an error message in the log that the certificate is missing:

Code: Select all

2021-05-15 06:31:40.081 Error: [web:443] missing SSL certificate chain file ./server_cert.pem!
2021-05-15 06:31:40.081 Error: [web:443] missing SSL certificate file ./server_cert.pem!
2021-05-15 06:31:40.081 Error: [web:443] missing SSL private key file ./server_cert.pem!
2021-05-15 06:31:40.081 Error: [web:443] missing SSL DH parameters file ./server_cert.pem!
So apparently Domoticz thinks that the certificate is still needed.
Where or how can I remove the "previous" SSL method, to get rid of the error?

Re: Letsencrypt certificate error in Domoticz log

Posted: Saturday 15 May 2021 10:08
by waaren
gschmidt wrote: Saturday 15 May 2021 9:41 So apparently Domoticz thinks that the certificate is still needed.
Where or how can I remove the "previous" SSL method, to get rid of the error?
domoticz ships with a default server_cert.pem (added here in zip format for your convenience)
If you save it in the domoticz directory you will not get these errors.

Re: Letsencrypt certificate error in Domoticz log

Posted: Saturday 15 May 2021 10:47
by gschmidt
waaren wrote: Saturday 15 May 2021 10:08
gschmidt wrote: Saturday 15 May 2021 9:41 So apparently Domoticz thinks that the certificate is still needed.
Where or how can I remove the "previous" SSL method, to get rid of the error?
domoticz ships with a default server_cert.pem (added here in zip format for your convenience)
If you save it in the domoticz directory you will not get these errors.
Ah okay I did'nt know that....I had it moved to my backup directories, so I just need to move it back.
Thanx for the attachment though!

Re: Letsencrypt certificate error in Domoticz log

Posted: Saturday 15 May 2021 11:12
by gschmidt
waaren wrote: Saturday 15 May 2021 10:08
gschmidt wrote: Saturday 15 May 2021 9:41 So apparently Domoticz thinks that the certificate is still needed.
Where or how can I remove the "previous" SSL method, to get rid of the error?
domoticz ships with a default server_cert.pem (added here in zip format for your convenience)
If you save it in the domoticz directory you will not get these errors.
I have one other question.
When a client logs into domoticz, the log shows the routers ip adress 192.168.1.1 as login ip.
This is default behaviour of HAproxy, but HAproxy also has a "forwardfor" option (which I have checked):

The "forwardfor" option creates an HTTP "X-Forwarded-For" header which contains the client's IP address. This is useful to let the final web server know what the client address was. (eg for statistics on domains)

Is it possible in Domoticz to retrieve this ipadress?

Re: Letsencrypt certificate error in Domoticz log

Posted: Saturday 15 May 2021 11:50
by waaren
gschmidt wrote: Saturday 15 May 2021 11:12 Is it possible in Domoticz to retrieve this ipadress?
Not without changing the source code.

btw. this question will probably not get the attention from members knowledgeable in this area because you posted in this topic. Better to post new questions that are only remotely related to the original one in a topic of its own.

Re: Letsencrypt certificate error in Domoticz log

Posted: Saturday 15 May 2021 12:04
by gschmidt
waaren wrote: Saturday 15 May 2021 11:50
gschmidt wrote: Saturday 15 May 2021 11:12 Is it possible in Domoticz to retrieve this ipadress?
Not without changing the source code.

btw. this question will probably not get the attention from members knowledgeable in this area because you posted in this topic. Better to post new questions that are only remotely related to the original one in a topic of its own.
Oh sorry...my bad, I will do next time...the answer is sufficient for now