So I've installed Solr on a linux server and I want to access it from another web server and/or my computer.
From the Solar Server, I can see that it's running
[root@solr ~]# wget -qO- http://localhost:8983/solr
<html>
<head>
<link rel="stylesheet" type="text/css" href="solr-admin.css">
<link rel="icon" href="favicon.ico" type="image/ico"></link>
<link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
<title>Welcome to Solr</title>
</head>
<body>
<h1>Welcome to Solr!</h1>
<a href="."><img border="0" align="right" height="78" width="142" src="admin/solr_small.png" alt="Solr"/></a>
<a href="admin/">Solr Admin</a>
</body>
</html>
However, plugging http://192.168.1.19:8983/solr/
into my browser, or pinging from my web server, fails to connect. How do I make Solr accessible to other devices on my network?
# netstat -anp | grep :8983
tcp 0 0 :::8983 :::* LISTEN 15138/java
$ telnet 192.168.1.19 8983
Trying 192.168.1.19...
telnet: connect to address 192.168.1.19: Connection refused
telnet: Unable to connect to remote host
How are you running Solr? Under Tomcat? I will assume so, since I know how to restrict to
localhost
under Tomcat & if you just undo what I do to restrict it, then you can network your Solr install.In my case, I disallow Tomcat from dealing with the outside world—I prefer Apache reverse proxying—so I do the following.
I edit the Tomcat
server.xml
over here:I look for the
Connector
settings and addaddress="127.0.0.1"
which locks the Tomcat install to 127.0.0.1 (aka: localhost)So in your case, I would just remove the
address
setting like so:But then again, no idea how your Solr instance is being served. And if it’s not being served via Tomcat, then someone else needs to chime in.
Can you check that the Solr server is listening to the correct interfaces ?
What's the output of :
If you see
127.0.0.1:8983
or::1:8983
that's because your server don't listen to the outside world. You can correct this by editing the configuration of the webserver you are using.Otherwise, if you see
0.0.0.0:8983
the issue may be somewhere else.If you are using
datastax
, update (incassandra.yaml
) thelisten_address:
andrpc_address:
to the IP address of the machine and it will work.By default it's mentioned as
localhost
.