This page refers to functionality that has been removed from License Statistics. Duplicate entry issues no longer exist in the current version of License Statistics. |
Merging realtime data from two separate license servers under a single server was supported in versions between 4.8 and 5.13.4. Merging realtime license servers is no longer supported as of 5.14.
A bug introduced in an older version of License Statistics can result in the embedded database index being prematurely exhausted if License Statistics is restarted too often. In such cases, there will be a problem updating the UsersCount table and you will see one or both of the following MySQL errors in the License Statistics log:
ERROR 1062 (23000) at line 1 in file: 'D:\X-Formation\License Statistics\mysql_x86\sql_query_35070.sql': Duplicate entry '65535' for key 'PRIMARY'!
[2013-03-31 01:40:03] WARNING: Unable to save concurrent hosts count to database!
FAIL: Unable to clear required tables!
MySQL error: ERROR 1062 (23000) at line 5 in file: 'D:\X-Formation\License Statistics\mysql_x86\sql_query_16.sql': Duplicate entry '65535' for key 'PRIMARY'
To resolve this problem, compact the indexes of the affected table by running the SQL commands detailed below. (Make sure you have MySQL administrator privileges: -uroot parameter. Otherwise, you will not be able to perform the steps listed below.)
mysql.exe -uroot -hlocalhost --protocol=TCP
./mysql -uroot -hlocalhost --socket=data/mysql.sock --protocol=TCP
> SELECT Date, Total, DailyUsers, Hosts, DenialUsers INTO OUTFILE 'userscount.dump' FROM UsersCount;
> TRUNCATE UsersCount;
> ALTER TABLE UsersCount AUTO_INCREMENT = 1;
> LOAD DATA INFILE 'userscount.dump' INTO TABLE UsersCount (Date, Total, DailyUsers, Hosts, DenialUsers);
mysql_stop.bat/mysql_stop.sh
After performing these steps, the duplicate entry issues should be resolved.