Trouble Shooting
Troubleshooting Sparrow
Can't get sparrow running? No need to worry, this page is for you. First, check a few things about your environment.
- Make sure Docker and Docker Dameon is installed.
- If using a windows computer, make sure WSL2 integration is turned on in Docker Desktop as well as your Linux distribution of choice.
- Some issues may arise from Docker not having access to certain files on your computer. File-sharing can be managed in Docker Desktop under Settings > Resources > File Sharing.
- Make sure your version of Docker Engine is up to date with the latest release. Docker desktop has convenient updating through the user interface but if you're trouble shooting for a server check out the page on
Docker for Ubuntu Servers
.
- Make sure you have a lab configuration.
- The easiest way to get a lab directory set up is to run
sparrow create-test-lab
on the command line. This will autogenerate sparrow-configuration files and site-content directories needed for customizing a sparrow instance. After the files are created you can easily edit them to fit your lab's needs.
- The easiest way to get a lab directory set up is to run
- Make sure you've downloaded the latest version of sparrow by running:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/EarthCubeGeochron/Sparrow/HEAD/get-sparrow.sh)"
- Make sure sparrow installed correctly.
- Run
sparrow info
this shows how the application is installed on your computer. - Under
Command-line-interface
it should sayBundled with PyInstaller: /usr/local/opt/sparrow
. cd
into/usr/local/opt/sparrow
and runls
to view files within the directory.- Ensure that a directory called
srcroot
exists.
- Run
- If failing on
backend
container onsparrow up
, try runningsparrow init
to initialize the database.
Other helpful commands:
sparrow up --force-recreate
When using the bundled version of sparrow I was getting this error
ERROR: for backend Cannot create container for service backend: invalid mount config for type "bind": bind source path does not exist: /usr/local/opt/sparrow/srcroot/backend
This was solved by going into docker desktop and adding usr/local/opt
to the file-shared list located in settings/Resources/FILE SHARING
Now there is a new issue.. the frontend doesn't start. No error logs, just says error
.
ERROR: for frontend Cannot start service frontend: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/host_mnt/usr/local/opt/sparrow/srcroot/frontend/default-content" to rootfs at "/app/site-content" caused: mkdir /var/lib/docker/overlay2/c87062967c034960a87c9229675f23abdfe4cf76111d5508cce7309fc125f453/merged/app/site-content: operation not permitted: unknown Attaching to srcroot_gateway_1, srcroot_frontend_1, srcroot_api-tests_1, srcroot_backend_1, srcroot_db_1
Looks like the issue is docker is trying to make a directory..?
docker commit <container_id> my-broken-container && docker run -it my-broken-container /bin/bash
The above command enters into a container that immediately fails and the saves it's state as a new image and then bashes into that so you can view debug logs