How to Connect RavenDB remotely

697 views
Skip to first unread message

Shyam Sunder

unread,
Oct 12, 2017, 1:06:28 PM10/12/17
to RavenDB - 2nd generation document database
Hello,

I have installed RavenDB on a Dev server as a Service and now I am able to connect to RavenDB using url http://localhost:8080 on the server, I would like to know if I want developers to access RavenDB I should configure IIS right? Please correct me if I am wrong.

If I am correct, then I was able to configure IIS application using steps mentioned in the below url, however when I try to start the website in IIS it says the "The Process cannot access the file because it is being used by another process". But when I stop RavenDB service I was able to start Website, after the website is running I was not able to start RavenDB service. So both are not running at the same time, not sure what I am missing. Please help me.

https://ravendb.net/docs/article-page/3.5/csharp/server/installation/iis

Oren Eini (Ayende Rahien)

unread,
Oct 12, 2017, 1:56:27 PM10/12/17
to ravendb
The easiest way to do this is to use the MSI installer.

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.

Shyam Sunder

unread,
Oct 12, 2017, 2:14:01 PM10/12/17
to RavenDB - 2nd generation document database
Sorry, I didnt get you. Which MSI installer and where I should install that? I guess there is no installer available for 4.0 version.

Oren Eini (Ayende Rahien)

unread,
Oct 12, 2017, 2:18:27 PM10/12/17
to ravendb
Oh, 4.0, you pointed to the 3.5 docs.

For 4.0, you need to setup the ServerUrl as something other than local host (such as the machine name)
Note that 4.0 doesn't use IIS.

Another consideration is that we require you to make a security decision if you are listening to anything but local host.

See this document on how to setup the security:

You can also explicitly chose to run in an unsecured mode (allowing external connections and not enabling authentication) by setting Security.UnsecuredAccessAllowed to PrivateNetwork or PublicNetwork


Hibernating Rhinos Ltd  

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

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

 


--

Shyam Sunder

unread,
Oct 12, 2017, 3:25:36 PM10/12/17
to RavenDB - 2nd generation document database
Thanks for the clarification.

Looks like we can update server url in app.config file in 3.5 version, but in which file we need to modify to remove Local host with server name in 4.0 version?


On Thursday, October 12, 2017 at 12:06:28 PM UTC-5, Shyam Sunder wrote:

Shyam Sunder

unread,
Oct 12, 2017, 3:29:40 PM10/12/17
to RavenDB - 2nd generation document database
Never mind, I found the file name as settings.json in the doc you provided.


On Thursday, October 12, 2017 at 12:06:28 PM UTC-5, Shyam Sunder wrote:

Daniel Toft

unread,
Oct 12, 2017, 5:22:04 PM10/12/17
to RavenDB - 2nd generation document database
Hi Oren

I have succeeded to startup ravendb 4.0 on my server, and connect to it remotely. What i have done is to setup my ServerUrl to the the local ip address. But i'm not sure this is the correct way. I want to connect to the database outside my network, so i want to create a binding to my domain that is pointing to my external ip. When i do that it's failing. I got the following error:

System.IO.IOException: Unable to start tcp listener on {external_ip} on port 0 ---> System.Net.Sockets.SocketException: The requested address is not valid in its context
   at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at System.Net.Sockets.TcpListener.Start(Int32 backlog)
   at Raven.Server.RavenServer.StartTcpListener()

Do you know why?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Oct 15, 2017, 5:27:53 AM10/15/17
to ravendb
You need to setup the ServerUrl so it will know what to listen to, and the PublicServerUrl as the external facing value.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages