You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Bram Van Dam <br...@intix.eu> on 2016/03/30 13:45:34 UTC
[Possible Bug] 5.5.0 Startup script ignoring host parameter?
Hi folks,
It looks like the "-h" parameter isn't being processed correctly. I want
Solr to listen on 127.0.0.1, but instead it binds to all interfaces. Am
I doing something wrong? Or am I misinterpreting what the -h parameter
is for?
Linux:
# bin/solr start -h 127.0.0.1 -p 8180
# netstat -tlnp | grep 8180
tcp6 0 0 :::8180 :::*
LISTEN 14215/java
Windows:
> solr.cmd start -h 127.0.0.1 -p 8180
> netstat -a
TCP 0.0.0.0:8180 MyBox:0 LISTENING
The Solr JVM args are likely the cause. From the Solr Admin GUI:
-DSTOP.KEY=solrrocks
-Dhost=127.0.0.1
-Djetty.port=8180
Presumably that ought to be -Djetty.host=127.0.0.1 instead of -Dhost?
This has potential security implications for us :-(
Thanks,
- Bram
Re: [Possible Bug] 5.5.0 Startup script ignoring host parameter?
Posted by Bram Van Dam <br...@intix.eu>.
On 30/03/16 16:45, Shawn Heisey wrote:
> The host parameter does not control binding to network interfaces. It
> controls what hostname is published to zookeeper when running in cloud mode.
Oh I see. That wasn't clear from the documentation. Might be worth
adding such a parameter to the startup script, in which case.
But for now I'll just edit the config file, thanks for the tip!
- Bram
Re: [Possible Bug] 5.5.0 Startup script ignoring host parameter?
Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/30/2016 5:45 AM, Bram Van Dam wrote:
> It looks like the "-h" parameter isn't being processed correctly. I want
> Solr to listen on 127.0.0.1, but instead it binds to all interfaces. Am
> I doing something wrong? Or am I misinterpreting what the -h parameter
> is for?
The host parameter does not control binding to network interfaces. It
controls what hostname is published to zookeeper when running in cloud mode.
Solr's networking is provided by a third-party application -- the
servlet container. In 5.x, we took steps to ensure that the container
everyone uses is Jetty. The default Jetty configuration supplied with
Solr will bind to all interfaces. If you want to control interface
binding, you need to edit the Jetty config, in server/etc. The file
most likely to need changes is server/etc/jetty.xml.
The folliwing URL contains Jetty's documentation on how to configure the
networking. Right now this URL applies to version 9, used in Solr 5.x:
http://www.eclipse.org/jetty/documentation/current/configuring-connectors.html
Thanks,
Shawn