Projects tigase _server server-core Issues #370
tigase-server-5.3.0-SNAPSHOT-b3676 (#370)
Closed
Eric Dziewa opened 1 decade ago

I noticed t2 disconnected and software shutdown because of license checking error:

2014-09-19 13:00:58.893 [Timer-0]          StatisticsUploader$1.run()         SEVERE:   exception uploading statistics
java.io.IOException: No response
        at tigase.stats.collector.provider.StatisticsUploader.a(SourceFile:47)
        at tigase.stats.collector.provider.StatisticsUploader$1.run(SourceFile:99)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

This was not happening on t6. I restarted the software on t2 and license checking error kept happening. I also noticed new errors on t6:

2014-09-19 13:04:02.878 [stats-archivizer-tasks]  CounterDataLogger.addStatsLogEntry()  WARNING: Problem adding new entry to DB:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '2014-09-19 13:04:02' for key 'PRIMARY'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
        at com.mysql.jdbc.Util.getInstance(Util.java:381)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1038)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2693)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2395)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2313)
        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2298)
        at tigase.stats.CounterDataLogger.addStatsLogEntry(CounterDataLogger.java:310)
        at tigase.stats.CounterDataLogger.execute(CounterDataLogger.java:335)
        at tigase.stats.StatisticsCollector$1$1.run(StatisticsCollector.java:578)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)

So I stopped the software and reverted to tigase-issue #5.3.0-SNAPSHOT-b3566.

Artur Hefczyc commented 1 decade ago

Looks to me like the code is not prepared to run in a cluster mode. The primary key conflict/duplication suggests that cluster nodes attempt to overwrite each other records. We need a code to record stats from each cluster node separately. So if we sum number of online users on all cluster nodes we get the total number of online users on the whole installation.

Artur Hefczyc commented 1 decade ago

This is important to fix as I have to handover license checker to our customer who already uses Tigase.

wojciech.kapcia@tigase.net commented 1 decade ago

There are two separate issues - first one is related to connectivity or accessing the resource:

  • for the past couple of days I've been having weird issues with seemingly *.tigase.org going down - it was accessible directly using IP and there was correct entries from dig but still resolver returned error - unknown host

  • starting latest nightlies (required for the improved licensing, inclusion of additional fields) with the relatively simple config resulted in http-api exceptions - #2271. They may not be related (as some stats were successfully uploaded), however it's worth to note it.

Bottomline - licence checker has mechanism that prevents server from functioning if number of failed attempts to submit the data fails, given that source and target was the same machine tigase went down.

The second issue is related to @CounterDataLogger@, which is relatively old one (#655, I can work on it) that we've been struggling. For tigase.org and remaining services the consensus was that for the moment we can relay on statistics provided by the license checker so this wasn't a priority. This issue is definitely not related to the shutdown / problems with checking licence.

There are no collisions with statistics gather through the licence checking.

Artur Hefczyc commented 1 decade ago

Wojtek, thank you for all the explanation but to be honest I do not fully understand what is the status of this. Is the problem solved? I understand the problem with CounterDataLogger which is what I thought is happening, as this logger does not work correctly in a cluster mode yet.

The main question is: do we have working code for the license checker?

And of course we want this to be deployed on both tigase.org and tigase.im as a final test before we hand it over to a customer.

By the way. Problems with tigase.org connectivity you describe sound like DNS service issues. You may try to use a different DNS server. I think we have our own DNS servers.

wojciech.kapcia@tigase.net commented 10 years ago

Artur Hefczyc wrote:

The main question is: do we have working code for the license checker?

And of course we want this to be deployed on both tigase.org and tigase.im as a final test before we hand it over to a customer.

Both nodes on tigase.org were updated to b3680. There were two main issues with the previous deployment:

  • groovy handlers from http-api component were gone missing from distribution package;

  • there was an introduction of API keys in http-component which resulted in closed connections in the client; currently both nodes are configured with global --api-keys=open_access (v. #2304, they are still protected with regular http auth as previously).

By the way. Problems with tigase.org connectivity you describe sound like DNS service issues. You may try to use a different DNS server. I think we have our own DNS servers.

I know it looks like that, but it happened only about 3-4 times on 2 different machines with different ISPs hence my ruling out DNS issue before.

issue 1 of 1
Type
Bug
Priority
Major
Assignee
RedmineID
2269
Version
tigase-server-7.0.0
Spent time
49h 30m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#370
Please wait...
Page is in error, reload to recover