containers
containers copied to clipboard
[bitnami/bitnami-docker-solr] Unable to start in SolrCloud mode
Description
Steps to reproduce the issue:
- Created a new solr helm chart having statefulset with the solr docker image
- statefulset created successfully and service also exposed externally.
- got the external IP for the solr service
Describe the results you received:
When I check the UI from the external IP that I received above, I do not see the collections dropdown. Core is created using the environement parameter i had provided.
But I'm unable to create a new collection.
Describe the results you expected:
I expect to see the solr collections dropdown as shown below. This is not showing:
Additional information you deem important (e.g. issue happens only occasionally):
Version
- Output of
docker version
:
Client: Docker Engine - Community
Cloud integration: 1.0.4
Version: 20.10.0
API version: 1.41
Go version: go1.13.15
Git commit: 7287ab3
Built: Tue Dec 8 18:55:43 2020
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.0
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: eeddea2
Built: Tue Dec 8 18:58:04 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
- Output of
docker info
:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.4.2-docker)
scan: Docker Scan (Docker Inc., v0.5.0)
Server:
Containers: 10
Running: 0
Paused: 0
Stopped: 10
Images: 55
Server Version: 20.10.0
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.121-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 1.941GiB
Name: docker-desktop
ID: AUWP:DEDG:TRTU:M3TW:JNIU:ODLK:3GTV:SDKS:X6DT:LZDF:XDU7:U7Q3
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
- Output of
docker-compose version
(if applicable):
(paste your output here)
Additional environment details (AWS, VirtualBox, Docker for MAC, physical, etc.):
Hi, This image is running solr not solr cloud. Collections are a concept that only exists in solr cloud. You can see in the screenshots you provided that there is not "cloud" icon in the UI.
However, you can connect to the pod and run:
$ solr create gettingstarted
$ post -c gettingstarted /opt/bitnami/solr/example/exampledocs/*.xml
It will create example documents in the gettingstarted
core, later you cat retrieve them by browsing: http://localhost:8983/solr/gettingstarted/select?q=*%3A*
Thanks @rafariossaa , Understood. Couple more questions:
- It worked fine when I created the cores from the pod, but when i tried to do the same from UI, I get the following error:

- Is there a way to use a zookeeper with this? Can we pass a parameter to this container if we have set up one with zookeeper helm chart?
Hi,
1- It worked fine when I created the cores from the pod, but when i tried to do the same from UI, I get the following error:
As you can see in the form, you need to have the instanceDir
and dataDir
created before you can add the core. The instance directory need to have a structure and some files (solrconfig and schema.xml) created there.
Could you take a look to this ? Also the create_core
command indicates:
$ solr create_core -help
Usage: solr create_core [-c core] [-d confdir] [-p port] [-V]
When a configSet is used, this can be run from remote (non-Solr) hosts. If pointing at a non-configSet directory, this
must be run from the host that you wish to create the core on
-c <core> Name of core to create
-d <confdir> Configuration directory to copy when creating the new core, built-in options are:
_default: Minimal configuration, which supports enabling/disabling field-guessing support
sample_techproducts_configs: Example configuration with many optional features enabled to
demonstrate the full power of Solr
If not specified, default is: _default
Alternatively, you can pass the path to your own configuration directory instead of using
one of the built-in configurations, such as: bin/solr create_core -c mycore -d /tmp/myconfig
-p <port> Port of a local Solr instance where you want to create the new core
If not specified, the script will search the local system for a running
Solr instance and will use the port of the first server it finds.
-V Enable more verbose output.
As you can see -d
is used as source to copy from, but form the UI you don't have that option and it is needed to provide the files.
2- Is there a way to use a zookeeper with this? Can we pass a parameter to this container if we have set up one with zookeeper helm chart?
You can indicate the zookeeper nodes by using the environment variable ZK_HOST
. You can get more information here. But take into account that you will also need to start solr with -e cloud
parameter.
Hi @rafariossaa If having an external zookeeper works in SolrCloud mode, I would prefer to use Cloud mode.
Tried the below 2 things:
-
Started the solr nodes in normal mode. And then got into the container to start solr in 'SolrCloud' mode with external zookeeper. This works and starts another solr instance within the pod at a different port.
solr start -e cloud -z test-solr-zookeeper-headless:2181
-
Added the same command in the pod so the pod starts solr in 'Cloud' mode. This did not work as the script is interactive and needs some additional parameters to be set (like no of shards, no of nodes etc). Additionally this needs a different port to start SolrCloud (works like a different instance of solr within the pod)
So it looks like we will need to modify the run.sh
script to start Solr in Cloud mode, basically a modification to the image.
Thanks Geeta
Could you give it a try to this ?
- Use the following compose.
- Start it with:
docker-compose up
- Enter the container with:
docker exec -it bitnami-docker-solr_solr_1 bash
- Create initial data in zookeeper:
/opt/bitnami/solr/bin/solr zk mkroot /solr -z zk1:2181,zk2:2181,zk3:2181
- Start solr cloud:
"/opt/bitnami/solr/bin/solr" start -cloud -p 8983 -z zk1:2181,zk2:2181,zk3:2181/solr -d /opt/bitnami/solr/server/ -f
- Browse to
http://localhost:8983
$ cat docker-compose.yml
version: '2'
services:
solr:
entrypoint: tail -f /dev/null
image: 'docker.io/bitnami/solr:8-debian-10'
environment:
- SOLR_CORE=my_core
- ZK_HOST="zk1:2181,zk2:2181,zk3:2181/solr"
ports:
- '8983:8983'
volumes:
- 'solr_data:/bitnami'
zk1:
image: 'docker.io/bitnami/zookeeper:3-debian-10'
ports:
- '2181'
volumes:
- zookeeper_data:/bitnami
environment:
- ZOO_SERVER_ID=1
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVERS=zk1:2888:3888,zk2:2888:3888,zk3:2888:3888
zk2:
image: 'docker.io/bitnami/zookeeper:3-debian-10'
ports:
- '2181'
volumes:
- zookeeper2_data:/bitnami
environment:
- ZOO_SERVER_ID=2
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVERS=zk1:2888:3888,zk2:2888:3888,zk3:2888:3888
zk3:
image: 'docker.io/bitnami/zookeeper:3-debian-10'
ports:
- '2181'
volumes:
- zookeeper3_data:/bitnami
environment:
- ZOO_SERVER_ID=3
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_SERVERS=zk1:2888:3888,zk2:2888:3888,zk3:2888:3888
volumes:
zookeeper_data:
driver: local
zookeeper2_data:
driver: local
zookeeper3_data:
driver: local
solr_data:
driver: local
This would be just a workaround, as you can see I am overriding the entrypoint
of the solr image.
This initialization for solr cloud should be handled by the image or maybe creating a specific image for solr cloud.
Thanks @rafariossaa As discussed, will wait for the bitnami image with Cloud mode.
Thanks Geeta
You are welcome. We have opened an internal task for this. We will come back as soon as we have news.
Sure, will wait for that update.
Not sure if it was addressed in bitnami/charts#4951 but we are going to transfer this issue to bitnami/containers
. @rafariossaa Could check it?
In order to unify the approaches followed in Bitnami containers and Bitnami charts, we are moving some issues in bitnami/bitnami-docker-<container>
repositories to bitnami/containers
.
Please follow bitnami/containers to keep you updated about the latest bitnami images.
More information here: https://blog.bitnami.com/2022/07/new-source-of-truth-bitnami-containers.html