Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indices not created: Error thrown while handling message CIHub\…\RebuildIndexElementMessage #53

Closed
NiklasBr opened this issue May 17, 2024 · 3 comments

Comments

@NiklasBr
Copy link

Pimcore version(s) affected

3.0.17

Description

Errors in the log and no indices in Elastic Search:

16:10:06 WARNING   [messenger] Error thrown while handling message CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\RebuildIndexElementMessage. Sending for retry #3 using 4000 ms delay. Error: "Handling "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\RebuildIndexElementMessage" failed: 404 Not Found: {"error":"alias [datahub_restindex__CI1__asset] missing","status":404}" ["class" => "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\RebuildIndexElementMessage","retryCount" => 3,"delay" => 4000,"error" => "Handling "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\RebuildIndexElementMessage" failed: 404 Not Found: {"error":"alias [datahub_restindex__CI1__asset] missing","status":404}","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException { …}]
16:10:10 CRITICAL  [messenger] Error thrown while handling message CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\RebuildIndexElementMessage. Removing from transport after 3 retries. Error: "Handling "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\RebuildIndexElementMessage" failed: 404 Not Found: {"error":"alias [datahub_restindex__CI1__asset] missing","status":404}" ["class" => "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\RebuildIndexElementMessage","retryCount" => 3,"error" => "Handling "CIHub\Bundle\SimpleRESTAdapterBundle\Messenger\RebuildIndexElementMessage" failed: 404 Not Found: {"error":"alias [datahub_restindex__CI1__asset] missing","status":404}","exception" => Symfony\Component\Messenger\Exception\HandlerFailedException { …}]

How to reproduce

bo-hub/ci-hub-adapter-bundle v3.0.1
pimcore/data-hub v1.7.0
pimcore/pimcore v11.2.3
pimcore/elasticsearch-client v1.0.1

Cpnfiguration pimcore/var/config/data_hub/CI1.yaml:

pimcore_data_hub:
    configurations:
        CI1:
            general:
                active: 'on'
                type: ciHub
                name: CI1
                description: ''
                modificationDate: 1715954721
                path: null
                createDate: 1715938788
            schema:
                assets:
                    enabled: 'on'
                    allowOriginalImage: 'on'
                    thumbnails:
                        - card
                        - detail_print
                        - large_print
                        - nav_icon
                dataObjectClasses:
                    -
                        id: Product
                        name: Product
                        columnConfig:
                            id:
                                name: id
                                position: 1
                                hidden: false
                                fieldConfig:
                                    key: id
                                    label: ID
                                    type: system
                            articleNumber:
                                name: articleNumber
                                position: 2
                                hidden: false
                                fieldConfig:
                                    key: articleNumber
                                    label: 'Article number (articleNumber)'
                                    type: input
                            GTIN:
                                name: GTIN
                                position: 3
                                hidden: false
                                fieldConfig:
                                    key: GTIN
                                    label: 'GTIN (13 tall) (GTIN)'
                                    type: input
                            productNumber:
                                name: productNumber
                                position: 4
                                hidden: false
                                fieldConfig:
                                    key: productNumber
                                    label: 'Product number (productNumber)'
                                    type: input
                            productDescription:
                                name: productDescription
                                position: 5
                                hidden: false
                                fieldConfig:
                                    key: productDescription
                                    label: 'Product name (productDescription)'
                                    type: input
                            urlSlug:
                                name: urlSlug
                                position: 6
                                hidden: false
                                fieldConfig:
                                    key: urlSlug
                                    label: 'URL Slug (urlSlug)'
                                    type: urlSlug
                        language: en
            labelSettings: {  }
            workspaces: {  }
            permissions:
                user: {  }
                role: {  }

Click Save and wait for the messenger queue to try to index content.

Possible Solution

No response

Additional Context

Settings according to docs with the ngram set for ES8.

Elastic Search docker image v8.11.1 with these settings where the host resolves to http://pimcore-elasticsearch:9200:

pimcore_elasticsearch_client:
    es_clients:
        default:
            hosts:
                - '%env(resolve:ELASTIC_SEARCH_PROTO)%://%env(resolve:ELASTIC_SEARCH_HOST)%:%env(resolve:ELASTIC_SEARCH_PORT)%'
            logger_channel: 'pimcore.elasticsearch'
            http_options:
                timeout: 13 # Request timeout in seconds
Copy link

Thank you for reporting this problem!

This is an open source project, and we rely on the community to help us diagnose and fix issues, as it is not possible to investigate and fix every issue reported to us via GitHub.

If possible, please create a pull request that fixes the problem you describe, along with appropriate tests. All pull requests will be promptly reviewed by the BrandOriented team.

Thank you very much!

@labudzinski
Copy link

You need to check that the appropriate index/aliases are created in ES when saving the configuration. Let me know

@NiklasBr
Copy link
Author

I think the latest update fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants