RC4 - Not starting when using the Public IP/URL on Azure VM

139 views
Skip to first unread message

Leon Potgieter

unread,
Sep 14, 2017, 7:48:24 AM9/14/17
to RavenDB - 2nd generation document database
Hi,

Having the following issue trying to access RC4 from outside a Windows 2008R2 VM hosted on Azure.  Security not important at this stage, I'm simply trying to get an initial dev environment up and running...  I'm assuming that the Configuration described in Scenario 2 below is the desired one, but then the executable is unable to start...  Scenario 3 works to start the server and I can browse to it fine but I can't access it via the client.

Scenario 1: Local Access works fine, server starts normally 
Config: "ServerUrl": "http://localhost:8080"  and starting with RavenDB.Server.exe 
Result: Server starts normally and can access locally, but not externally. This is expected.

Scenario 2: Using the PUBLIC IP of the VM or the URL
Config: "ServerUrl": "http://52.169.200.200:8080" or "ServerUrl": "http://db1.my.domain:8080"  and starting with RavenDB.Server.exe --Security.UnsecuredAccessAllowed=PublicNetwork
Result: Server executable returns an error stating that it cannot start and returns the following error:
System.IO.IOException: Unable to start tcp listener on 52.169.200.200 on port 0 - --> System.Net.Sockets.SocketException: The requested address is not valid in it's context

Scenario 3: Using the internal IP of the adapter on the VM 
Config: "ServerUrl": "http://10.0.0.4:8080"  and starting with RavenDB.Server.exe --Security.UnsecuredAccessAllowed=PublicNetwork
Result: Server starts fine, and I can access it fine from externally via a browser, but when using a client externally with the public IP or the URL I now get the following error:
{FailedTopology: {}, Message: "Tried to send 'NextHiLoCommand' request via `GET /databases/4RealChain0/hilo/next?tag=GroupMembers&lastBatchSize=0&lastRangeAt=0001-01-01T00:00:00.0000000&identityPartsSeparator=/&lastMax=0` to all configured nodes in the topology, all of them seem to be down or not responding. I've tried to access the following nodes: http://10.0.0.4:8080"

Andrej Krivulčík

unread,
Sep 14, 2017, 7:56:44 AM9/14/17
to RavenDB - 2nd generation document database
The following works for me, ServerUrl set to 0.0.0.0 to bind to all interfaces/addresses, PublicServerUrl set to the real IP address:

{
  "ServerUrl": "http://0.0.0.0:80",
  "PublicServerUrl": "http://IP_ADDRESS:80",
  "DataDir": "APPDRIVE:/Raven",
  "RunInMemory": false,
  "Security.UnsecuredAccessAllowed": "PublicNetwork"

Leon Potgieter

unread,
Sep 14, 2017, 8:01:47 AM9/14/17
to RavenDB - 2nd generation document database
Yep that resolved the problem, thank you.

Oren Eini (Ayende Rahien)

unread,
Sep 17, 2017, 4:29:19 AM9/17/17
to ravendb
The problem is that there is a mismatch between the IPs.

There is the internal IP, which is what your network interface will bind to.

The public URL (52.169.200.200) is NOT bound to the internal network interface, so RavenDB can't listen to that.
The internal one (10.0.0.4) is, but then you need to let RavenDB know that there is another IP that it needs to let the external world know about.

"ServerUrl": "http://10.0.0.4:8080",
 "PublicServerUrl": "http://db1.my.domain:8080",

Should work

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages