title: Solr 4 Host Port and Context information (ZooKeeper Base URL) settings
body: <p>I am trying to upgrade from Solr 4-Beta to Solr 4.  While using Solr 4-beta, I configured the host and port number in Solr.xml file as below, and everything worked fine.</p>
  
  <pre><code>&lt;solr persistent="true"&gt;
    &lt;cores host="xxx.xx.x.xxx" adminPath="/admin/cores" hostPort="8180" hostContext="solr4" sharedLib="lib"&gt;
    &lt;/cores&gt;
  &lt;/solr&gt;
  </code></pre>
  
  <p>But when I upgraded to Solr 4.0, the ZooKeeper base URL is being set to "http://Computer-name:8983/Solr" which throws the below exception while contacting the other nodes.  For some reason the ZooKeeper initialization is not picking the host and port information from the Solr.xml, but is getting the default Solr port and context information.   Can someone please help on how to correct this ZooKeeper's base_url?</p>
  
  <pre><code>SEVERE: Error while trying to recover. core=collection1:org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://ComputerName:8983/solr
      at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:413)
      at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:181)
      at org.apache.solr.cloud.RecoveryStrategy.sendPrepRecoveryCmd(RecoveryStrategy.java:199)
      at org.apache.solr.cloud.RecoveryStrategy.doRecovery(RecoveryStrategy.java:388)
      at org.apache.solr.cloud.RecoveryStrategy.run(RecoveryStrategy.java:220)
  Caused by: java.net.UnknownHostException: COMPUTER-NAME
      at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
      at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:849)
      at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1202)
      at java.net.InetAddress.getAllByName0(InetAddress.java:1153)
      at java.net.InetAddress.getAllByName(InetAddress.java:1083)
      at java.net.InetAddress.getAllByName(InetAddress.java:1019)
      at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:242)
      at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:130)
      at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:150)
      at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
      at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:575)
      at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
      at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
      at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:352)
      ... 4 more 
  </code></pre>