Troubleshooting

Search Issues

Archives not being created

If you find an archive hasn’t been created, and isn’t created when you click “Archive Now” then there’s likely a problem with the “Delayed Job” processes.

Look for the following things in the output:

Server rejected us

Some servers work hard to keep bots out. If the server is fighting bots, or simply having a bad day you should see a red number next to the Archive Now link. Go to https://http.cat/<number here> to see a quick explanation of what that number means.

Background Process Issues

Run the following from the root of your Backup Brain installation, and then click “Archive Now” on the problematic bookmark.

tail -f log/delayed_job.log
  • Error While Reserving Job

    Run the following from the root of your Backup Brain installation, and then click “Archive Now” on the problematic bookmark.

    tail -f log/delayed_job.log
    

    If you see lines that say

    Error while reserving job
    

    The actual problem will follow.

  • reader problems

    Run the following from the root of your Backup Brain installation, and then click “Archive Now” on the problematic bookmark.

    tail -f log/development.log | grep reader
    

    If you see lines that mention bin/reader then there’s probably something wrong with the reader executable. If it’s complaining about not being able to execute it, or something similar, try deleting it & recreating it.

    First delete bin/reader:

    rm bin/reader
    

    Then recreate it. Running docker-compose up will take care of this if you’re using Docker. If not, follow the Instructions for compiling Reader manually.

404 Not Found - Index `backup_brain_general` not found.

This means that one of 3 things has happened.

  1. Meilisearch got booted with a different / no api key.
  2. You don’t have any bookmarks.
  3. Meilisearch lost your index

API Key Issues

The first option is the most likely. It’s pretty easy to test too. Since the serve script sets an API Key you can go to Meilisearch’s “mini dashboard” and check what API key is being used.

We know meilisearch is running, otherwise it wouldn’t have been able to tell you the index wasn’t found. Its “mini dashboard” can be found at

http://127.0.0.1:7700/

Open that up. If you haven’t visited it before, it should request an admin API Key from you. You’ll find yours in your .env file. Paste it in here.

Make sure the backup_brain_general index exists in the pull-down to the right of the search field, and is selected.

If you have bookmarks in Backup Brain and you see data here then everything’s safe. If you have bookmarks but see nothing here, click the “Api Key” in the top right, and confirm that it matches the one from your .env if not, then paste yours into the resulting field and see if it works, and shows your data.

Either way, it’s probably best to just kill the process and restart it - along with everything else - via the serve script. Run this on the command line to kill it:

pkill meilisearch

No Bookmarks

The index is created when the first bookmark is added. If you don’t have any bookmarks then everything’s working as expected.

Meilisearch lost your index

I’m not sure what would cause this, but fixing it is pretty easy.

In a terminal cd to the root of your Backup Brain install and run the following command

bundle exec rake cleanup:reindex

Meilisearch Key Errors

Your MEILISEARCH_SEARCH_KEY and/or MEILISEARCH_ADMIN_KEY are invalid

This will typically happen when switching between Meilisearch instances. Usually the one in Docker vs one out of Docker.

The problem is that the default search & default admin keys Meilisearch generates are not related to the master key. So, if you’re switching between instances you’ll need different values for these even if you’re using a different master key.

See the “Meilisearch Security Enhancement” section in the Getting Started guide for instructions on how to get the correct values for these.

Your MEILI_MASTER_KEY is invalid

This typically means that the MEILI_MASTER_KEY in your .env file is different than the one that Meilisearch was launched with. Maybe you’re not connecting to the server you think you are?

Check the MEILISEARCH_URL environment variable in .env to make sure it’s pointing at the correct instance. The defaults are

  • http://bb_meilisearch:7700 if you’re using Docker
  • http://localhost:7700 without docker.

NOTE: if you’ve attempted to run meilisearch using built in system services like launchctl or brew services you’re probably going to have problems. The ./serve script starts it manually to guarantee it gets started with MEILI_MASTER_KEY.

On macOS I haven’t found a way to get the MEILI_MASTER_KEY environment variable into a place where it will be read by the Meilisearch service when it boots at login. As a result you’ll be trying to connect to it using a key it doesn’t recognize.

Something Else

Please file a ticket outlining any problem you may be encountering. Include as many details as possible.

For a faster response, please message @backup_brain@corporaterunaways.social on the Fediverse.