Be aware that you still have to setup tomcat to run Solr on the right port - 
and you also have to provide the port to Solr on startup. With jetty we do both 
with -Djetty.port - with Tomcat you have to setup Tomcat to run on the right 
port *and* tell Solr what that port is. By default that means also passing 
-Djetty.port - but you can change that to whatever you want in solr.xml (to 
hostPort or solr.port or whatever).

The problem is that it's difficult for a webapp to find what ports it's running 
on - you can only do it when a request actually comes in to my knowledge.

- Mark

On Dec 5, 2012, at 1:05 PM, Bill Au <bill.w...@gmail.com> wrote:

> I am using tomcat.  In my tomcat start script I have tried setting system
> properties with both
> 
> -Djetty.port=8080
> 
> and
> 
> -DhostPort=8080
> 
> but neither changed the host port for SolrCloud.  It still uses the default
> 8983.
> 
> Bill
> 
> 
> On Wed, Dec 5, 2012 at 12:11 PM, Jack Krupansky 
> <j...@basetechnology.com>wrote:
> 
>> Solr runs in a container and the container controls the port. So, you need
>> to tell the container which port to use.
>> 
>> For example,
>> 
>> java -Djetty.port=8180 -jar start.jar
>> 
>> -- Jack Krupansky
>> 
>> -----Original Message----- From: Bill Au
>> Sent: Wednesday, December 05, 2012 10:30 AM
>> To: solr-user@lucene.apache.org
>> Subject: setting hostPort for SolrCloud
>> 
>> 
>> Can hostPort for SolrCloud only be set in solr.xml?  I tried setting the
>> system property hostPort and jetty.port on the Java command line but
>> neither of them work.
>> 
>> Bill
>> 

Reply via email to