Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning
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.

Duplicated license server entries after migrating to License Statistics v4.6.1 database

Merging realtime data from two separate

Duplicated license server entries after migrating to License Statistics v4.6.1 database

When updating to License Statistics v4.6.1, the database migration normally updates all details for license servers. However, if you see duplicated entries on the Dashboard for a license server after upgrading to v4.6.1, there was a problem migrating the license server to the v4.6.1 database. In this case, you will see the following warning message in the error log:

2012-01-30 08:00:00 Database update (version 52): Unable to migrate details of hostname license server (type license_server_type)! You may need to merge this license server manually by editing the existing license server in the License Servers page.

To resolve this problem, edit the original license server in License Statistics and merge it with the duplicated license server as described in "Merging server data" in Combining duplicate license servers under a single server .The information in this section refers to License Statistics v4.8 or newer, which added the DenialUsers column to the database. If you are running a previous version of License Statistics, please refer to the documentation for versions prior to v4.8was supported in versions between 4.8 and 5.13.4. Merging realtime license servers is no longer supported as of 5.14.

Inability to update UsersCount table (duplicate entry error)

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:

...

To resolve this problem, compact the indexes of the affected table by running the SQL commands detailed in the following steps.below. (Make sure you have MySQL administrator privileges: -uroot parameter. Otherwise, you will not be able to perform the steps listed below.)

  1. Shut down License Statistics (make sure xflicstat process/daemon is not running).

  2. From a command line, navigate to the License Statistics installation directory, and then to mysql_x86 for 32-bit databases or mysql_x64 for 64-bit databases. (Note that for License Statistics v4.19.1 and newer the database folder is named mysql.)

  3. Start the MySQL server by running mysql_start.bat for Windows or mysql_start.sh for Linux (make sure mysqld process/daemon is running).

  4. Connect to the License Statistics database server using the following command:
    For Windows: mysql.exe -u root uroot -h localhost hlocalhost -tcp -Dxformation_licstat-protocol=TCP
    For Linux: ./mysql -u root -h localhost -tcp -Dxformation_licstat uroot -hlocalhost --socket=data/mysql.sock --protocol=TCP


  5. Check the License Statistics database location corresponds with information from below query output:
    > SELECT @@datadir;

  6. Pick the database name then (you can check it in xflicstat.cfg file, default name is xformation_licstat):
    > USE xformation_licstat

  7. Backup your data for the UsersCount table using the following SQL command:
    > SELECT Date, Total, DailyUsers, Hosts, DenialUsers INTO OUTFILE 'userscount.dump' FROM UsersCount;
     
  8. After successful backup, truncate the data and reset the index:
    > TRUNCATE UsersCount;

    > ALTER TABLE UsersCount AUTO_INCREMENT = 1;


  9. Restore the data:
    > LOAD DATA INFILE 'userscount.dump' INTO TABLE UsersCount (Date, Total, DailyUsers, Hosts, DenialUsers);

  10. Stop MySQL by running mysql_stop.bat/mysql_stop.sh

  11. Restart Start License Statistics.

After performing these steps, the duplicate entry issues should be resolved.