# Can't install external solr, unzip is missing

**URL:** <https://forum.xwiki.org/t/cant-install-external-solr-unzip-is-missing/15743>\
**Category:** Help / Discuss\
**Created:** [October 16, 2024, 6:06pm UTC](https://forum.xwiki.org/t/cant-install-external-solr-unzip-is-missing/15743 "2024-10-16T18:06:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![precut-banked](https://forum.xwiki.org/letter_avatar_proxy/v4/letter/p/91b2a8/32.png) [@precut-banked](https://forum.xwiki.org/u/precut-banked)\
**Post date:** [October 16, 2024, 6:06pm UTC](https://forum.xwiki.org/t/cant-install-external-solr-unzip-is-missing/15743/1 "2024-10-16T18:06:37Z")

</div>

I tried to use an external solr according to the documentation here: [GitHub - xwiki/xwiki-docker: Dockerfile to build and run XWiki on docker](https://github.com/xwiki/xwiki-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](https://forum.xwiki.org/t/solr-external-setup-with-docker/11495)

I conclueded that 9.4.1 would be the correct version according to the [documentation](https://extensions.xwiki.org/xwiki/bin/view/Extension/Solr%20Search%20API#HManualinstall)

when starting the solr it fails due to missing unzip which is used in the [solr-init.sh](https://github.com/xwiki/xwiki-docker/blob/master/contrib/solr/solr-init.sh)

```auto
/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:

```auto
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

```bash
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

```auto
solr.type=remote
solr.remote.baseURL=http://$INDEX_HOST:$INDEX_PORT/solr

```

I am facing the next issue:

```auto
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:

```auto
solr.type=remote
solr.remote.baseURL=http://xwiki-index:8983/solr

```

which now leads me to the next issue.

```auto
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?
