I tried to use an external solr according to the documentation here: GitHub - xwiki/xwiki-docker: Dockerfile to build and run XWiki on docker
The step: “Select the appropriate XWiki Solr configuration JAR” is a bit confusing since I have no clue what the appropriate XWiki Solr configuration JAR is.
Thanks to this post however: Solr external setup with docker
I conclueded that 9.4.1 would be the correct version according to the documentation
when starting the solr it fails due to missing unzip which is used in the solr-init.sh
/opt/solr/docker/scripts/solr-foreground: running /docker-entrypoint-initdb.d/solr-init.sh
/docker-entrypoint-initdb.d/solr-init.sh: line 30: unzip: command not found
I can only assume I am missing something, wouldn’t really want to start building custom docker images just to add the unzip.
I unpacked the file outside of the container, changed the script to copy the files and stumbled over the next issue:
2024-10-16 17:26:42.514 INFO (main) [c: s: r: x: t:] o.a.s.c.SolrXmlConfig solr.xml not found in SOLR_HOME, using built-in default
2024-10-16 17:26:42.517 INFO (main) [c: s: r: x: t:] o.a.s.c.SolrXmlConfig Loading solr.xml from /opt/solr-9.4.1/server/solr/solr.xml
so I added a copy of the xml file
cp solr.xml /var/solr/data/
which finally starts up solr but unfortunately it seems that it was still using the local solr.
after updating xwiki.properties
like this
solr.type=remote
solr.remote.baseURL=http://$INDEX_HOST:$INDEX_PORT/solr
I am facing the next issue:
Caused by: org.apache.http.client.ClientProtocolException: URI does not specify a valid host name: http://$INDEX_HOST:$INDEX_PORT/solr/admin/info/system?wt=javabin&version=2
changed it to use the real hostname and port:
solr.type=remote
solr.remote.baseURL=http://xwiki-index:8983/solr
which now leads me to the next issue.
2024-10-16 17:48:56.139 INFO (qtp1212191909-20) [c: s: r: x: t:null-16] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/cores params={name=xwiki_events_9&action=CREATE&wt=javabin&version=2} status=400 QTime=14
2024-10-16 17:48:59.508 INFO (qtp1212191909-21) [c: s: r: x: t:null-17] o.a.s.s.HttpSolrCall [admin] webapp=null path=/admin/cores params={action=STATUS&indexInfo=true&wt=javabin&version=2} status=0 QTime=2
2024-10-16 17:48:59.519 INFO (qtp1212191909-20) [c: s: r: x:xwiki_extension_index_9 t:null-18] o.a.s.h.a.CoreAdminOperation core create command name=xwiki_extension_index_9&action=CREATE&wt=javabin&version=2
2024-10-16 17:48:59.532 ERROR (qtp1212191909-20) [c: s: r: x: t:null-18] o.a.s.h.RequestHandlerBase Client exception => org.apache.solr.common.SolrException: Error CREATEing SolrCore 'xwiki_extension_index_9': Unable to create core [xwiki_extension_index_9] Caused by: Can't find reso
urce 'solrconfig.xml' in classpath or '/var/solr/data/xwiki_extension_index_9'
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1614)
org.apache.solr.common.SolrException: Error CREATEing SolrCore 'xwiki_extension_index_9': Unable to create core [xwiki_extension_index_9] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/var/solr/data/xwiki_extension_index_9'
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1614) ~[?:?]
at this point I have to give up. I followed the documentation to the best of my abilities. Either I am missing something or there is some other issue.
Can someone sched some insight on how to get this to work?