I have used .NET to create a service installation package (msi) that, when run, installs a Windows service designed to run an instance of Apache Solr (to aid in searching from a web application). I am running the service on the same machine where Solr is hosted. When I start it up, I get:
Service cannot be started. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it [MachineIP]:8983 at System.Net.Sockets.Socket.DoConnect(EndPoint endpoingSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse() at SOLRService.SolrService.OnStart(String[] args) at System.ServiceProcess.ServiceBase.ServiceQueuedMainCallback(Object state)
Where [MachineIP] is the IP of the box. Again, I'm attempting to start this service from the same box it's trying to connect to. I tried pinging its own IP, just for kicks, and it came back fine. I'm just not understanding why a server would actively refuse a connection to itself. We've been able to get this to work in development.
Thanks.