Skip to content

[Bug]: Default start parameters not working for Solr 9.7.0 #9601

@der-eismann

Description

@der-eismann

Module

Solr

Testcontainers version

1.20.4

Using the latest Testcontainers version?

Yes

Host OS

Linux

Host Arch

x86

Docker version

27.3.1

What happened?

I tried to run Solr 9.7.0 via the SolrContainer integration with solr.withZookeeper(true). However this failed to start, showing only the usage output:

Starting Solr

Usage: solr start [-f] [-c] [--host host] [-p port] [-d directory] [-z zkHost] [-m memory] [-e example] [-s solr.solr.home] [-t solr.data.home] [-a "additional-options"] [-V]
…
  --host <host>         Specify the hostname for this Solr instance

Turns out that Solr changed the format of start parameters to the commonly used --: https://issues.apache.org/jira/browse/SOLR-16824

Starting with -DzkRun --host localhost instead of -DzkRun -h localhost works great, so I thought of setting solr.setCommand("-DzkRun", "--host", "localhost"); to overwrite the args defined here, however this doesn't seem to work.

Would be great if Solr 9.7.0 could be used with embedded Zookeeper within testcontainers 🙂

Relevant log output

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions