0

Issue: Can't install Percona mysql server.

Platform: Ubuntu 16.04 x64 Server is an Openvz container.

Memory: 1.5GB

installation method

apt-get install percona-xtradb-cluster-server-5.6

Source:

cat /etc/apt/sources.list

deb http://archive.ubuntu.com/ubuntu xenial main restricted universe
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner

Error displayed after installation.

Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package percona-xtradb-cluster-server-5.6 (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Processing triggers for systemd (229-4ubuntu7) ...
Errors were encountered while processing:
percona-xtradb-cluster-server-5.6

Errors found from mysql log

2016-08-05 19:12:42 9926 [Note] InnoDB: Memory barrier is not used
2016-08-05 19:12:42 9926 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-08-05 19:12:42 9926 [Note] InnoDB: Using Linux native AIO
2016-08-05 19:12:42 9926 [Note] InnoDB: Not using CPU crc32 instructions
2016-08-05 19:12:42 9926 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-08-05 19:12:42 7fa6fc84f740  InnoDB: Assertion failure in thread 140355177871168 in file ut0mem.cc line 10
InnoDB: Failing assertion: ret || !assert_on_error
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
13:42:42 UTC - mysqld got signal 6 ;
fatninja
  • 1
  • 1
  • 2

2 Answers2

0

You seem to be running out of memory, please enable swapfile or adjust my.cnf values to something that fits your memory size. Cut half of every memory value or use something like:

key_buffer = 16K
max_allowed_packet = 1M
sort_buffer_size = 32K
read_buffer_size = 128K
read_rnd_buffer_size = 128K
net_buffer_length = 2K
thread_stack = 64K
tmp-table-size  = 8M
max-heap-table-size = 8M
innodb-buffer-pool-size = 16M
key_buffer = 8M
sort_buffer_size = 8M
Anubioz
  • 3,597
  • 17
  • 23
0

As Anubioz suggested it was a memory issue. I increased burstable memory to 2GB and reinstalled the percona-mysql. As mentioned, this was a openvz container. Following are the changes I made to container.

vzctl set ctid --vmguarpages 1500M --save
vzctl set ctid --oomguarpages 1500M --save
vzctl set ctid --privvmpages 1500M:2048M --save
fatninja
  • 1
  • 1
  • 2