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.

"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 

...