Setting up RavenDB in Let's Encrypt security mode failed

546 views
Skip to first unread message

Daniel Blendea

unread,
Feb 11, 2018, 10:03:58 PM2/11/18
to RavenDB - 2nd generation document database
Overwhelmed with joy that version 4.0 was just released, I set out to install it, using Let's Encrypt certificate.
But I got this error:

System.InvalidOperationException: Setting up RavenDB in Let's Encrypt security mode failed. 
---> System.InvalidOperationException: Validation failed.
 ---> System.InvalidOperationException: Failed to simulate running the server with the supplied settings using: https://a.xxxx.ravendb.community:4433 
 ---> System.InvalidOperationException: Failed to start webhost on node 'A'. The specified ip address might not be reachable due to network issues. 
It can  happen if the ip is external (behind a firewall, docker). If this is the case, try going back to the previous screen and add the same ip as an external ip.
Settings file:D:\temp\RavenDB-4.0.0-windows-x64\Server\settings.json.
IP addresses: 10.x.x.x:4433. 
---> Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException: Error -4092 EACCES permission denied


The computer where I'm trying to set RavenDB up is my dev machine, behind a firewall.
I opened and forwarded ports 4433 and 38888 from the firewall to my machine and used my IP to configure it, and also used the external IP for "Customize external IP and Ports".

I tried also to use the external IP for the "Node A URL", but I got a different error: 
 Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv.Internal.Networking.UvException: Error -4090 EADDRNOTAVAIL address not available

When I ping the url that was generated for the node A, https://a.xxxx.ravendb.community, I get the reply from my external ip.

So, is this a Let's Encrypt problem? 
Do I need to open/forward additional ports?

Thanks,
Daniel

iftah

unread,
Feb 12, 2018, 2:48:49 AM2/12/18
to RavenDB - 2nd generation document database
Hi Daniel,

The error you get is because the server cannot bind to the private IP address during validation.
Make sure that the address you enter into the "IP Address/ Hostname" field is the private one.
If you open settings.json, the private ip address should be the value in "ServerUrl".
Also make sure that nothing else uses the same ip/port combination.

Take a look at this example: https://ravendb.net/docs/article-page/4.0/csharp/start/installation/setup-wizard#example-iii

Thanks,
Iftah

Daniel Blendea

unread,
Feb 12, 2018, 8:47:25 AM2/12/18
to RavenDB - 2nd generation document database
Thanks.

It seems that everything was set up correctly, after all.
Except that port 4433 was unknowingly used by another program.

(facepalm)
Reply all
Reply to author
Forward
0 new messages