Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, we’re facing an issue at the deployment pipeline with `console search:setup` , did anybody en

Options
daniel183
daniel183 Spryker Solution Partner Posts: 13 🧑🏻‍🚀 - Cadet
edited December 2022 in Help

Hello,
we’re facing an issue at the deployment pipeline with console search:setup , did anybody encounter this error before?
There is a comment saying that empty mapping causes it, but I don’t know how to resolve it.
Any advice would be appreciated.
Thank you!

Command setup-search for DE store [vendor/bin/console search:setup -vvv --no-ansi]
--------------------------------------------------------------------------------

Store: DE | Environment: docker.staging
[info] Import mappings and settings for index "spryker-cloud_de_merchant".

[2022-12-28T13:34:19.346671+00:00] Zed.ERROR: CLI command "search:setup" exception, message "class java.util.ArrayList cannot be cast to class java.util.Map (java.util.ArrayList and java.util.Map are in module java.base of loader 'bootstrap')" {"exception":"[object] (Elastica\\Exception\\ResponseException(code: 0): class java.util.ArrayList cannot be cast to class java.util.Map (java.util.ArrayList and java.util.Map are in module java.base of loader 'bootstrap') at /data/vendor/ruflin/elastica/src/Transport/Http.php:178)

[stacktrace]

#0 /data/vendor/ruflin/elastica/src/Request.php(183): Elastica\\Transport\\Http->exec(Object(Elastica\\Request), Array)
#1 /data/vendor/ruflin/elastica/src/Client.php(517): Elastica\\Request->send()

Comments

  • daniel183
    daniel183 Spryker Solution Partner Posts: 13 🧑🏻‍🚀 - Cadet
    Options

    Hi @UM0EZB9GT,
    unfortunately not, we forwarded the issue to the Spryker Support but we didn’t get any useful information on how to solve it.
    The only thing I found is the comment regarding empty mapping: https://github.com/spryker/collector/blob/master/src/Spryker/Zed/Collector/Business/Exporter/Writer/Search/ElasticsearchMarkerWriter.php#L98
    However, we’re currently not actively working on the issue, but if there is an update I’ll let you know.

  • s.kroll
    s.kroll Head of Technology Spryker @ basecom Posts: 117 ✨ - Novice
    Options

    Hello @U03RBTQ64MC and thanks for your response. It looks like there was a version mismatch (elastic/search composer packages VS ElasticSearch Server) in oour case.

  • daniel183
    daniel183 Spryker Solution Partner Posts: 13 🧑🏻‍🚀 - Cadet
    Options

    Hi @UM0EZB9GT, thanks for your response, I’m glad it worked out for you!
    Do you have more details on the change? Which versions did you use and which one have been up- or downgraded?
    As with our setup, we have set elastic 7.10 in the deploy file and in composer we use spryker/product-search 5.17.0 with spryker/collector 6.7.0.
    Thank you again!

  • s.kroll
    s.kroll Head of Technology Spryker @ basecom Posts: 117 ✨ - Novice
    Options

    The problem was solved by a colleague but from what he told me, our deployfile was referencing the Elastic Version 6.8 whilst the code, migrations and the composer-packages concerning search were arranged to run against 7.0

  • daniel183
    daniel183 Spryker Solution Partner Posts: 13 🧑🏻‍🚀 - Cadet
    Options

    Thank you 👍 I’m having a closer look to the versions, we did an upgrade lately and it might be possible that some package versions are still wrong.