RavenDb is a VirtualBox Ubuntu VM

118 views
Skip to first unread message

Nick

unread,
Oct 15, 2019, 7:10:52 PM10/15/19
to RavenDB - 2nd generation document database
Hi,

I was just trying this scenario to have a local db on my Windows 10 machine but inside a linux VM so that it looks like my production setup (ubuntu vm under AWS lightsail). VirtualBox is configured with Bridge network, so that host and guest are on the same network.
I first tried with a letsencrypt cert but setup failed when trying to get the cert.
Then I tried a simple unsecure setup. I'm able to use Studio but my web app can't connect to the server (connection refused on port 443). I did the same as on my lightsail box though.

Relevant part of my settings.json:

"PublicServerUrl": "http://192.168.0.161:443",
"ServerUrl.Tcp": "tcp://192.168.0.161:38888",
"Setup.Mode": "Unsecured",
"Security.UnsecuredAccessAllowed": "PublicNetwork"

Any idea?
It would be great if the manual could contain some local setup scenario like these 2 (letsencrypt and nonsecured).

Oren Eini (Ayende Rahien)

unread,
Oct 16, 2019, 1:20:32 AM10/16/19
to ravendb
You are not using 443 here, you need to use port 8080 and not use HTTP in this mode. 

"PublicServerUrl": "http://192.168.0.161:443",

This is the problem.
You told RavenDB to go to port 443, but the server is listening on port 8080


 

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/a89d18e9-2b33-45fc-9ecb-235f4a60f8d0%40googlegroups.com.


--
Oren Eini
CEO   /   Hibernating Rhinos LTD
Skype:  ayenderahien
Support:  sup...@ravendb.net

Nick

unread,
Oct 16, 2019, 11:22:26 AM10/16/19
to RavenDB - 2nd generation document database
ok got it and the unsecured mode now works.

If I want to retry letsencrypt mode, how should I fill the Node A URLs form?
My hardware config is:

    Internet <-> Router <-> Linux VM

My linux VM has the address 192.168.0.161 on my LAN
I also know the Router external IP

Whatever I tried, I got the exception:

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.mydomain.ravendb.community:443 ---> 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 port '443' is not allowed for the non-root RavenDB process.Try using setcap to allow it: sudo setcap CAP_NET_BIND_SERVICE=+eip /home/cadilhac/RavenDB/Server/Raven.Server
It can also 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.

setcap has been set already.


On Wednesday, 16 October 2019 01:20:32 UTC-4, Oren Eini wrote:
You are not using 443 here, you need to use port 8080 and not use HTTP in this mode. 

"PublicServerUrl": "http://192.168.0.161:443",

This is the problem.
You told RavenDB to go to port 443, but the server is listening on port 8080


 

On Wed, Oct 16, 2019 at 2:10 AM Nick <cadi...@gmail.com> wrote:
Hi,

I was just trying this scenario to have a local db on my Windows 10 machine but inside a linux VM so that it looks like my production setup (ubuntu vm under AWS lightsail). VirtualBox is configured with Bridge network, so that host and guest are on the same network.
I first tried with a letsencrypt cert but setup failed when trying to get the cert.
Then I tried a simple unsecure setup. I'm able to use Studio but my web app can't connect to the server (connection refused on port 443). I did the same as on my lightsail box though.

Relevant part of my settings.json:

"PublicServerUrl": "http://192.168.0.161:443",
"ServerUrl.Tcp": "tcp://192.168.0.161:38888",
"Setup.Mode": "Unsecured",
"Security.UnsecuredAccessAllowed": "PublicNetwork"

Any idea?
It would be great if the manual could contain some local setup scenario like these 2 (letsencrypt and nonsecured).

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rav...@googlegroups.com.

Nick

unread,
Oct 16, 2019, 2:37:54 PM10/16/19
to RavenDB - 2nd generation document database
ok, did it. But no way to pass through 443. I had to use 8080 (or another one I imagine, but not 443).

Oren Eini (Ayende Rahien)

unread,
Oct 17, 2019, 4:37:01 AM10/17/19
to ravendb
It is likely that something on your machine already uses 443.
skype is a common offender

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/ab8610ef-e73e-4780-99a8-6a47f767bf38%40googlegroups.com.

Nick

unread,
Oct 17, 2019, 10:17:01 PM10/17/19
to RavenDB - 2nd generation document database
Skype ? We are on an ununtu server VM here...

Oren Eini (Ayende Rahien)

unread,
Oct 22, 2019, 3:50:33 AM10/22/19
to ravendb
How are you running the VM?
If you are using bridged network, and running on Windows host, something may already be holding the 443 port, and Skype is a usual culprit here.

That was a suggestion, you can also check whatever someone is listening to port 443 as well. Maybe you have ngnix or something like that?

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/888966ad-752a-411e-be93-342f2b5323f4%40googlegroups.com.

Nick

unread,
Oct 22, 2019, 7:54:29 AM10/22/19
to RavenDB - 2nd generation document database
Yes, bridged network on a windows host. But my router forwards port 443 to my VM directly. Not sure how this works. Can the windows host really interfere?
Skype is installed on windows but I can't say if it was running at this time.

Oren Eini (Ayende Rahien)

unread,
Oct 22, 2019, 8:13:48 AM10/22/19
to ravendb
From PowerShell, run:
>  Get-NetTCPConnection -LocalPort 443

What do you get?



To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/7bd6ffeb-60ac-4ca1-b8d1-b7dfed3417f5%40googlegroups.com.

Nick

unread,
Oct 22, 2019, 8:47:10 AM10/22/19
to RavenDB - 2nd generation document database
LocalAddress                        LocalPort RemoteAddress                       RemotePort State       AppliedSetting OwningProcess
------------                        --------- -------------                       ---------- -----       -------------- -------------
127.0.0.1                           443       127.0.0.1                           50011      Established Internet       19256
127.0.0.1                           443       127.0.0.1                           49985      Established Internet       19256
127.0.0.1                           443       0.0.0.0                             0          Listen                     19256
127.0.0.1                           443       127.0.0.1                           55058      Established Internet       19256

Oren Eini (Ayende Rahien)

unread,
Oct 22, 2019, 10:46:57 PM10/22/19
to ravendb
What is process   19256  ?
That is the one that is holding up your 443 port
 


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/b4200d63-8e13-44f1-8162-b6dd1fa33a9e%40googlegroups.com.

Nick

unread,
Oct 23, 2019, 8:52:51 AM10/23/19
to RavenDB - 2nd generation document database
That one is just the local RavenDb server that was running locally on my windows host when I typed the powershell command.
Of course, when I tried RavenDb in the linux guest, the one on windows was not running.
Reply all
Reply to author
Forward
0 new messages