sqlite3 happen 'unable to open database file' error sometimes
See original GitHub issueerror log
{ [SequelizeDatabaseError: SQLITE_CANTOPEN: unable to open database file]
name: 'SequelizeDatabaseError',
message: 'SQLITE_CANTOPEN: unable to open database file',
parent:
{ [Error: SQLITE_CANTOPEN: unable to open database file]
errno: 14,
code: 'SQLITE_CANTOPEN',
sql: 'SELECT `id`, `name`, `owner`, `templateConfig`, `des`, `time`, `status`, `createdAt`, `updatedAt` FROM `Pages` AS `Page` ORDER BY time DESC LIMIT 20;' },
original:
{ [Error: SQLITE_CANTOPEN: unable to open database file]
errno: 14,
code: 'SQLITE_CANTOPEN',
sql: 'SELECT `id`, `name`, `owner`, `templateConfig`, `des`, `time`, `status`, `createdAt`, `updatedAt` FROM `Pages` AS `Page` ORDER BY time DESC LIMIT 20;' },
sql: 'SELECT `id`, `name`, `owner`, `templateConfig`, `des`, `time`, `status`, `createdAt`, `updatedAt` FROM `Pages` AS `Page` ORDER BY time DESC LIMIT 20;' }
SequelizeDatabaseError: SQLITE_CANTOPEN: unable to open database file
at module.exports.Query.formatError (/root/fed/quick/trunk/node_modules/sequelize/lib/dialects/sqlite/query.js:245:16)
at Statement.<anonymous> (/root/fed/quick/trunk/node_modules/sequelize/lib/dialects/sqlite/query.js:53:31)
at Statement.replacement (/root/fed/quick/trunk/node_modules/sqlite3/lib/trace.js:20:31)
at Statement.replacement (/root/fed/quick/trunk/node_modules/sqlite3/lib/trace.js:20:31)
this is happend sometimes,i can not find why?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top 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 >Error: stepping, unable to open database file (14) - SQLite Forum
I'm getting this error when doing SELECT on some views of a database that was working for years until a little after the...
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 >What should I do when SQLite is unable to open a database ...
Ownership and permissions on the database file. This should be obvious: If your server-side code runs as, say, user www , and that...
Read more >Failed to open database file error - Audacity Forum
(14) SQLITE_CANTOPEN result code indicates that SQLite was unable to open a file. The error codes can sometimes refer to logic errors and...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
So. I realized this can happen when the parent folder doesn’t exist, in this case ./db. Create the folder and it works fine.
Currently having an issue similar to this. I think it is something to do with permissions but I dont know how to fix it