Mohamed Seif
Mohamed Seif

Reputation: 410

Solr is trying to connect to different external server IP

I'm running SolrCloud example, Solr 5.4 with Zookeeper 3.5.2 alpha. the Cloud is running but i got this error :

ERROR: Error from server at http://localhost:8983/solr: Expected mime type application/octet-stream but got text/html. <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /solr/gettingstarted/config. Reason:
<pre>    Not Found</pre></p><hr><i><small>Powered by Jetty://</small></i><hr/>

</body>
</html>

SolrCloud example running, please visit: http://localhost:8983/solr 

Then when i try to delete collection with

./solr delete -c gettingstarted

I got error saying that deleting the collection is connecting to 104.239.213.7 instead of localhost, which doesn't connect of course. Error :

Deleting collection 'gettingstarted' using command:
http://104.239.213.7:8983/solr/admin/collections?action=DELETE&name=gettingstarted

ERROR: Connection refused (Connection refused)

I don't know what's happening, or how could I change this wrong IP, help..thank you

Upvotes: 1

Views: 1349

Answers (1)

Mohamed Seif
Mohamed Seif

Reputation: 410

I found out this is a Jetty default server, to change it, edit solr.in.sh file in solr server directory and add these two lines :

SOLR_OPTS="192.168.1.1"
SOLR_OPTS="$SOLR_OPTS -Djetty.host=192.168.1.1"

Change 192.167.1.1 to whatever server IP you like, in my case i changed it to localhost

Upvotes: 1

Related Questions