docker-solr / docker-solr-examples

Examples for Docker-Solr
Apache License 2.0
61 stars 58 forks source link

Change Solr Port #8

Open jasi110 opened 4 years ago

jasi110 commented 4 years ago

I'm using this docker-compose.yml, but I need to change the port for the Solr instances so they are unique. I'm trying to use podman in Fedora 32. I mounted /var/solr to my host and updated the solr.xml in each solr to have a unique Jetty port, I also mounted /etc/default, and created a "solr" file in each solr that states a unique SOLR_PORT. The "solr" file is a copy of solr.in.sh renamed to just "solr" and has the SOLR_PORT line uncommented and set to the same value as the Jetty port. I also modified the docker-compose.yml file to use 8981:8981 for solr1, 8982:8982 for solr2, and 8983 for solr3. So the ports match in solr.xml, "solr", and docker-compose.yml. However, it always seems to use 8983, since only the solr 3 container runs and the others fail with: 2020-06-16 08:45:44.922 WARN (main) [ ] o.e.j.x.XmlConfiguration => java.security.PrivilegedActionException: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8983 Caused by: java.net.BindException: Address already in use

dsmiley commented 4 years ago

Containerization has been a revolution in how systems are deployed because it isolates processes to such a high degree that it doesn't matter what port software runs on within the container. I don't know about "podman" but it seems you are trying to get each process to use a different port which just seems like a fundamental disconnect with what containerization enables.