etsy / 411

An Alert Management Web Application

Home Page:https://demo.fouroneone.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

General error: 14 unable to open database file

rozling opened this issue · comments

commented

I’ve created an Ansible playbook to install 411 from scratch, as I had trouble getting it up and running from reading the Setup instructions.

The first issue is that even after deleting /var/www/411, when I run the playbook and log in I’m still seeing Alerts & Alert Stats from my previous successful install. MySQL is not installed on the machine.

Then when Testing or Creating a new search I get the error SQLSTATE[HY000]: General error: 14 unable to open database file.

This happens when creating ES & http Searches; I haven’t tried other types.

Everything in /var/www/411 is owned by root:www-data except data.db, which is owned by www-data:www-data.

In the Apache log, I get a more verbose version of the error:

[Fri Oct 20 11:28:47.008967 2017] [:error] [pid 15838] [client my_ip_address:49534] except [NONE] PDOException: 
"SQLSTATE[HY000]: General error: 14 unable to open database file" at [/var/www/411/phplib/DB.php:103] 
0:[PDOStatement->execute() called at [/var/www/411/phplib/DB.php:103]] 
1:[FOO\\DB::query() called at [/var/www/411/phplib/Model.php:140]] 
2:[FOO\\Model->create() called at [/var/www/411/phplib/Model.php:116]] 
3:[FOO\\Model->store() called at [/var/www/411/phplib/SLog.php:94]] 
4:[FOO\\SLog::entry() called at [/var/www/411/phplib/REST/Models.php:303]] 
5:[FOO\\Models_REST->slog() called at [/var/www/411/phplib/REST/Searches.php:213]] 
6:[FOO\\Searches_REST->test() called at [/var/www/411/phplib/REST/Searches.php:60]] 
7:[FOO\\Searches_REST->POST() called at [/var/www/411/phplib/REST.php:108]] 
8:[FOO\\REST->route() called at [/var/www/411/htdocs/api/searches.php:6]], referer: http://411.rel.mydomain.net/searches/new?type=es

Any help is appreciated.

commented

Resolved, I had chowned the directory contents to root:www-data, however it seems the directory itself needed to be owned by www-data:www-data