Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13060

Server Audit Plugin Crashes with AWS KMS plugin

Details

    Description

      MariaDB 10.2.6 Crashes loading Audit plugin after AWS KMS plugin

      Vagrant Configuration:

      1. Requires barebones CentOS7
      2. Add this line to Vagrant file

        config.vm.provision "shell", path: "mariadb-10-aws-audit.sh"
        

      3. GIST Vagrant up shell, includes MariaDB configuration: mariadb-10-aws-audit.sh
      4. Don't forget to update the KMS API Key and Security Key

      Crash Summary

      Starting MariaDB database server...
      2017-06-12 13:10:51 139713030162560 [Note] /usr/sbin/mysqld (mysqld 10.2.6-MariaDB-log) starting as process 1830 ...
      2017-06-12 13:10:52 139713030162560 [Note] mysqld: AWS KMS plugin: loaded key 1, version 1, key length 256 bit
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Uses event mutexes
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Compressed tables use zlib 1.2.7
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Using Linux native AIO
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Number of pools: 1
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Using SSE2 crc32 instructions
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Completed initialization of buffer pool
      2017-06-12 13:10:52 139712137037568 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Highest supported file format is Barracuda.
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: S: (0x050C05060D0B000F010C090B0A0C0A0D07070B0D09040E03050D06040E0A000A0F010A0E040D0D020B0D020D0204040B030F09050F050205090903010308030802040D07090E0B08050A05080F0F020900060A0A020B0A03000C010900030105080006070502040E0B08010C00090303060D070A040106030E030708080B0503060D000308000C0A090F0301020B0C0A0F0B000A03040B030D040C0C0F0D0B0A0206040D0B040A00030F02020F060A0A0F09080606070D080B0D04010B060602010C0E0D0F000E000000060F070C0F0A0D0607050C0A0E0B0A0E040E060804020F0C000B040D0F060003010703090004010D000D0403050103070005090E070004080D0102090F0D0A060C0D0C0E04070A03020509020E020E04070A09020100040E08030E05000D0B0E01020F0006050A0B01000505060C0B070D0A030B0D0B090B0D0404070D0B06040901040B0809010F03040A020B090704000F030F0C030C0E00070705090B0D0F0E02010E0405090B0F0307070F040A0007020A0505040A010507090101000F010100010503070C0E0F04090D0707040C00040B090D040109030D0008040900060C0A0F0A090402020B0102070F0F080D0D0E0E080105070200060F03000A08050F0C040E0C0F070D010905010F0D080C0A0E0F0B03010C03090F050F00060F040B080B0E03010601040A080109080
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: c: (0x0008000C000000070F0F0F020004000C00040004000E000F0400050002000F0F0F0F0200050006000400050008000F0F0F0F020005000C00040005000E000F0400060002000F0F0F0F0200060006000400060008000F0F0F0F020006000C00040006000E000F0400070002000F0F0F0F0200070006000400070008000F0F0F0F020007000C00040007000E000F0400080002000F0F0F0F0200080006000400080008000F0F0F0F020008000C00040008000E000F0A0B030302040E06040A030E0A0E08020F020401030F020B080B0D04020607080B060D0B080C090F0F07070D070B05070E07050D0C060A0B080D04020E0E0706000602080C01000E030A01050F0C07060C060E010C0A0D0F020A0A070B0E0D030D040A0002080C0508000E0D07030F0B00090B0B090D08060D070E080507030F04080C000400020A06080F0D0D0B0604030003090604060C08020A020B0E0F0807020303080B0B0F010E060701050D0408080F0907060700000200000801010F060304030C08050E09060E06000E09040D07000000040D010204090308070C020F090C08050C020A0003010E040D0507080C0C060403030A000B04070701070301060F0D0A09000C090A0F0F07010C0E0D050E090C0D0A0609010C050A0A0D0E0104000E0D0D020F000B060C03000C0B0F0C08010709020E090300010A0A0C0608010B0C0
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: S: (0x050C05060D0B000F010C090B0A0C0A0D07070B0D09040E03050D06040E0A000A0F010A0E040D0D020B0D020D0204040B030F09050F050205090903010308030802040D07090E0B08050A05080F0F020900060A0A020B0A03000C010900030105080006070502040E0B08010C00090303060D070A040106030E030708080B0503060D000308000C0A090F0301020B0C0A0F0B000A03040B030D040C0C0F0D0B0A0206040D0B040A00030F02020F060A0A0F09080606070D080B0D04010B060602010C0E0D0F000E000000060F070C0F0A0D0607050C0A0E0B0A0E040E060804020F0C000B040D0F060003010703090004010D000D0403050103070005090E070004080D0102090F0D0A060C0D0C0E04070A03020509020E020E04070A09020100040E08030E05000D0B0E01020F0006050A0B01000505060C0B070D0A030B0D0B090B0D0404070D0B06040901040B0809010F03040A020B090704000F030F0C030C0E00070705090B0D0F0E02010E0405090B0F0307070F040A0007020A0505040A010507090101000F010100010503070C0E0F04090D0707040C00040B090D040109030D0008040900060C0A0F0A090402020B0102070F0F080D0D0E0E080105070200060F03000A08050F0C040E0C0F070D010905010F0D080C0A0E0F0B03010C03090F050F00060F040B080B0E03010601040A080109080
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: c: (0x0008000C000000070F0F0F020004000C00040004000E000F0400050002000F0F0F0F0200050006000400050008000F0F0F0F020005000C00040005000E000F0400060002000F0F0F0F0200060006000400060008000F0F0F0F020006000C00040006000E000F0400070002000F0F0F0F0200070006000400070008000F0F0F0F020007000C00040007000E000F0400080002000F0F0F0F0200080006000400080008000F0F0F0F020008000C00040008000E000F0A0B030302040E06040A030E0A0E08020F020401030F020B080B0D04020607080B060D0B080C090F0F07070D070B05070E07050D0C060A0B080D04020E0E0706000602080C01000E030A01050F0C07060C060E010C0A0D0F020A0A070B0E0D030D040A0002080C0508000E0D07030F0B00090B0B090D08060D070E080507030F04080C000400020A06080F0D0D0B0604030003090604060C08020A020B0E0F0807020303080B0B0F010E060701050D0408080F0907060700000200000801010F060304030C08050E09060E06000E09040D07000000040D010204090308070C020F090C08050C020A0003010E040D0507080C0C060403030A000B04070701070301060F0D0A09000C090A0F0F07010C0E0D050E090C0D0A0609010C050A0A0D0E0104000E0D0D020F000B060C03000C0B0F0C08010709020E090300010A0A0C0608010B0C0
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Creating shared tablespace for temporary tables
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Waiting for purge to start
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: 5.7.14 started; log sequence number 1641656
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Creating 1 encryption thread id 139711846799104 total threads 4.
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Creating 2 encryption thread id 139711838406400 total threads 4.
      2017-06-12 13:10:52 139711855191808 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/data/ib_buffer_pool
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Creating 3 encryption thread id 139711830013696 total threads 4.
      2017-06-12 13:10:52 139713030162560 [Note] InnoDB: Creating 4 encryption thread id 139711821620992 total threads 4.
      2017-06-12 13:10:52 139711855191808 [Note] InnoDB: Buffer pool(s) load completed at 170612 13:10:52
      2017-06-12 13:10:52 139713030162560 [Note] Plugin 'FEEDBACK' is disabled.
      170612 13:10:52 server_audit: MariaDB Audit Plugin version 1.4.1 STARTED.
      170612 13:10:52 [ERROR] mysqld got signal 11 ;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
      Server version: 10.2.6-MariaDB-log
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=0
      max_threads=2002
      thread_count=5
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 4529570 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      Thread pointer: 0x0
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x0 thread_stack 0x49000
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7f117a4dec9e]
      /usr/sbin/mysqld(handle_fatal_signal+0x30d)[0x7f1179f2d93d]
      /lib64/libpthread.so.0(+0xf370)[0x7f117949c370]
      /usr/lib64/mysql/plugin/server_audit.so(+0x465d)[0x7f11746a265d]
      /usr/lib64/mysql/plugin/server_audit.so(auditing+0xc06)[0x7f11746a7326]
      /usr/sbin/mysqld(+0x5a0d01)[0x7f1179e6bd01]
      /usr/sbin/mysqld(_Z24plugin_foreach_with_maskP3THDPFcS0_P13st_plugin_intPvEijS3_+0x178)[0x7f1179db2d68]
      /usr/sbin/mysqld(_Z18mysql_audit_notifyP3THDjPKv+0xac)[0x7f1179e6c31c]
      /usr/sbin/mysqld(+0x442805)[0x7f1179d0d805]
      /usr/sbin/mysqld(my_message_sql+0xf3)[0x7f1179d0d913]
      /usr/sbin/mysqld(my_printf_error+0xcb)[0x7f117a4d558b]
      /usr/lib64/mysql/plugin/aws_key_management.so(+0x273218)[0x7f1174283218]
      /usr/lib64/mysql/plugin/aws_key_management.so(+0x273c86)[0x7f1174283c86]
      /usr/sbin/mysqld(_Z24init_io_cache_encryptionv+0x58)[0x7f1179ea9ab8]
      /usr/sbin/mysqld(+0x4483cb)[0x7f1179d133cb]
      /usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x1b51)[0x7f1179d176b1]
      /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f1177a11b35]
      /usr/sbin/mysqld(+0x440e3d)[0x7f1179d0be3d]
      mariadb.service: main process exited, code=killed, status=11/SEGV
      Failed to start MariaDB database server.
      Unit mariadb.service entered failed state.
      mariadb.service failed.
      mariadb.service holdoff time over, scheduling restart.
      Starting MariaDB database server...
      2017-06-12 13:10:58 140196398078080 [Note] /usr/sbin/mysqld (mysqld 10.2.6-MariaDB-log) starting as process 2064 ...
      2017-06-12 13:10:59 140196398078080 [Note] mysqld: AWS KMS plugin: loaded key 1, version 1, key length 256 bit
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Uses event mutexes
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Compressed tables use zlib 1.2.7
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Using Linux native AIO
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Number of pools: 1
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Using SSE2 crc32 instructions
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Completed initialization of buffer pool
      2017-06-12 13:10:59 140195505399552 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Highest supported file format is Barracuda.
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: S: (0x050F0A080E0802060A040B0F060D0C010B0A070C0E0C0D0604030B030B03080D0C0600000C0F0B0C080702070F0D040F070B0507070A0D0C0B050D060B060C080D0701000109000501000D0D0407050F0F030109090F0E030408070F01070003090B03070A01040D0708080A090F0A010E0B060D0D05030F07070303080F030F0C0607030001080A0B0F020F090C04040E0100010904030E0A0209000A070B0E050D0B070D080A0405080D0C040706020A0A060A020A0502010D0C09010203030809090D0E0706030D09040D040D0C0A0B030503070003000A01030D05070A0808080108030C020109060500030308040305070E0C0B030209010F07040A0A07070E000103050E0B0903020B020E0F030A0900030E01030F0500020B000B0B0C050F0406040A0F0E0C0C0D0F0800080B0603090F000B06040C0704050D090F050A00070E0508020A080E070B06020B0B08040F0E06010B0E0905090B0409040101060D050D0C04050D010B03010A0F03050B0603090E0A0D0F06010200070108010D0D0C0C0E030B0302020B080806020E09090D08070B030B0D09090C0D0C0E0305060604070B0D0D01070B0202000A020D0C070800060F0405030F0706000105090A0907020608090909050F05070804080D080E070F010A020A0E0A05070205020300040200060F080B0101040803050A0A0F000F000B0
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: c: (0x0C01070F090E060F0109030D0C0104070C0C0B00070E0E040E0509020C0D0D01030A090C08010403070E060608090F070F01060C06000E03040A020F0C08000D0C0F0F020F0D080D020E0203010F080C070A0E0A0106070C0304030B0F0205090C040C0007050804050B0C0F0906050D0400050700000F080009060D010A03050000010C000308090C060100040B0B0B0C0E040D03010708040B090902010706010302050401070A000C0F030A050808020C0402060B0E0300050603090601090A09080A0707050506070905030C010C0A03050203030D090D08090E05030C000E02000B0C0D050601060C050B070A0D0401060F0E080B090D020A000602020F0E010508080003020B0B0E0B0E0A0205060A00020A060C0D03040C0208090E0B0B0E05010C0B0303040A0E0408040F02020E08000A0802040F0A0A00040C0E08020A05080D020B0D00090B0A000D000B04080D0E0B000C080B0C0600030D0A03040F0D010E01000E080302040708080A010F0803000A0A0D090A070402090500090A050109000A0701010C0D01060C00090F0802050D07060B0D0F0207060302070F0701090A0C010307020F0B050F05030B08010D0C0D0F05070F0B0A060E050600080A0D0806060A0808060A020D02040C0801020B020709010C08050B04040C0701080F04040D0700060609060C0209010203000F020F0
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1641675
      2017-06-12 13:10:59 140196398078080 [ERROR] InnoDB: Incorrect log record type:85
      2017-06-12 13:10:59 140196398078080 [Warning] InnoDB: Log scan aborted at LSN 1641472
      2017-06-12 13:10:59 140196398078080 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
      2017-06-12 13:10:59 140196398078080 [Note] InnoDB: Starting shutdown...
      2017-06-12 13:11:00 140196398078080 [ERROR] Plugin 'InnoDB' init function returned error.
      2017-06-12 13:11:00 140196398078080 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
      2017-06-12 13:11:00 140196398078080 [Note] Plugin 'FEEDBACK' is disabled.
      170612 13:11:00 server_audit: MariaDB Audit Plugin version 1.4.1 STARTED.
      2017-06-12 13:11:00 140196398078080 [Note] mysqld: AWS KMS plugin: loaded key 2, version 1, key length 256 bit
      2017-06-12 13:11:00 140196398078080 [Note] Using encryption key id 2 for temporary files
      2017-06-12 13:11:00 140196398078080 [ERROR] Unknown/unsupported storage engine: InnoDB
      2017-06-12 13:11:00 140196398078080 [ERROR] Aborting
      170612 13:11:00 server_audit: STOPPED
      [INFO] 2017-06-12 13:10:58 Aws::Config::AWSConfigFileProfileConfigLoader [140196398078080] Initializing config loader against fileName /var/lib/mysql//.aws/config and using profilePrefix = 1
      [INFO] 2017-06-12 13:10:58 Aws::Config::AWSConfigFileProfileConfigLoader [140196398078080] Initializing config loader against fileName /var/lib/mysql//.aws/credentials and using profilePrefix = 0
      [INFO] 2017-06-12 13:10:58 ProfileConfigFileAWSCredentialsProvider [140196398078080] Setting provider to read credentials from /var/lib/mysql//.aws/credentials for credentials file and /var/lib/mysql//.aws/config for the config file , for use with profile default
      [INFO] 2017-06-12 13:10:58 EC2MetadataClient [140196398078080] Creating HttpClient with max connections 2 and scheme http
      [INFO] 2017-06-12 13:10:58 CurlHandleContainer [140196398078080] Initializing CurlHandleContainer with size 2
      [INFO] 2017-06-12 13:10:58 InstanceProfileCredentialsProvider [140196398078080] Creating Instance with default EC2MetadataClient and refresh rate 900000
      [INFO] 2017-06-12 13:10:58 CurlHandleContainer [140196398078080] Initializing CurlHandleContainer with size 25
      [INFO] 2017-06-12 13:10:58 Aws::Config::AWSProfileConfigLoader [140196398078080] Successfully reloaded configuration.
      [INFO] 2017-06-12 13:10:58 CurlHandleContainer [140196398078080] Pool successfully grown by 2
      [INFO] 2017-06-12 13:10:58 CurlHandleContainer [140196398078080] Connection has been released. Continuing.
      [INFO] 2017-06-12 13:11:00 CurlHandleContainer [140196398078080] Connection has been released. Continuing.
      [INFO] 2017-06-12 13:11:00 CurlHandleContainer [140196398078080] Cleaning up CurlHandleContainer.
      [INFO] 2017-06-12 13:11:00 CurlHandleContainer [140196398078080] Cleaning up CurlHandleContainer.
      mariadb.service: main process exited, code=exited, status=1/FAILURE
      Failed to start MariaDB database server.
      Unit mariadb.service entered failed state.
      mariadb.service failed.
      Starting MariaDB database server...
      2017-06-12 13:14:19 139926267807872 [Note] /usr/sbin/mysqld (mysqld 10.2.6-MariaDB-log) starting as process 2287 ...
      2017-06-12 13:14:19 139926267807872 [Note] mysqld: AWS KMS plugin: loaded key 1, version 1, key length 256 bit
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Uses event mutexes
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Compressed tables use zlib 1.2.7
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Using Linux native AIO
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Number of pools: 1
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Using SSE2 crc32 instructions
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Completed initialization of buffer pool
      2017-06-12 13:14:19 139925367076608 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Highest supported file format is Barracuda.
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: S: (0x050F0A080E0802060A040B0F060D0C010B0A070C0E0C0D0604030B030B03080D0C0600000C0F0B0C080702070F0D040F070B0507070A0D0C0B050D060B060C080D0701000109000501000D0D0407050F0F030109090F0E030408070F01070003090B03070A01040D0708080A090F0A010E0B060D0D05030F07070303080F030F0C0607030001080A0B0F020F090C04040E0100010904030E0A0209000A070B0E050D0B070D080A0405080D0C040706020A0A060A020A0502010D0C09010203030809090D0E0706030D09040D040D0C0A0B030503070003000A01030D05070A0808080108030C020109060500030308040305070E0C0B030209010F07040A0A07070E000103050E0B0903020B020E0F030A0900030E01030F0500020B000B0B0C050F0406040A0F0E0C0C0D0F0800080B0603090F000B06040C0704050D090F050A00070E0508020A080E070B06020B0B08040F0E06010B0E0905090B0409040101060D050D0C04050D010B03010A0F03050B0603090E0A0D0F06010200070108010D0D0C0C0E030B0302020B080806020E09090D08070B030B0D09090C0D0C0E0305060604070B0D0D01070B0202000A020D0C070800060F0405030F0706000105090A0907020608090909050F05070804080D080E070F010A020A0E0A05070205020300040200060F080B0101040803050A0A0F000F000B0
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: c: (0x0C01070F090E060F0109030D0C0104070C0C0B00070E0E040E0509020C0D0D01030A090C08010403070E060608090F070F01060C06000E03040A020F0C08000D0C0F0F020F0D080D020E0203010F080C070A0E0A0106070C0304030B0F0205090C040C0007050804050B0C0F0906050D0400050700000F080009060D010A03050000010C000308090C060100040B0B0B0C0E040D03010708040B090902010706010302050401070A000C0F030A050808020C0402060B0E0300050603090601090A09080A0707050506070905030C010C0A03050203030D090D08090E05030C000E02000B0C0D050601060C050B070A0D0401060F0E080B090D020A000602020F0E010508080003020B0B0E0B0E0A0205060A00020A060C0D03040C0208090E0B0B0E05010C0B0303040A0E0408040F02020E08000A0802040F0A0A00040C0E08020A05080D020B0D00090B0A000D000B04080D0E0B000C080B0C0600030D0A03040F0D010E01000E080302040708080A010F0803000A0A0D090A070402090500090A050109000A0701010C0D01060C00090F0802050D07060B0D0F0207060302070F0701090A0C010307020F0B050F05030B08010D0C0D0F05070F0B0A060E050600080A0D0806060A0808060A020D02040C0801020B020709010C08050B04040C0701080F04040D0700060609060C0209010203000F020F0
      2017-06-12 13:14:19 139926267807872 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1641675
      2017-06-12 13:14:19 139926267807872 [ERROR] InnoDB: Incorrect log record type:85
      2017-06-12 13:14:19 139926267807872 [Warning] InnoDB: Log scan aborted at LSN 1641472
      2017-06-12 13:14:19 139926267807872 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
      2017-06-12 13:14:20 139926267807872 [Note] InnoDB: Starting shutdown...
      2017-06-12 13:14:20 139926267807872 [ERROR] Plugin 'InnoDB' init function returned error.
      2017-06-12 13:14:20 139926267807872 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
      2017-06-12 13:14:20 139926267807872 [Note] Plugin 'FEEDBACK' is disabled.
      170612 13:14:20 server_audit: MariaDB Audit Plugin version 1.4.1 STARTED.
      2017-06-12 13:14:20 139926267807872 [Note] mysqld: AWS KMS plugin: loaded key 2, version 1, key length 256 bit
      2017-06-12 13:14:20 139926267807872 [Note] Using encryption key id 2 for temporary files
      2017-06-12 13:14:20 139926267807872 [ERROR] Unknown/unsupported storage engine: InnoDB
      2017-06-12 13:14:20 139926267807872 [ERROR] Aborting
      170612 13:14:20 server_audit: STOPPED
      [INFO] 2017-06-12 13:14:19 Aws::Config::AWSConfigFileProfileConfigLoader [139926267807872] Initializing config loader against fileName /var/lib/mysql//.aws/config and using profilePrefix = 1
      [INFO] 2017-06-12 13:14:19 Aws::Config::AWSConfigFileProfileConfigLoader [139926267807872] Initializing config loader against fileName /var/lib/mysql//.aws/credentials and using profilePrefix = 0
      [INFO] 2017-06-12 13:14:19 ProfileConfigFileAWSCredentialsProvider [139926267807872] Setting provider to read credentials from /var/lib/mysql//.aws/credentials for credentials file and /var/lib/mysql//.aws/config for the config file , for use with profile default
      [INFO] 2017-06-12 13:14:19 EC2MetadataClient [139926267807872] Creating HttpClient with max connections 2 and scheme http
      [INFO] 2017-06-12 13:14:19 CurlHandleContainer [139926267807872] Initializing CurlHandleContainer with size 2
      [INFO] 2017-06-12 13:14:19 InstanceProfileCredentialsProvider [139926267807872] Creating Instance with default EC2MetadataClient and refresh rate 900000
      [INFO] 2017-06-12 13:14:19 CurlHandleContainer [139926267807872] Initializing CurlHandleContainer with size 25
      [INFO] 2017-06-12 13:14:19 Aws::Config::AWSProfileConfigLoader [139926267807872] Successfully reloaded configuration.
      [INFO] 2017-06-12 13:14:19 CurlHandleContainer [139926267807872] Pool successfully grown by 2
      [INFO] 2017-06-12 13:14:19 CurlHandleContainer [139926267807872] Connection has been released. Continuing.
      [INFO] 2017-06-12 13:14:20 CurlHandleContainer [139926267807872] Connection has been released. Continuing.
      [INFO] 2017-06-12 13:14:20 CurlHandleContainer [139926267807872] Cleaning up CurlHandleContainer.
      [INFO] 2017-06-12 13:14:20 CurlHandleContainer [139926267807872] Cleaning up CurlHandleContainer.
      mariadb.service: main process exited, code=exited, status=1/FAILURE
      Failed to start MariaDB database server.
      Unit mariadb.service entered failed state.
      mariadb.service failed.
      

      Attachments

        Activity

          djuntgen Dave Juntgen added a comment -

          Original attempt (mysql_install_db fails with AWS KMS + server audit enabled)

          1. Yes - /etc/my.cnf.d/enable_encryption.preset is present
          2. Even with encrypt-tmp-files commented out, mysql_install_db fails with corruption within InnoDB
          3. This appears to be realted, but a different problem than server_audit plugin load

          [root@localhost mysql]# mysql_install_db --user=mysql
          Installing MariaDB/MySQL system tables in '/var/lib/mysql/data' ...
          2017-06-22 12:58:25 140433490081856 [Warning] An old style --language or -lc-message-dir value with language specific part detected: /usr/share/
          2017-06-22 12:58:25 140433490081856 [Warning] Use --lc-messages-dir without language specific part instead.
          2017-06-22 12:58:27 140433490081856 [ERROR] mysqld: AWS KMS plugin : GenerateDataKeyWithoutPlaintext failed : MissingAuthenticationTokenException - Missing Authentication Token
          2017-06-22 12:58:27 140433490081856 [ERROR] InnoDB: cannot enable encryption, encryption plugin is not available
          2017-06-22 12:58:27 140433490081856 [ERROR] Plugin 'InnoDB' init function returned error.
          2017-06-22 12:58:27 140433490081856 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
          170622 12:58:27 server_audit: server_audit_excl_users set to 'ehs_app'.
          170622 12:58:27 server_audit: MariaDB Audit Plugin version 1.4.1-debug STARTED.
          170622 12:58:27 server_audit: logging started to the file /var/lib/mysql/log-audit/audit.log.
          2017-06-22 12:58:27 140433490081856 [ERROR] Unknown/unsupported storage engine: InnoDB
          2017-06-22 12:58:27 140433490081856 [ERROR] Aborting
           
          170622 12:58:27 server_audit: STOPPED
          

          Attempt to execute mysql_install_db without server audit plugin

          • Unfortunately - even without the server audit plugin enabled, mysql_install_db fails to execute when the AWS KMS plugin enabled.

          Attempt to execute mysql_install_db without server audit plugin and without innodb table and log encryption

          Config:

          [root@localhost mysql]# cat /etc/my.cnf.d/enable_encryption.preset
          [mariadb]
          aria-encrypt-tables
          encrypt-binlog
          encrypt-tmp-disk-tables
          encrypt-tmp-files
          #loose-innodb-encrypt-log
          #loose-innodb-encrypt-tables
          

          • Partial progress - mysql_install_db creates innodb data and log files but mysql data is missing.

          Summary

          It appears the only way to have mysql_install_db install successfully is not to use AWS KMS plugin on install, and load it after and then encrypt. its worth mentioning that the server_audit plugin can be loaded dynamically after the server boots, but fails on restart of the server.

          djuntgen Dave Juntgen added a comment - Original attempt (mysql_install_db fails with AWS KMS + server audit enabled) Yes - /etc/my.cnf.d/enable_encryption.preset is present Even with encrypt-tmp-files commented out, mysql_install_db fails with corruption within InnoDB This appears to be realted, but a different problem than server_audit plugin load [root@localhost mysql]# mysql_install_db --user=mysql Installing MariaDB/MySQL system tables in '/var/lib/mysql/data' ... 2017-06-22 12:58:25 140433490081856 [Warning] An old style --language or -lc-message-dir value with language specific part detected: /usr/share/ 2017-06-22 12:58:25 140433490081856 [Warning] Use --lc-messages-dir without language specific part instead. 2017-06-22 12:58:27 140433490081856 [ERROR] mysqld: AWS KMS plugin : GenerateDataKeyWithoutPlaintext failed : MissingAuthenticationTokenException - Missing Authentication Token 2017-06-22 12:58:27 140433490081856 [ERROR] InnoDB: cannot enable encryption, encryption plugin is not available 2017-06-22 12:58:27 140433490081856 [ERROR] Plugin 'InnoDB' init function returned error. 2017-06-22 12:58:27 140433490081856 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 170622 12:58:27 server_audit: server_audit_excl_users set to 'ehs_app'. 170622 12:58:27 server_audit: MariaDB Audit Plugin version 1.4.1-debug STARTED. 170622 12:58:27 server_audit: logging started to the file /var/lib/mysql/log-audit/audit.log. 2017-06-22 12:58:27 140433490081856 [ERROR] Unknown/unsupported storage engine: InnoDB 2017-06-22 12:58:27 140433490081856 [ERROR] Aborting   170622 12:58:27 server_audit: STOPPED Attempt to execute mysql_install_db without server audit plugin Unfortunately - even without the server audit plugin enabled, mysql_install_db fails to execute when the AWS KMS plugin enabled. Attempt to execute mysql_install_db without server audit plugin and without innodb table and log encryption Config: [root@localhost mysql]# cat /etc/my.cnf.d/enable_encryption.preset [mariadb] aria-encrypt-tables encrypt-binlog encrypt-tmp-disk-tables encrypt-tmp-files #loose-innodb-encrypt-log #loose-innodb-encrypt-tables Partial progress - mysql_install_db creates innodb data and log files but mysql data is missing. Summary It appears the only way to have mysql_install_db install successfully is not to use AWS KMS plugin on install, and load it after and then encrypt. its worth mentioning that the server_audit plugin can be loaded dynamically after the server boots, but fails on restart of the server.

          Note that now you had error '2017-06-22 12:58:27 140433490081856 [ERROR] mysqld: AWS KMS plugin : GenerateDataKeyWithoutPlaintext failed : MissingAuthenticationTokenException - Missing Authentication Token' which is related to aws credentials.
          I was reliably succeeding with mysql_install_db with both plugins every time when encrypt-tmp-files was commented out.

          anikitin Andrii Nikitin (Inactive) added a comment - Note that now you had error '2017-06-22 12:58:27 140433490081856 [ERROR] mysqld: AWS KMS plugin : GenerateDataKeyWithoutPlaintext failed : MissingAuthenticationTokenException - Missing Authentication Token' which is related to aws credentials. I was reliably succeeding with mysql_install_db with both plugins every time when encrypt-tmp-files was commented out.
          djuntgen Dave Juntgen added a comment -

          Confirmed - successful mysql_install_db, this was a permission issue to .aws/credentials, need to run as mysql user.

          [root@localhost data]# sudo -u mysql mysql_install_db --user=mysql --datadir=/var/lib/mysql/data
          

          djuntgen Dave Juntgen added a comment - Confirmed - successful mysql_install_db , this was a permission issue to .aws/credentials, need to run as mysql user. [root@localhost data]# sudo -u mysql mysql_install_db --user=mysql --datadir=/var/lib/mysql/data
          djuntgen Dave Juntgen added a comment -

          Question - is there a notable work around?

          For example:

          1. Disable temp table encryption and then reenabled after boot using --init-file
          djuntgen Dave Juntgen added a comment - Question - is there a notable work around? For example: Disable temp table encryption and then reenabled after boot using --init-file

          you can try to disable audit, and then reenable after boot if that works.

          wlad Vladislav Vaintroub added a comment - you can try to disable audit, and then reenable after boot if that works.

          People

            serg Sergei Golubchik
            djuntgen Dave Juntgen
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.