Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] "Failed to open the database" randomly appears and permanently stops folder sync #11826

Closed
2 tasks done
ShadyMedic opened this issue Aug 25, 2024 · 9 comments
Closed
2 tasks done
Labels

Comments

@ShadyMedic
Copy link

Pre-submission Checks

  • I checked for similar issues, but could not find any. I also checked the closed issues. I could not contribute additional information to any existing issue.
  • I will take the time to fill in all the required fields. I know that the bug report may be dismissed otherwise due to lack of information.

Describe the bug

I use ownCloud client on my Linux Mint 21.3 (base: Ubuntu 22.04). It worked fine for like a year or so. Some time last month, three of my shared folders showed an error "/path/to/directory/ failed to open the database." and stopped syncing.

I waited for about two weeks, hoping that the error will somehow resolve itself, but it didn't. I had remove the folder sync link, delete the .owncloudsync.log, .sync_journal.db, .sync_journal.db-shm and .sync_journal.db-wal files and then create the folder sync link again.

The client worked fine again for another week or so, but yesterday, I got the same error again and all my linked directories this time (see picture).

I can easily just delete the four files again and recreate the links, but doing it multiple times every month is kinda annoying and also it probably wouldn't work well if I start modifying the files on other of my devices and thus creating conflicts.

Expected behavior

I expect this error to not appear randomly and the folders to keep syncing.

Steps to reproduce the issue

I know you hate to hear this, but this error seems to appear totally randomly. I'm not aware of any extraordinary processes that I was doing prior to the issue appearing.

Screenshots

image

Logs

See attachment: log-redacted.txt

Client version number

ownCloud 5.3.1.14018 f15fd5
Libraries Qt 6.4.3, OpenSSL 3.1.2 1 Aug 2023
Using virtual files plugin: suffix
OS: linuxmint-5.15.0-119-generic
QPA: xcb

Desktop environment (Linux only)

Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy; Desktop: Xfce 4.18.1

Client package version and origin (Linux only)

Installed using instructions on https://download.owncloud.com/desktop/ownCloud/stable/latest/linux/download/

Installation path (Windows only)

No response

Server information

No idea, my organization is managing the server, not me.

Additional context

No response

@TheOneRing
Copy link
Contributor

Do the links point to an external drive that is mounted during login? Or removed from time to time?

@ShadyMedic
Copy link
Author

They point to folders in my /home/ partition, which is different from my root partition, but is also being mounted during boot.

@TheOneRing
Copy link
Contributor

Does the client recover if you restart it?
If yes, its related to the way the other disk is loaded during startup, if not we need to check why the db can't be opened.

24-08-25 16:41:23:799 [ warning sync.database.sql ]:	Consistency check failed in readonly mode, giving up "/home/shady/.minecraft/.sync_journal.db"
24-08-25 16:41:23:799 [ info sync.plugins ]:	Created VFS instance from plugin "owncloudsync_vfs_off"
24-08-25 16:41:23:800 [ debug gui.folder ]	[ OCC::Folder::checkLocalPath ]:	Checked local path ok
24-08-25 16:41:23:800 [ debug sync.database.sql ]	[ OCC::SqlQuery::prepare ]:	SQL prepare "PRAGMA quick_check;" Try: 0
24-08-25 16:41:23:800 [ warning sync.database.sql ]:	SQL prepare failed "PRAGMA quick_check;" "unable to open database file"
24-08-25 16:41:23:800 [ warning sync.database.sql ]:	Sqlite prepare statement error: 14 "unable to open database file" in "PRAGMA quick_check;"
24-08-25 16:41:23:800 [ warning sync.database.sql ]:	Error preparing quick_check on database
24-08-25 16:41:23:800 [ warning sync.database ]:	Error opening the db: "unable to open database file"
24-08-25 16:41:23:800 [ warning gui.folder ]:	"/home/shady/.minecraft/ failed to open the database."
24-08-25 16:41:23:800 [ info gui.folder.manager ]:	Adding folder to Folder Map  OCC::Folder(0x1fb5140) "/home/shady/.minecraft/"

@TheOneRing
Copy link
Contributor

Are you able to open the db with https://sqlitebrowser.org/ ?

@ShadyMedic
Copy link
Author

Does the client recover if you restart it?

I already deleted the hidden files again and re-created the links, so I can't check right now, but I think I tried this in the past and it didn't solve the issue.

Are you able to open the db with https://sqlitebrowser.org/ ?

Yes, the .sync_journal.db file opens just fine and I can browse all the tables (most of them are empty though).

@TheOneRing
Copy link
Contributor

Please try to restart the client, when the issue occurs again.

@ShadyMedic
Copy link
Author

Will do. I'll respond here when that happens. I'll also look at the DB file permissions at that point and let you know.

Bye for now. (hopefully for a long time 😃 )

Copy link

This issue was marked stale because it has been open for 30 days with no activity. Remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale label Sep 26, 2024
Copy link

github-actions bot commented Oct 3, 2024

The issue was marked as stale for 7 days and closed automatically.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants