Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [asio Topic is solved

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
Robert28
Posts: 21
Joined: Friday 05 January 2018 20:09
Target OS: Linux
Domoticz version: 2024.4
Contact:

Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [asio

Post by Robert28 »

Hi all,

after updating I got:

Code: Select all

Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [asio.ssl:76021773]
Error: WebServer(SSL) check if no other application is using port: 4443
No other application is listening on 4443...

Any advice how to solve this issue?

BR,
User avatar
waltervl
Posts: 5722
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by waltervl »

What did you do to enable ssl / https?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Robert28
Posts: 21
Joined: Friday 05 January 2018 20:09
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by Robert28 »

Enabling it via the comman line options:

Code: Select all

./domoticz -www 8080 -sslwww 4443-sslcert /opt/domoticz/server_cert.pem 
User avatar
waltervl
Posts: 5722
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by waltervl »

And if you use default port 443 it works ?
Further I have no clue about using https so I hope somebody else has an idea to find the issue here.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Robert28
Posts: 21
Joined: Friday 05 January 2018 20:09
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by Robert28 »

As expected when you are running Domoticz as a non-root user:

Code: Select all

Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: use_tmp_dh_file: ASN1 lib (PEM routines) [asio.ssl:76021773]
Error: WebServer(SSL) check privileges for opening ports below 1024
443 is a privileged port....
User avatar
waltervl
Posts: 5722
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by waltervl »

So when running Domoticz as root with port 4443 will it work?
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Robert28
Posts: 21
Joined: Friday 05 January 2018 20:09
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by Robert28 »

Nope, 4443 is a unprivileged port, so being root or non-root is not a difference.
User avatar
jvdz
Posts: 2269
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by jvdz »

Robert28 wrote: Friday 08 December 2023 10:30 Enabling it via the comman line options:

Code: Select all

./domoticz -www 8080 -sslwww 4443-sslcert /opt/domoticz/server_cert.pem 
You do have a space after 4443 as that doesn't show in this post?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Robert28
Posts: 21
Joined: Friday 05 January 2018 20:09
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by Robert28 »

Oeps, yes I have...
mooninite
Posts: 12
Joined: Wednesday 12 July 2017 23:11
Target OS: Linux
Domoticz version: 4.9700
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by mooninite »

I am seeing the same exact error message.

Previously working environment:
Fedora 38 x86_64 - Boost 1.78 - Domoticz 2023.2

Broken environment:
Fedora 39 x86_64 - Boost 1.81 - Domoticz 2023.2

Workaround:
Set the '-ssldhparam' parameter to '/dev/null' and Domoticz will start the web service with SSL. Example: 'domoticz -www 0 -sslwww 8443 -sslcert /var/lib/domoticz/domoticz.pem -sslpass none -sslmethod tlsv12_server -ssloptions default_workarounds -ssldhparam /dev/null -approot /usr/share/domoticz -dbase /var/lib/domoticz/domoticz.db -userdata /var/lib/domoticz/ -loglevel 2'

I believe there was a change in Boost that Domoticz needs to update to be compatible with.
User avatar
gizmocuz
Posts: 2482
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by gizmocuz »

@mooninite , do you know if something has changed on the boost site?

Are you using the default domoticz certificate with the DH params included?

What happens when you create a new certificate (also including the DH Params), or create a new certificate but keep the DH Params in a separate file?

Feel free to create a Github issue referencing this topic
Quality outlives Quantity!
Robert28
Posts: 21
Joined: Friday 05 January 2018 20:09
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by Robert28 »

Still an error:

Code: Select all

 Error: [web:4443] missing SSL DH parameters from file /dev/null
But it works! :)
User avatar
gizmocuz
Posts: 2482
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by gizmocuz »

I tested with Visual Studio 2022 with boost 1.84 and experience no issues.
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2482
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by gizmocuz »

I have no issues on my production machines.
HTTPS working fine with the standard certificate
Quality outlives Quantity!
Robert28
Posts: 21
Joined: Friday 05 January 2018 20:09
Target OS: Linux
Domoticz version: 2024.4
Contact:

Re: Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 4443: use_tmp_dh_file: ASN1 lib (PEM routines) [a

Post by Robert28 »

Domoticz 2023.2 (build 15780) running on Fedora 39 X86_64 with boost 1.81 has still the issue...
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest