powered by Jive Software

Several install issues - Postgres install

I installed openfire from the rpm on centos with Postgresql, following the installation instructions.

The install instructions are rather inaccurate and lacking, it’d be good if these were a wiki so they could be corrected, or at least allow comments… any I thought I’d list the issues here.

You need to set up postgres to use md5 access with password in pg_hba.conf to get openfire to connect. It’s a good idea to add an openfire user to postgresql using createuser. e.g. createuser openfire.

You need to grant all on database openfire to openfire

If you import the schema as shown here http://www.igniterealtime.org/builds/openfire/docs/latest/documentation/database .html#postgres

then you will get an error on the seup about the schema not being there, but it is. The problem is openfire tries to create the schema and interprets the error incorrectly, here is the error in the error.log:

2009.04.27 20:14:06 [org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:38 3)] SchemaManager: Failed to execute SQL:
CREATE TABLE ofUser ( username VARCHAR(64) NOT NULL, plainPassword VARCHAR(32), encryptedPassword VARCHAR(255), name V
ARCHAR(100), email VARCHAR(100), creationDate CHAR(15) NOT NULL, modificationDate CHAR(15) NOT NULL, CONSTRAINT ofUser_pk
PRIMARY KEY (username) );
2009.04.27 20:14:06 [org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:228)]
org.postgresql.util.PSQLException: ERROR: relation “ofuser” already exists

obviously the schema exists!

So once you delete the schema, then openfire will re-create the schema, then you’ll get a NPE with an error:

2009.04.27 20:14:06 [org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:346)]
org.postgresql.util.PSQLException: ERROR: permission denied for relation ofproperty

So really they want to be a superuser??

Anyway this is pretty bad - and it’s be good to be able tooo fix it.