You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

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 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 similar to the following in the xflicstat.log file:

[2012-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 License Statistics log folder

- mysql_error.log and/or hostname.err under data folder in mysql_x86 directory (or mysql_x64 or mysql for License Statistics v4.19.1 and newer).

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

If you see messages similar to the following in the MySQL server log, there is an issue with the host memory:

120503 15:27:16 InnoDB: Initializing buffer pool, size = 1.5G 
InnoDB: VirtualAlloc(1631846400 bytes) failed; Windows error 8 

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

Lost connection to MySQL server during query

When using License Statistics with an external MySQL database, you may see the following error message:

Lost connection to MySQL server during query.

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

When using License Statistics, you may see the following error message in the License Statistics log file:

Specified key was too long; max key length is 767 bytes.

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

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

innodb_large_prefix = ON

This 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:

  1. Find the following variables in the my.ini file:
    sql_mode = STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_UNSIGNED_SUBTRACTION

  2. Enclose these variables in quotation marks, as shown below.
    sql_mode = "STRICT_ALL_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_UNSIGNED_SUBTRACTION"

You can also find more information about this problem in the MySQL reference manual.

MySQL error 1146: "table doesn't exist"

When trying to move a MySQL database from Windows to a Linux, you may receive the following errors:

[ERROR] update: cannot obtain 'xformation' database version: "Error 1146: Table 'xformation.Version' 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 may be caused by differences in case sensitivity between MySQL distributions for Windows and Linux.

To resolve this problem, you need to open your currently used mysql configuration file (my.ini) and find lower_case_table_names variable. The default value of this variable is

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

For example, to run the database that was migrated from Windows to Linux, you need to set the following variable on your Linux machine:

lower_case_tables_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).

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.

  • No labels