pg.ddx.io  pgsql-ports@postgresql.org mailing list archive  
help / color / mirror / Atom feed
FATAL: role "postgres" does not exist
4+ messages / 3 participants
[nested] [flat]

* FATAL: role "postgres" does not exist
@ 2007-08-16 16:09 bob.middaugh@comcast.net
  2007-08-16 16:27 ` Re: FATAL: role "postgres" does not exist Peter Eisentraut <peter_e@gmx.net>
  2007-08-16 16:28 ` Re: FATAL: role "postgres" does not exist Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 4+ messages in thread

From: bob.middaugh@comcast.net @ 2007-08-16 16:09 UTC (permalink / raw)
  To: 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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: FATAL: role "postgres" does not exist
  2007-08-16 16:09 FATAL: role "postgres" does not exist bob.middaugh@comcast.net
@ 2007-08-16 16:27 ` Peter Eisentraut <peter_e@gmx.net>
  1 sibling, 0 replies; 4+ messages in thread

From: Peter Eisentraut @ 2007-08-16 16:27 UTC (permalink / raw)
  To: pgsql-ports; +Cc: Bob Middaugh <bob.middaugh@comcast.net>

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/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: FATAL: role "postgres" does not exist
  2007-08-16 16:09 FATAL: role "postgres" does not exist bob.middaugh@comcast.net
@ 2007-08-16 16:28 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2007-08-16 16:28 UTC (permalink / raw)
  To: bob.middaugh@comcast.net; +Cc: pgsql-ports

bob.middaugh@comcast.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



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: FATAL: role "postgres" does not exist
@ 2007-08-16 18:43 bob.middaugh@comcast.net
  0 siblings, 0 replies; 4+ messages in thread

From: bob.middaugh@comcast.net @ 2007-08-16 18:43 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; ; <peter_e@gmx.net>; +Cc: pgsql-ports


 -------------- Original message ----------------------
From: Tom Lane <tgl@sss.pgh.pa.us>
> bob.middaugh@comcast.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.
> 

Thank you both.  I su'd to FreeBSD's pgsql user and did createuser which allowed me to add postgres and the OpenNMS script that sets up the DB ran successfully.

You're right Tom, other OS's I've seen referenced elsewhere in regards to postgresql seem to have postgres as the initial superuser.  Why the FreeBSD ports maintainer for postgresql chooses pgsql...I dunno.

There is no FreeBSD package (binary), or port, for OpenNMS like there are for a few linux distro's.  Hopefully, I'm good to go now, thanks to you guys.  If I have any more questions, I'll direct them to your novice mailing list.  I started with ports because I figured this was a FreeBSD 'centric ports issue.

Thanks for your help.

Bob



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2007-08-16 18:43 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-16 16:09 FATAL: role "postgres" does not exist bob.middaugh@comcast.net
2007-08-16 16:27 ` Peter Eisentraut <peter_e@gmx.net>
2007-08-16 16:28 ` Tom Lane <tgl@sss.pgh.pa.us>
2007-08-16 18:43 Re: FATAL: role "postgres" does not exist bob.middaugh@comcast.net

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox