Versions Compared

Key

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


The information on this page refers to License Statistics v5.15 or newer, which upgraded MySQL to v5.7. If you are using an earlier version of License Statistics, please refer to the documentation for releases prior to v5.15.

Embedded MySQL server troubleshooting 

During the License Statistics evaluation, you may have License Statistics temporarily running on a machine that does not meet the minimum system requirements. In such cases where there When there is not enough memory on the machine hosting the License Statistics installation, the MySQL server may not start properly the first time you start License Statistics, which will produce warnings in the log file similar to the following in the xflicstat.log file:

[20122018-12-12 08:00:01] WARNING: Waiting for mysqld process to start which takes more time than usual... 

You can check whether insufficient memory is the problem by looking at the MySQL server log file, which can be found in one of the following directories: -

  • mysql.log in the License Statistics log folder

...

  • mysql_error.log and/or hostname.err

...

  • in

...

  • the mysql/data directory

where hostname is the hostname of the machine where License Statistics is installed. 

...

To resolve this issue, you can try lowering the memory requirement in the config.ini file by changing the innodb_buffer_pool_size setting to the desired value; for example, you may change this setting to 1024M or as low as 512M, depending on available resources.

This setting may be changed only for testing purposes (for example, during evaluation). The proper solution to these issues is to install License Statistics on a machine that meets system requirements. Note that lowering the innodb_buffer_pool_size setting may decrease the performance of License Statistics, causing it to run slower.

...

The above message indicates that your MySQL server settings should be adjusted. To resolve this issue, follow the configuration instructions described in Using an external MySQL database. You can also find more information about this problem in the MySQL reference manual.

"Specified key was too long; max key length is 767 bytes" error

...

This problem may be related to the fact that the MySQL database by default uses using the UTF-8 character set and collation (the default prior to MySQL 5.7.7).

One The workaround for this character limit is to set and enable the innodb_large_prefix variable in the my.ini your MySQL configuration file, as shown below.

innodb_large_prefix = ON

This setting allows you to include columns up to 3072 bytes long in InnoDB indexes.

To resolve this issue, you can also upgrade License Statistics that uses an embedded MySQL database to License Statistics using an external MySQL database. If this does not resolve the problem, you can try upgrading License Statistics from an external to embedded database.

Different versions of MySQL database

When the version of your database is different than the version of the database provided by X-Formation, you may get error messages similar to the following in the License Statistics log file:

[ERROR] mysql: missing sql_mode variables: STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_UNSIGNED_SUBTRACTION

To resolve this issue:

...

Info

As of MySQL 5.7.7, innodb_large_prefix is set to ON by default, so this issue should not occur unless the default MySQL configuration was customized

...

.

MySQL error 1146: "table doesn't exist"

When trying to move a MySQL database from one operating system (OS) to another (most commonly from Windows OS to a Linux OS), you may receive see the following errorserror:

[ERROR] update: cannot obtain 'xformation' database version: "Error 1146: Table 'xformation.VersionXXX' doesn't exist"
[ERROR] License Statistics C++ Core stopped with error: "update: cannot obtain 'xformation' database version: \"Error 1146: Table 'xformation.Version' doesn't exist\"".

The above errors The above error may be caused by differences in case sensitivity between MySQL distributions for Windows and Linux; i.e., Windows is case insensitive, but Unix may be case sensitive (depending on the file system).

To resolve this problem, you need to open your currently used mysql configuration file (my.ini) and find check the settings in the lower_case_table_names variable in your MySQL configuration file on Windows. The default value of this variable isvalues for these settings are:

  • On Unix: 0
  • On Windows: 1
  • On Mac OS X: 2

On the machine that you are moving the database to (e.g., Linux), set the value for the lower_case_table_names variable to match the setting of the original OS (e.g., Windows). For example, to run the database that was migrated from Windows to Linux, you need to set the following variable in the MySQL configuration file on your Linux machine:

lower_case_tablestable_names = 1

For more information about this problem, see the MySQL reference manual.

"Cannot delete or update a parent row" error

Removing large amounts of old data may be time-consuming if during the removal License Statistics queries a license server and, as a result, updates table data. In such situations, you may see a MySQL error similar to the following:

Cannot delete or update a parent row: a foreign key constraint fails (on AggregatedUserUsage table).

Unable to start License Statistics. Missing sql_mode variables: XXX

License Statistics requires MySQL sql_mode to be configured the specific way in the MySQL configuration file:

Code Block
sql_mode = ONLY_FULL_GROUP_BY,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,NO_UNSIGNED_SUBTRACTION

You can extend sql_mode with additional flags of your choice, but all flags from above must be set for License Statistics to run.

For more information, see the MySQL reference manual.

 To resolve this issue, you can temporarily disable the license server using the Realtime License Servers tab in the Administration page and start deleting data. If you have many license servers for which you want to delete data, contact X-Formation Support for assistance.