1

On running docker-compose up -d this container always gives an error for me.

enter image description here

I have modified the solr port in docker compose yml, because with PORT 8983 another solr running in my local. When I checked logs for the particular container failure I found that still it is referring to the 8983 port. Any suggestion on resolving this error?

enter image description here

Thanks

2 Answers 2

1

If we look at how Solr is defined in the docker-compose.yml file, we'll see that the port is set to map to :8984 on your local machine to :8983 on the running Solr container.

enter image description here

In my case, I have multiple Solr instances running on my machine from previously installed Sitecore instances.

Whenever I installed new Solr instances, avoiding using ports that were already being used for existing Solr instances was a prerequisite (eg. if I have one version of Solr running on 8983, for the new version of Solr I'd use 8984. If I needed another version of Solr, that one would use 8985, etc). The same applies in this case.

Because the default Sitecore 10 Docker Compose is trying to use port 8984, it must be available.

Solution: Check if there are multiple instances of solr running and stop instance running on the default port or change port number in docker-compose.yml

Hope it helps!

2
  • Thanks for the answer @Sumit Helaiya, Sorry If I m not clear in framing my question but I have already modified the SOLR port in docker-compose.yml to 8988 and this port is available. But still in error logs I see 8983 , So apart from docker compose .yml Do I need to change anywhere? Commented May 22, 2023 at 2:36
  • Check which solr sercive uses 8988 and stop that sercive and try again. Commented May 22, 2023 at 3:48
0

I would suggest you check if your solution has the file called docker-compose.override.yml. The docker-compose.override.yml is the configuration file where you can override existing settings from docker-compose.yml or even add completely new services.

How does docker-compose.override.yml work?

When you run docker-compose up, it searches for a file named docker-compose.yml and reads all configured services, networks, volumes etc to create your Docker stack. If you also additionally have a file named docker-compose.override.yml this will be read as well and used as an override file to complement. It works in the following order:

  1. All definitions from docker-compose.yml will be used
  2. All definitions that are also defined in docker-compose.override.yml will automatically overwrite the settings from docker-compose.yml
  3. All definitions only available in docker-compose.override.yml will be added additionally.

For more context use this article and compare your solution.

https://devilbox.readthedocs.io/en/latest/configuration-files/docker-compose-override-yml.html

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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