Access Solr Admin UI in container from the outside

Viewed 110

I have a container in which a solr instance is started. Inside the container everything works fine but if I want to access the Admin UI from outside of the container it does not work.

My setup:

docker-compose.yml with container which forwards the port 8983 (ports: - "8983:8983")

If I run curl http://Container_IP:8983/solr/ on my host I get connection refused.

If I run curl http://localhost:8983/solr/ inside the container I get the front page of the solr Admin panel.

Edit: netstat -anp | grep :8983

results in

tcp 0 0 127.0.0.1:8983 0.0.0.0:* LISTEN -
What am I missing?

1 Answers

So I found out that the problem is the jetty host. If I start solr like this:

./solr -h 0.0.0.0 -a "-Djetty.host=0.0.0.0"

the admin interface is reachable from the outside.

One Question remains for me: Is it possible to set this call parameters (-h and -a) somewhere in the config files?

Related