Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
share|improve this question
    
Could it be a firewall blocking tcp 8983? Either on your solr host or in your network between client and server? –  ErikE Nov 8 '13 at 4:25

2 Answers 2

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:

/etc/tomcat6/server.xml

I look for the Connector settings and add address="127.0.0.1" which locks the Tomcat install to 127.0.0.1 (aka: localhost)

<Connector port="8080" protocol="HTTP/1.1"
           address="127.0.0.1"
           connectionTimeout="20000"
           URIEncoding="UTF-8"
           redirectPort="8443" />

So in your case, I would just remove the address setting like so:

<Connector port="8080" protocol="HTTP/1.1"  
           connectionTimeout="20000"
           URIEncoding="UTF-8"
           redirectPort="8443" />

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.

share|improve this answer

Can you check that the Solr server is listening to the correct interfaces ?

What's the output of :

netstat -anp | grep :8983

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.

share|improve this answer
    
I've updated my answer with the output. –  Steve Robbins Nov 7 '13 at 23:41
    
Ok, now can you precise what kind of error it is : A conection Timeout, or a connection refused ? If you issue a telnet 192.168.1.9 8983 on your client, what's the output ? If it's a Timeout, it should be a firewall or connectivity issue. If it's a Refuse, the server explicitely refused the connection: the firewall or the application explicitely refused it. –  Adrien M. Nov 8 '13 at 8:42
    
The connection is being refused. How do I allow it? –  Steve Robbins Nov 8 '13 at 18:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.