Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


share|improve this question
Have you checked the windows firewall to make sure port 8983 is open in the proper context? – smithian Oct 18 '12 at 16:51

Connection refused means that nothing is listening on that port (8983 in your case). Start the service which is supposed to listen for connections on that port.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.