Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing port number for solr-4.3.1

I have been using solr 3 and now I am plan to switch to solr 4. The port that I want to run solr on is 9090 instead of 8080. AFAIK, to change the port number we configure the solr.xml file. The entry in my solr.xml file looks like the following:

<cores adminPath="/admin/cores" defaultCoreName="collection1" host="${host:}" hostPort="9090" hostContext="${hostContext:solr}" zkClientTimeout="${zkClientTimeout:15000}">
<core name="collection1" instanceDir="collection1" />

What is surprising is, when I hit the url: http://[domain]:9090/solr/admin.. it says page not found, but http://[domain]:8983/solr/>.. works just as fine even after changing the port number. I am sure I am missing out something. Can someone please help me on this?

Thanks.

like image 823
dehsams123 Avatar asked Jul 01 '13 18:07

dehsams123


1 Answers

The port value in solr.xml is for Solr Cloud and is not actually where the listen port is defined for the server.

That port is defined (for default Jetty configuration) in jetty.xml file in the example/etc directory. Try changing it there or overriding it from the command line:

java -Djetty.port=9999 -jar start.jar

like image 90
Alexandre Rafalovitch Avatar answered Oct 13 '22 06:10

Alexandre Rafalovitch