After installing Openfire with MSSQL a user gets such messages in warn.log:
2013.08.13 14:11:07 org.jivesoftware.openfire.security.DefaultSecurityAuditProvider - Error trying to insert a new row in ofSecurityAuditLog:
java.sql.SQLException: Cannot insert the value NULL into column 'node', table 'openfire-predev.dbo.ofSecurityAuditLog'; column does not allow nulls. INSERT fails.
to fix this openfire_sqlserver.sql should be changed to this:
CREATE TABLE ofSecurityAuditLog (
msgID INTEGER NOT NULL,
username NVARCHAR(64) NOT NULL,
entryStamp BIGINT NOT NULL,
summary NVARCHAR(255) NOT NULL,
node NVARCHAR(255) NULL,
details NTEXT,
CONSTRAINT ofSecurityAuditLog_pk PRIMARY KEY (msgID)
);
MSSQL
Assigning to Tom as this probably is related to clustering (nodes?)
I see many occurrences of the same error message from an OpenFire instance installed on CentOS, running MySQL:
2014.01.22 12:14:54 org.jivesoftware.openfire.security.DefaultSecurityAuditProvider - Error trying to insert a new row in ofSecurityAuditLog:
com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Column 'node' cannot be null
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
This one has been sitting around for a while. Looking closer, it seems to me that the audit record needs a non-null host name (or "node"). I have a few changes pending to hopefully clean this up.
Assign a default host value (127.0.0.1) if the OS does not provide one