bar-assistant / docker

21 stars 4 forks source link

barassistant can't find meilisearch #4

Closed mondlichtpierrot closed 1 year ago

mondlichtpierrot commented 1 year ago

Describe the bug After running the Docker Containers like it is mentioned in the Documentation it starts all the containers but the page just stays blank (or Gray)

Versions:

I've been running a docker compose up -d as instructed in the readme. No adjustments to the files. The problem is that the login page states:

Bar Assistant server: http://localhost:3000/bar Status: Not available

The logs say

docker-master-bar-assistant-1 | In Client.php line 170: docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | Could not resolve host: meilisearch for "http://meilisearch:7700/indexes/co docker-master-bar-assistant-1 | cktails/settings". docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | In Psr18Client.php line 135: docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | Could not resolve host: meilisearch for "http://meilisearch:7700/indexes/co docker-master-bar-assistant-1 | cktails/settings". docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | In ErrorChunk.php line 56: docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | Could not resolve host: meilisearch for "http://meilisearch:7700/indexes/co docker-master-bar-assistant-1 | cktails/settings". docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | In CurlResponse.php line 326: docker-master-bar-assistant-1 | docker-master-bar-assistant-1 | Could not resolve host: meilisearch for "http://meilisearch:7700/indexes/co docker-master-bar-assistant-1 | cktails/settings".

karlomikus commented 1 year ago

Are there any logs from Meilisearch?

docker compose logs meilisearch
superfunk2000 commented 1 year ago

I think it's the DB version. Before I did the the pull, I set the Meilisearch version to 1.1 in docker-compose.yaml (image: getmeili/meilisearch:v1.1), as described in the documentation.

And then I get the following errors:

meilisearch_1  | Error: Your database version (1.0.2) is incompatible with your current engine version (1.1.1).
meilisearch_1  | To migrate data between Meilisearch versions, please follow our guide on https://docs.meilisearch.com/learn/update_and_migration/updating.html.
meilisearch_1  | Error: Your database version (1.0.2) is incompatible with your current engine version (1.1.1).
meilisearch_1  | To migrate data between Meilisearch versions, please follow our guide on https://docs.meilisearch.com/learn/update_and_migration/updating.html.
meilisearch_1  | Error: Your database version (1.0.2) is incompatible with your current engine version (1.1.1).
meilisearch_1  | To migrate data between Meilisearch versions, please follow our guide on https://docs.meilisearch.com/learn/update_and_migration/updating.html.
meilisearch_1  | Error: Your database version (1.0.2) is incompatible with your current engine version (1.1.1).
meilisearch_1  | To migrate data between Meilisearch versions, please follow our guide on https://docs.meilisearch.com/learn/update_and_migration/updating.html.
meilisearch_1  | Error: Your database version (1.0.2) is incompatible with your current engine version (1.1.1).
meilisearch_1  | To migrate data between Meilisearch versions, please follow our guide on https://docs.meilisearch.com/learn/update_and_migration/updating.html.
meilisearch_1  | Error: Your database version (1.0.2) is incompatible with your current engine version (1.1.1).
meilisearch_1  | To migrate data between Meilisearch versions, please follow our guide on https://docs.meilisearch.com/learn/update_and_migration/updating.html.
meilisearch_1  | Error: Your database version (1.0.2) is incompatible with your current engine version (1.1.1).
meilisearch_1  | To migrate data between Meilisearch versions, please follow our guide on https://docs.meilisearch.com/learn/update_and_migration/updating.html.
meilisearch_1  | Error: Your database version (1.0.2) is incompatible with your current engine version (1.1.1).
meilisearch_1  | To migrate data between Meilisearch versions, please follow our guide on https://docs.meilisearch.com/learn/update_and_migration/updating.html.

Then I reset the Meilisearch version to 1.0 and imported a backup of the ./data directory. Now comes after the login attempt "Server Error"

image

karlomikus commented 1 year ago

You should see more detailed error message in your BA logs.

As for Meilisearch, to update you can just delete the old instance and volume and pull the new one.

superfunk2000 commented 1 year ago

Made a dump, deleted /data, switched to meiliserach 1.1, pull and started the container. Unfortunately doesn't work.

bar-assistant    | mkdir: cannot create directory '/var/www/cocktails/storage/bar-assistant/uploads': Permission denied
zhdenny commented 1 year ago

Permission denied sounds like a permissions issue. You sure ALL related directories are 33:33?

chown 33:33 /path/to/directory -R
superfunk2000 commented 1 year ago

OK, that's it of course. Then I imported the DB dump, but had to register again because my login data was no longer recognized.

Now all my own cocktails and ingredients are gone. My shelves are empty too. :(

Isn't there any chance to get the data back. I made a dump earlier...

zhdenny commented 1 year ago

Your own cocktails/ingredients are/were stored in Bar-Assistant Appdata, not Meilisearch Appdata.

When you did your Meilisearch upgrade, you should have only deleted the Meilisearch Appdata.

karlomikus commented 1 year ago

I don't think I understand what were you trying to do. When you say "Then I imported the DB dump", what do you mean by that.

If you wanted to update Meilisearch to 1.1, that involves just deleting Meilisearch container with it's volume.

zhdenny commented 1 year ago

While upgrading Meilisearch I fear he may have deleted more than just Meilisearch volume/Appdata. Just my guess

mondlichtpierrot commented 1 year ago

Hi all,

wow, thanks for all the swift feedback and lively support! In fact, as @superfunk2000 indicated, my original issue seemed to have been wrt the Melisearch version. I think this was because the docker-compose file (until recently) still featured Melisearch 1.0 whereas the docs proposed using version 1.1 before already, and I might have tried deploying as described there before.

Anyway, my original issue seems solved so closing this, but feel free to re-open for the discussion that followed. Thanks y'all!