My instance is creating an error message I believe falls under the same question, but it creates the following message --
Message=No connection could be made because the target machine
actively refused it 127.0.0.1:8080
I'm not sure why it is trying to connect to port 8080 in the local machine. Also, even though nothing is running on port 8080, why is it failing?
Do I have to have an instance of RavenDB running on port 8080 for this to work? Here is the actual exception that I am getting ...
System.Net.WebException was unhandled by user code
HResult=-2146233079 Message=Unable to connect to the remote server
Source=System StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at Raven.Client.Connection.HttpJsonRequest.ReadStringInternal(Func1
getResponse) in
c:\Builds\raven\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line
301
at Raven.Client.Connection.HttpJsonRequest.ReadResponseString() in
c:\Builds\raven\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line
206
at Raven.Client.Connection.HttpJsonRequest.ExecuteRequest() in c:\Builds\raven\Raven.Client.Lightweight\Connection\HttpJsonRequest.cs:line
154
at Raven.Client.Connection.ServerClient.DirectPutIndex(String name, String operationUrl, Boolean overwrite, IndexDefinition
definition) in
c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line
629
at Raven.Client.Connection.ServerClient.<>c__DisplayClass34.<PutIndex>b__33(String
operationUrl) in
c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line
608
at Raven.Client.Connection.ServerClient.TryOperation[T](Func
2 operation, String operationUrl, Boolean avoidThrowing, T& result) in
c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line
204
at Raven.Client.Connection.ServerClient.ExecuteWithReplication[T](String
method, Func2 operation) in
c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line
168
at Raven.Client.Connection.ServerClient.PutIndex(String name, IndexDefinition definition, Boolean overwrite) in
c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line
608
at Raven.Client.Connection.ServerClient.PutIndex[TDocument,TReduceResult](String
name, IndexDefinitionBuilder
2 indexDef, Boolean overwrite) in
c:\Builds\raven\Raven.Client.Lightweight\Connection\ServerClient.cs:line
665
at NServiceBus.Timeout.Hosting.Windows.Persistence.RavenTimeoutPersistence..ctor(IDocumentStore
store) in
c:\TeamCity\buildAgent\work\nsb.master_8\src\timeout\NServiceBus.Timeout.Hosting.Windows\Persistence\RavenTimeoutPersistence.cs:line
22 InnerException: System.Net.Sockets.SocketException
HResult=-2147467259
Message=No connection could be made because the target machine actively refused it 127.0.0.1:8080
Source=System
ErrorCode=10061
NativeErrorCode=10061
StackTrace:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress&
address, ConnectSocketState state, IAsyncResult asyncResult,
Exception& exception)
InnerException:
UPDATE:
So after going through all the frustration, it seems that NServiceBus was trying to connect to the RavenDB using the port 8080. Because I had RavenDB installed already for some other projects, it seemed that "RuMeFirst.bat" figured it wouldn't use the NServiceBus provided db (maybe?) and instead wanted to use my previous install. Problem was, my original installation of RavenDB was running on port 8079 (I think that's the default for RavenDB). So when I would run NServiceBus with just a simple EndpointConfig class as a server, it wouldn't find anything on port 8080 and wouldn't want to run.
Moral of the story: Remove RavenDB before installing NServiceBus OR run RavenDB on port 8080 and then install NServiceBus to remove any of these errors that I got originally.