Skip to content

An error has occurred while searching when running Wikibase without Elasticsearch #296

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

Closed
persona0591 opened this issue Jan 11, 2022 · 10 comments

Comments

@persona0591
Copy link

Hi all,

I'm trying to run Wikibase using the (full) docker-compose.yml and docker-compose.extra.yml example files. This is working perfectly.

However, I don't want to run Elasticsearch. Therefore I've removed the relevant service in docker-compose.extra.yml and the relevant part of extra-install.sh.

If I now start Wikibase, add a new item and then search for this item using MediaWiki's search box, the following error is displayed:

An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later.

I'm not sure what the cause of this error is. Could it be that Wikibase assumes Elasticsearch is running? If so, how can I change this behavior?

Thank you :)

search-error

@ross-spencer
Copy link

Hi George,

I had the same problem recently and was scratching my head as I thought I had the same config as another server not running Elasticsearch but I found a couple of extra lines of configuration and commented those out too.

I have copied my config here if it helps you find what you need:

Once the config was in place, IIRC running sudo docker-compose -f docker-compose.yml -f docker-compose.extra.yml up -d --force-recreate was enough to fix things for me.

My config might be a little out of date now, I haven't been able to follow the changes in this repo, but hopefully they haven't diverged too much.

@persona0591
Copy link
Author

Hi @ross-spencer,

Wow! Your config is indeed a little out of date, but I can clearly see why you've managed to disable Elasticsearch: in docker-compose-extra.yml you've commented the lines with the Elasticsearch environment variables:

https://gist.github.com/ross-spencer/26ee9b999d9e36dcdfca90c107562577#file-docker-compose-extra-yml-L9-L10

I've just tried the same in the new docker-compose-extra.yml config - and it works: I can use Wikibase's search functionality again.

Problem solved - although this perhaps could be documented a bit better in the example files :)

Thank you very much!

@ross-spencer
Copy link

Nice, thanks @persona0591, glad it worked! +1 on inspiration for docs. I have a related hope for the docs for a recommendation on Elastic vs. Cirrus and use-cases. It's interesting that Cirrus can satisfy some requirements and should also reduce maintenance complexity.

@toban
Copy link
Contributor

toban commented Jan 12, 2022

Hello,

I've added PR to make this a bit more clear in the template

#299

Thanks @ross-spencer for helping out! 💯

@persona0591
Copy link
Author

Thank you, @toban!

@toban toban closed this as completed Jan 14, 2022
@versant2612
Copy link

I've tried this solution to disable the application search error but it didn't worked.

My extra-install.sh file is a directory ?!?!?!?!?!?!

@toban
Copy link
Contributor

toban commented May 3, 2022

I've tried this solution to disable the application search error but it didn't worked.

My extra-install.sh file is a directory ?!?!?!?!?!?!

Hey, this sounds like the extra-install.sh file might not have been mounted correctly. From my experience if the extra-install.sh file is mounted as a directory this probably means the file does not exist on the host machine and docker therefore creates it as a folder instead.

@versant2612
Copy link

@toban I copied the extra-install.sh from example directory to the installation directory and tried again. But it didn't solved. I do want to use Elastic Search.

@toban
Copy link
Contributor

toban commented May 4, 2022

@toban I copied the extra-install.sh from example directory to the installation directory and tried again. But it didn't solved. I do want to use Elastic Search.

The extra-install.sh script is by default located in the same directory as the docker-compose.yml and docker-compose.extra.yml files.

If you check it's mounted by the docker-compose.extra.yml file like this
https://github.com/wmde/wikibase-release-pipeline/blob/main/example/docker-compose.extra.yml#L13

 wikibase:
    volumes:
      - quickstatements-data:/quickstatements/data
      - ./extra-install.sh:/extra-install.sh

Could you describe the problem you are having a bit more in detail with some logs and maybe explain what your installation directory contains I think we get get it working.

@toban
Copy link
Contributor

toban commented May 4, 2022

@toban I copied the extra-install.sh from example directory to the installation directory and tried again. But it didn't solved. I do want to use Elastic Search.

The extra-install.sh script is by default located in the same directory as the docker-compose.yml and docker-compose.extra.yml files.

If you check it's mounted by the docker-compose.extra.yml file like this https://github.com/wmde/wikibase-release-pipeline/blob/main/example/docker-compose.extra.yml#L13

 wikibase:
    volumes:
      - quickstatements-data:/quickstatements/data
      - ./extra-install.sh:/extra-install.sh

Could you describe the problem you are having a bit more in detail with some logs and maybe explain what your installation directory contains I think we get get it working.

sorry just realized you have another issue open, lets continue in there.

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

4 participants