changing port number for solr-4.3.1
Asked Answered
C

2

10

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.

Consistence answered 1/7, 2013 at 18:21 Comment(1)
Are trying to run Solr on Jetty? The one which comes with it?Gunboat
M
18

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

Massy answered 3/7, 2013 at 4:13 Comment(0)
G
6

For Solr 5.4.1 you don't have to change any config files. Just run the following command in the Command Prompt to start solr on port number XXXX:

solr-5.4.1\bin\solr start -p XXXX

To stop run this command:

solr-5.4.1\bin\solr stop -p XXXX
Gerrald answered 2/2, 2016 at 15:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.