Re: FATAL: role "postgres" does not exist

Lists: Postg스포츠 토토
From: bob(dot)middaugh(at)comcast(dot)net (Bob Middaugh)
To: pgsql-ports(at)postgresql(dot)org (pgsql-ports)
Subject: FATAL: role "postgres" does not exist
Date: 2007-08-16 16:09:23
Message-ID: 081620071609.24745.46C476B3000B68DF000060A9221352857308099A0E0B0B0703D20D010D@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-ports

Hi all,
Back again with another FreeBSD 'centric question. I'm running the OpenNMS installer which "configures PostgreSQL tables, users, and other miscellaneous settings."

It bombs with this:

Exception in thread "main" org.postgresql.util.PSQLException: Backend start-up failed: org.postgresql.util.PSQLException: FATAL: role "postgres" does not exist

I don't know what it's looking for. When you install the server from ports, it creates the user "pgsql" in /etc/passwd.

How do I get the "role" postgres? Is that a role in Postgresql that I need to create?

opennms# sh install -disU
==============================================================================
OpenNMS Installer Version $Id: Installer.java 3056 2006-03-26 19:39:16Z djgregor $
==============================================================================

Configures PostgreSQL tables, users, and other miscellaneous settings.

Exception in thread "main" org.postgresql.util.PSQLException: Backend start-up failed: org.postgresql.util.PSQLException: FATAL: role "postgres" does not exist

at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnectionV3(AbstractJdbc1Connection.java:460)
at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:214)
at org.postgresql.Driver.connect(Driver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at org.opennms.install.Installer.databaseConnect(Installer.java:613)
at org.opennms.install.Installer.install(Installer.java:195)
at org.opennms.install.Installer.main(Installer.java:2450)

Any suggestions?

Thanks,
Bob


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-ports(at)postgresql(dot)org
Cc: Bob Middaugh <bob(dot)middaugh(at)comcast(dot)net>
Subject: Re: FATAL: role "postgres" does not exist
Date: 2007-08-16 16:27:53
Message-ID: 200708161827.54191.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg스포츠 토토

Am Donnerstag, 16. August 2007 18:09 schrieb Bob Middaugh:
> Exception in thread "main" org.postgresql.util.PSQLException: Backend
> start-up failed: org.postgresql.util.PSQLException: FATAL: role "postgres"
> does not exist
>
> I don't know what it's looking for.  When you install the server from
> ports, it creates the user "pgsql" in /etc/passwd.

You need to convince your OpenNMS to use the right user, or you need to rename
your pgsql user, or you create a postgres superuser.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: bob(dot)middaugh(at)comcast(dot)net (Bob Middaugh)
Cc: pgsql-ports(at)postgresql(dot)org (pgsql-ports)
Subject: Re: FATAL: role "postgres" does not exist
Date: 2007-08-16 16:28:51
Message-ID: 5731.1187281731@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-ports

bob(dot)middaugh(at)comcast(dot)net (Bob Middaugh) writes:
> Exception in thread "main" org.postgresql.util.PSQLException: Backend start-up failed: org.postgresql.util.PSQLException: FATAL: role "postgres" does not exist

> I don't know what it's looking for. When you install the server from ports, it creates the user "pgsql" in /etc/passwd.

FreeBSD is being a bit out of step here --- the default superuser name
is "postgres" in most distros. If you can't persuade the OpenNMS
installer to use a nonstandard superuser name, it's no big deal ---
just create a second superuser role named "postgres". See the CREATE
ROLE command, or use the "createuser" script.

regards, tom lane