question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SQLite db can't be opened

See original GitHub issue

Describe the bug The below error is displayed in the web interface:

Server error Error during initializing SQL falling back temporally to memory DB Details: “Error: SQLITE_CANTOPEN: unable to open database file”

If no sqlite.db exists in the location set in the docker run command, a folder is created in that location and the error above occurs. If an sqlite.db is manually created using sqlite3 in the location to be mounted, or touch sqlite.db is used, the following error occurs instead:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:424: container init caused \"rootfs_linux.go:58: mounting \\\"/home/pi/pigallery2/db/sqlite.db\\\" to rootfs \\\"/var/lib/docker/overlay2/9409c7d340036daa88b86c8e38c84777542aa6cf4509f0d8d8914ae3ceff8ec8/merged\\\" at \\\"/var/lib/docker/overlay2/9409c7d340036daa88b86c8e38c84777542aa6cf4509f0d8d8914ae3ceff8ec8/merged/pigallery2-release/sqlite.db\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type.

I may be doing this entirely incorrectly - I don’t know what other kind of file or directory should be provided instead of what I have tried already.

Enviroment (please complete the following information):

  • OS: Raspberry Pi Docker container, MacOS browser
  • Browser: Firefox

Used app version: docker image built from - /master/docker/arm32v7/debian/stretch/Dockerfile

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dan0vcommented, Apr 29, 2019

I don’t have the same issue with the config JSON nor the images folder. The config JSON is correctly filled and saves preferences. I haven’t tried running it without setting the sqlite db. Thanks for the suggestions - I don’t have time now, but I’ll get back tomorrow or the day after with my results.

Thanks for the rapid responses!

0reactions
bpatrikcommented, Dec 7, 2019

closing this due to inactivity

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get sqlite error, "unable to open database file"?
The solution is to make sure the directory containing the database file also has write access allowed to the process. In my case,...
Read more >
sqlite3.OperationalError: unable to open database file
PROBLEM You're using SQLite3, your DATABASE_NAME is set to the database file's full path, the database file is writeable by Apache, but you ......
Read more >
unable to open database file - SQLite Forum
Hi: I am shakoor, I develop a vb.net desktop application using SQLite database file, on updation of any table, it generate error "unable...
Read more >
What should I do when SQLite is unable to open a database ...
Once a database is created, you can verify it in the list of databases using the following SQLite . databases command. What is...
Read more >
1358 (WinGRASS 6.4.1: SQLite driver errors: `Unable to open ...
The message "unable to open database file" corresponds to SQLITE_CANTOPEN, which occurs if SQLite can't open the database for non-straightfoward reasons (there ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found