← Back to team overview

graphite-dev team mailing list archive

Re: [Question #178172]: OperationalError: unable to open database file

 

Question #178172 on Graphite changed:
https://answers.launchpad.net/graphite/+question/178172

    Status: Open => Answered

Nicholas Leskiw proposed the following answer:
Yup, chown it to the graphite user

-Nick

Sent from a mobile device.
Please excuse terse language and spelling mistakes.

Joseph Schmoley <question178172@xxxxxxxxxxxxxxxxxxxxx> wrote:

>Question #178172 on Graphite changed:
>https://answers.launchpad.net/graphite/+question/178172
>
>    Status: Answered => Open
>
>Joseph Schmoley is still having a problem:
>Oh, I had no idea I had to run that command.  Ok, I ran it with "sudo"
>and it produced this:
>
>Creating tables ...
>Creating table account_profile
>Creating table account_variable
>Creating table account_view
>Creating table account_window
>Creating table account_mygraph
>Creating table dashboard_dashboard_owners
>Creating table dashboard_dashboard
>Creating table events_event
>Creating table auth_permission
>Creating table auth_group_permissions
>Creating table auth_group
>Creating table auth_user_user_permissions
>Creating table auth_user_groups
>Creating table auth_user
>Creating table auth_message
>Creating table django_session
>Creating table django_admin_log
>Creating table django_content_type
>Creating table tagging_tag
>Creating table tagging_taggeditem
>
>You just installed Django's auth system, which means you don't have any superusers defined.
>Would you like to create one now? (yes/no): yes
>Username (Leave blank to use 'root'):
>E-mail address: jac@localhost
>Password:
>Password (again):
>Superuser created successfully.
>Installing custom SQL ...
>Installing indexes ...
>No fixtures found.
>
>After that /opt/graphite/storage/graphite.db is created (owned by
>root:root).
>
>Back to the webapp and refreshed the page and now get a different error:
>
>  File "/usr/lib/pymodules/python2.7/django/db/backends/sqlite3/base.py", line 234, in execute
>    return Database.Cursor.execute(self, query, params)
>DatabaseError: attempt to write a readonly database
>
>So, what's next?  Am I still missing some file permission issues
>somewhere?  Should graphite.db belong to apache2 user:group?  Just for
>kicks I did that and it gave me "Unable to open database file" error
>again, so I switched it back to root:root.
>
>Please advise.
>
>Thank you again for all your help.
>
>-Jac
>
>-- 
>You received this question notification because you are a member of
>graphite-dev, which is an answer contact for Graphite.
>
>_______________________________________________
>Mailing list: https://launchpad.net/~graphite-dev
>Post to     : graphite-dev@xxxxxxxxxxxxxxxxxxx
>Unsubscribe : https://launchpad.net/~graphite-dev
>More help   : https://help.launchpad.net/ListHelp

-- 
You received this question notification because you are a member of
graphite-dev, which is an answer contact for Graphite.