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.

"Application run failed" issue when upgrading from versions prior to 5.14

When upgrading License Statistics from version prior to 5.14, you might see following issue in core.log file when starting the application:

2019-04-19 19:40:44.964 | ERROR | main | o.s.b.SpringApplication | Application run failed
Caused by: com.mysql.cj.exceptions.CJCommunicationsException: The last packet successfully received from the server was 28,801,252 milliseconds ago. The last packet sent successfully to the server was 29,174,551 milliseconds ago. is longer than the server configured value of 'wait_timeout'.

This problem is likely due to a lack of disk space for MySQL temporary files. MySQL uses the value of the TMPDIR environment variable as the path name of the directory in which to store temporary files. If TMPDIR is not set, MySQL uses the system default, which is usually /tmp, /var/tmp, or /usr/tmp.

To resolve this issue, increase the disk space for the tmp directory or use the "mysqld --tmpdir" option to specify a directory in a file system that has enough space.

Issues with MySQL migration

If insufficient disk space was reserved for MySQL prior to migrating the License Statistics database to License Statistics 5.14, the migration marked in the log as 3.1.4 will not execute properly. MySQL terminates the CurrentFeatureUsage sorting query during the disk space allocation phase, a few minutes after migration begins. The Java process is unable to detect the unexpected query termination state, and continues to wait for data from MySQL that is never sent.

When this issue occurs:

  • There is no visible resource consumption (CPU, RAM) a few minutes after migration has started, and no queries running on the MySQL side.
  • Migration does not continue, and after a couple of hours, fails on exceeding the mysql_timeout value.
  • The following entries can be seen at the end of the core.log file: 
2019-03-24 16:26:52.210 | INFO | main | o.f.c.i.u.l.s.Slf4jLog | Migrating schema `xformation_licstat` to version 3.1.4 - Migrate data from CurrentFeatureUsage table
2019-03-25 00:29:01.525 | WARN | main | c.m.v.l.s.Slf4jMLog$Slf4jMLogger$WarnLogger | SQL State '08007' of Exception tested by statusOnException() implies that the database is invalid, and the pool should refill itself with fresh Connections.
<< Rest of the stack trace >>

To avoid this issue, make sure you have sufficient disk space prior to migrating; specifically:

  • The available space in the mysql data directory should be at least twice your current database size.
  • The available space in the mysql temporary location should be at least twice your current database size.

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

[2018-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. 

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

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 MySQL database using the UTF-8 character set and collation (the default prior to MySQL 5.7.7).

The workaround for this character limit is to set and enable the innodb_large_prefix variable in 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.

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 Linux OS), you may see the following error:

Error 1146: Table 'xformation.XXX' doesn't exist

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, check the settings in the lower_case_table_names variable in your MySQL configuration file on Windows. The default values 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_table_names = 1

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

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:


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.