powered by Jive Software

Can't Logon To Admin Console On More Than One Cluster Nodes At A Time

I’m running 2 cluster nodes. Login on to the admin console on one node will cancel the login session of the other admin console on the other node. Is this correct?

Hmm, that shouldn’t happen. Logins to the admin console are totally local (i.e. unrelated in a cluster). Do you see any error in the log files? Are you using LDAP to store the users? Info on how to reproduce this would be great.

Thanks,

– Gato

Hey Gato,

I’m accessing the admin console through NAT. Access to 9091 will go to 9091 of one node, and 9090 to 9090 of the other node. I open 2 browsers, one for each node. Both browsers point to “Server->Clustering” pages. I refresh one of them, then refresh the other… alternately refreshing one after another. I have to login on every refresh.

2007.10.05 06:05:30 [com.jivesoftware.openfire.enterprise.stats.RrdSqlBackend.exists(RrdSqlBackend.java:190)] Error while accessing information in database: java.sql.SQLException: Table 'openfire.entRRDs' doesn't exist
2007.10.05 06:05:30 [com.jivesoftware.openfire.enterprise.stats.StatsEngine$SampleTask.run(StatsEngine.java:359)] Error sampling for statistic sessions
java.io.FileNotFoundException: Could not open sessions [non existent]
at org.jrobin.core.RrdDb.<init>(Unknown Source)
at org.jrobin.core.RrdDb.<init>(Unknown Source)
at com.jivesoftware.openfire.enterprise.stats.StatsEngine$SampleTask.run(StatsEngine.java:323)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2007.10.05 06:05:30 [com.jivesoftware.openfire.enterprise.stats.RrdSqlBackend.exists(RrdSqlBackend.java:190)] Error while accessing information in database: java.sql.SQLException: Table 'openfire.entRRDs' doesn't exist
2007.10.05 06:05:30 [com.jivesoftware.openfire.enterprise.stats.StatsEngine$SampleTask.run(StatsEngine.java:359)] Error sampling for statistic server_bytes_in
java.io.FileNotFoundException: Could not open server_bytes [non existent]
at org.jrobin.core.RrdDb.<init>(Unknown Source)
at org.jrobin.core.RrdDb.<init>(Unknown Source)
at com.jivesoftware.openfire.enterprise.stats.StatsEngine$SampleTask.run(StatsEngine.java:323)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2007.10.05 06:05:30 [com.jivesoftware.openfire.enterprise.stats.RrdSqlBackend.exists(RrdSqlBackend.java:190)] Error while accessing information in database: java.sql.SQLException: Table 'openfire.entRRDs' doesn't exist
2007.10.05 06:05:30 [com.jivesoftware.openfire.enterprise.stats.StatsEngine$SampleTask.run(StatsEngine.java:359)] Error sampling for statistic conversations
java.io.FileNotFoundException: Could not open conversations [non existent]
at org.jrobin.core.RrdDb.<init>(Unknown Source)
at org.jrobin.core.RrdDb.<init>(Unknown Source)
at com.jivesoftware.openfire.enterprise.stats.StatsEngine$SampleTask.run(StatsEngine.java:323)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
2007.10.05 06:05:30 [com.jivesoftware.openfire.enterprise.stats.RrdSqlBackend.exists(RrdSqlBackend.java:190)] Error while accessing information in database: java.sql.SQLException: Table 'openfire.entRRDs' doesn't exist
2007.10.05 06:05:30 [com.jivesoftware.openfire.enterprise.stats.StatsEngine$SampleTask.run(StatsEngine.java:359)] Error sampling for statistic muc_occupants
java.io.FileNotFoundException: Could not open muc_occupants [non existent]
at org.jrobin.core.RrdDb.<init>(Unknown Source)
at org.jrobin.core.RrdDb.<init>(Unknown Source)
at com.jivesoftware.openfire.enterprise.stats.StatsEngine$SampleTask.run(StatsEngine.java:323)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

No, I don’t use LDAP.

Hey Aznidin,

I also use to connect to each node and refresh the page to see the load on each node but that does not forces to to log in for each refresh. Could it be that the NAT has something to do with it? Do you see the same problem even when navigating the admin console or only in the cluster page?

BTW, the error log shows that the DB does not have the entRRDs table. How was your DB created? Did you create it from scratch or is this an upgrade from a 3.3.* installation? And which database and version are you using?

Thanks,

– Gato

I also use to connect to each node and refresh the page to see the load on each node but that does not forces to to log in for each refresh. Could it be that the NAT has something to do with it? Do you see the same problem even when navigating the admin console or only in the cluster page?

Navigations also produce the same behavior. I have to relogin. However, it doesn’t seem to have direct relation to the error messages. I’ll check on this one later and try to reproduce again. Probably some side effect of the missing db table.

BTW, the error log shows that the DB does not have the entRRDs table. How was your DB created? Did you create it from scratch or is this an upgrade from a 3.3.* installation? And which database and version are you using?

It was a fresh install and for that I used the script in /opt/openfire/resources/database/openfire_mysql.sql. That script doesn’t have entRRDs.

