Openfire 4.2.0: Cannot login in admin console through LDAP

After updating Openfire to 4.2.0, I can no longer login into admin console and no users can sign in their clients through LDAP or any other means.

The only error we have seen is something like this: ERROR [Update Manager]: org.jivesoftware.util.JiveProperties - Unknown column ‘encrypted’ in ‘field list’

You are likely hitting this

can you restore from backup, fix the database and then upgrade again?

I do see an log in the nohup.out file saying Missing database schema for openfire.

I have tried the restore and I get the same issue.

There is no upgrade folder under resources since this is a external db

resources -> database -> upgrade

The fix suggested doesn’t work. I still can’t login in admin console.

Can you find any errors in the logs/ folder to share? If you want to zip up your logs/ folder and email them to me, that is fine akrherz@iastate.edu

I have sent you an email of the logs.

2017.12.05 18:18:11 org.jivesoftware.database.SchemaManager - SchemaManager: Failed to execute SQL:
 CREATE TABLE ofUser (   username              VARCHAR(64)     NOT NULL,   storedKey             VARCHAR(32),   serverKey             VARCHAR(32),   salt                  VARCHAR(32),   iterations            INTEGER,   plainPassword         VARCHAR(32),   encryptedPassword     VARCHAR(255),   name                  VARCHAR(100),   email                 VARCHAR(100),   creationDate          CHAR(15)        NOT NULL,   modificationDate      CHAR(15)        NOT NULL,   PRIMARY KEY (username),   INDEX ofUser_cDate_idx (creationDate) );
2017.12.05 18:18:11 org.jivesoftware.database.SchemaManager - Table 'ofUser' already exists
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'ofUser' already exists

That’s not good. Please send all.log

The all.log is sent.

Does the table ofVersion exist in your mysql database? From which version did you upgrade from?

We upgraded from 4.1.6.

what does this query return in your mysql database

SELECT version FROM ofVersion WHERE name='openfire';

Empty set (0.00 sec)

strange, you may have other database schema corruption then. You could try this

insert into ofVersion(name, version) values ('openfire', 25);

and then restart openfire to see what happens

That did the trick. Thanks a lot!