permission denied, role monitor does not exist errors when running Socorro unit tests on Ubuntu 12.04 LTS

RESOLVED FIXED

Status

Socorro
Database
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: nothung, Assigned: Gabriela Thumé)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 740888 [details]
stderr output from running "make test" command in Socorro checkout (permission denied errors)

I'm trying to install Socorro on the amd64 version of Ubuntu 12.04 LTS and have been following the instructions on the page:

http://socorro.readthedocs.org/en/latest/installation.html

However, I get tons of "permission denied" errors at the step where I run
the Socorro unit tests.  A large number of unit tests failed: "FAILED (errors=85, failures=20)"

Here are the steps I took:
1) Followed the install instructions in the "Ubuntu 12.04 (Precise)" section
2) Followed the install instructions in the "Add a new superuser account to
postgres" section
3) Followed the install instructions in the "Download and install Socorro"
section
4) Followed the install instructions in the "Download and install
CrashStats Web UI" section, including the instructions in INSTALL.md
5) Ran the command "make test" inside my Socorro checkout

Results:
see attached file for stderr output from "make test"

Examples of permission denied errors:
"ProgrammingError: permission denied for relation crontabber_state"
"ProgrammingError: permission denied for relation reports"
"ProgrammingError: permission denied for relation signatures"
"ProgrammingError: permission denied for relation processors"
"ProgrammingError: permission denied for relation os_names"
"ProgrammingError: permission denied for relation priorityjobs"
"ProgrammingError: permission denied for relation products"
"ProgrammingError: permission denied for relation server_status"
"ProgrammingError: permission denied to create database"
"ProgrammingError: permission denied for relation bugs"
etc etc

If I run "psql template1" followed by "\du",
the output is

                              List of roles
  Role name  |                   Attributes                   | Member of
-------------+------------------------------------------------+-----------
 breakpad_rw |                                                | {}
 monitor     |                                                | {}
 postgres    | Superuser, Create role, Create DB, Replication | {}
 {$USER}     | Superuser, Create role, Create DB              | {}

breakdpad_rw needs to be a superuser, but in the above output, it's clear that is not the case in my install.  The fix is to alter the breakpad_rw user to have superuser privileges.  The command "psql -c 'alter user breakpad_rw superuser" or "psql -c 'alter user breakpad_rw superuser template1" fixes the problem. 

Previous to the "permission denied" errors, my unit tests were not running because of a "role monitor does not exist" error.  This was solved by creating a user named "monitior" in the Postgresql database.  The "role monitor does not exist" error is probably related to the "permission denied" errors, since they both have to do with Postgres database users. 

I talked to user "gabithume" on the moznet #opw channel and she had
similar problems doing the install on Mac OS X 10.8 .  She also had the
"role monitor does not exist" and "permission denied" errors.
Assignee: nobody → sdeckelmann
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(Reporter)

Comment 1

5 years ago
To be more specific, on Ubuntu 12.04 LTS, I fixed the "role monitor does not exist" error by running the following command: 

sudo su - postgres -c "createuser monitor"
(Assignee)

Comment 2

5 years ago
I am almost sure that problem is solved with https://socorro.readthedocs.org/en/latest/installation.html#load-the-socorro-schema, already in Installation instructions, and considering ‘breakpad_superuser’ as the superuser now.
Assignee: sdeckelmann → gabithume
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.