aznidin wrote:
BTW, the error log shows that the DB does not have the entRRDs table. How was your DB created? Did you create it from scratch or is this an upgrade from a 3.3.* installation? And which database and version are you using?

It was a fresh install and for that I used the script in /opt/openfire/resources/database/openfire_mysql.sql. That script doesn’t have entRRDs.

That’s right. The open source version does not define that table. That table is created and used by the Enterprise plugin. Could you check the script located in openfire\plugins\enterprise\database? You should find there the enterprise_mysql.sql file that defines the entRRDs table. That script also adds a new row to the jiveVersion table with value ‘enterprise’ and 9.

Thanks,

– Gato

Hrm… this is weird. I have ‘enterprise’ - ‘9’ in jiveVersion and also the ‘entConversation’ table. But that’s about it! It looks like the ent script stopped after creating ‘entConversation’.

I run the script manually. The first 2 errors are obvious enough. But the third is something new.

mysql> . enterprise_mysql.sql

ERROR 1062 (23000): Duplicate entry ‘enterprise’ for key 1

ERROR 1050 (42S01): Table ‘entConversation’ already exists

ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

Query OK, 0 rows affected (0.05 sec)

Query OK, 0 rows affected (0.02 sec)

… another few more Query OK lines.

BTW, I’m running MySQL server version: 5.0.22 on RHEL5 xen kernel.

Hmm, it seems like the DB script failed to execute for some reason. Could you run it from a db console tool? The script only was modified to add the new entRRDs table and yours is failing a lot before we try to create that table in the script. Let me know what errors you see when executing the db script of enterprise.

BTW, which version of MySQL are you using?

Thanks,

– Gato

Hey, I can anticipate your questions

Right, you will need to delete the ent* tables and also the row in jiveVersion that has the enterprise value. Execute the query after that. Every time the script fails you will need to delete ent* tables again and remove that row from jiveVersion.

– Gato

LOL

Table creation for entConParticipant failed:

CREATE TABLE entConParticipant (

conversationID BIGINT NOT NULL,

joinedDate BIGINT NOT NULL,

leftDate BIGINT NULL,

bareJID VARCHAR(255) NOT NULL,

jidResource VARCHAR(255) NOT NULL,

nickname VARCHAR(255) NULL,

INDEX entConParticipant_conv_idx (conversationID, bareJID, jidResource, joinedDate),

INDEX entConParticipant_jid_idx (bareJID)

);

ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

Hey Gato,

Could it be that the NAT has something to do with it?

I think I would have to believe that it’s related to NAT although I’ve done lots of NAT and had not have such experience before. Also, I observed some weird behavior when I login to admin console on different cluster nodes through SSH tunneling. I don’t have such problems when login directly. It’s hard to tell what caused them because the logs didn’t show any clue. It could be Openfire or network/OS bug. So I guess, my conclusion is that whenever you want to connect to admin console on different nodes at a time, try to avoid going through NAT or tunneling.

ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

The Openfire Enterprise script to create entConParticipant will result in this error if Openfire database is created using create database openfire character set utf8;. The error won’t show if I just do create database openfire;. Obviously it’s because of the double-byte character for utf8, causing the key to exceed the allowable length. Because Openfire is supposed to support utf8, I regard this as a bug.

What’s worse is that Openfire Enterprise functionality gets affected. And so this is a show stopper!

aznidin wrote:
ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes

The Openfire Enterprise script to create entConParticipant will result in this error if Openfire database is created using create database openfire character set utf8;. The error won’t show if I just do create database openfire;. Obviously it’s because of the double-byte character for utf8, causing the key to exceed the allowable length. Because Openfire is supposed to support utf8, I regard this as a bug.

Excellent! I suspected that it was the utf8 charset but my MySQL 5.0.11 had no problem with it (since it fails to use utf8). I was able to reproduce it using MySQL 5.0.44 so I filed ENT-205 and checked in a fix. Thanks for the bug report.

Regards,

– Gato

Is the fix on the script and can you tell me what it looks like? I need it to make the Ent plugin works.

Thanks.

aznidin wrote:

Is the fix on the script and can you tell me what it looks like? I need it to make the Ent plugin works.

Hmm… Too many fronts happening at once… Here is the modified script:

CREATE TABLE entConParticipant (
  conversationID       BIGINT         NOT NULL,
  joinedDate           BIGINT         NOT NULL,
  leftDate             BIGINT         NULL,
  bareJID              VARCHAR(200)   NOT NULL,
  jidResource          VARCHAR(100)   NOT NULL,
  nickname             VARCHAR(255)   NULL,
  INDEX entConParticipant_conv_idx (conversationID, bareJID, jidResource, joinedDate),
  INDEX entConParticipant_jid_idx (bareJID)
);

I tested the entired script and it worked fine. Remember to delete any ent* table and the inserted row in jiveVersion before running the entire script again.

Thanks,

– Gato

I tested the entired script and it worked fine. Remember to delete any ent* table and the inserted row in jiveVersion before running the entire script again.

Don’t worry about that. I know how things work :). BTW, to run the entire script, you’ll also need to delete fp*

Thanks a bunch.