Laravel LiteFS example cannot acquire lease or find primary

Oh! Thanks for pointing this mismatch, I’ve updated the repository again so that the Readme and the contents of files in the repository match properly. Thank you!

Now, to answer your questions:
1. Which one is the correct path for fuse.dir?
Basically, the fuse.dir value is the folder where the database.sqlite used by our app will be found in. So, this would depend on the value of the DB_DATABASE you specify in your fly.toml file’s [env] section. So make sure the path in your fly.toml file’s env.DB_DATABASE value matches with this!

2. How to fix the error: cannot find primary… cannot become primary, local node has no cluster ID

Can you update your litefs.yml’s lease.consul.key value to a different, unique value to your app, then deploy your changes? These should hopefully re-generate a proper cluster id in your machine. We also have a page you can follow steps in to fix errors you might encounter with setting up LiteFS here

1 Like