From owner-freebsd-ports@FreeBSD.ORG Sun Jan 2 15:06:03 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 136EE1065675 for ; Sun, 2 Jan 2011 15:06:03 +0000 (UTC) (envelope-from dsc.fbsd.other@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 447CB8FC0C for ; Sun, 2 Jan 2011 15:06:01 +0000 (UTC) Received: by eyf6 with SMTP id 6so5801483eyf.13 for ; Sun, 02 Jan 2011 07:06:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:keywords :message-id:mime-version:content-type:x-mailer:thread-index :content-language; bh=NnUkBS3bEKVbgYYTbMerxwSbWMHAVrA5JfIVyervd2Y=; b=qaDbmdE6ikoS9zBChBa8UjTGhObkSYs3DSDsCoJaKd5fvfQotedNHr82F5HWuQLOue lG36IUocHQH6GXr1zOFI+As50iETYMzTcOKMP5ZjyJorZHa0lAQ+TzwnuwPECSF7j8ve GngwaeDSauc2b+iD9nr9/zFtjQzvRyBtmJOd8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:keywords:message-id:mime-version:content-type :x-mailer:thread-index:content-language; b=ZNdOubPKow3FiMBsFoYDyCPc+/BC0XsFPx4Ou5hvmBINAYQmi4jGc6GEkU30pIBVaA /Nx97M0ixHHqtkM5/lRZkWTE/Cw5383hY4edOv6O6rgPo6/tct7+1ofDJ76ZSysjZ6U/ ZbWTjm9apKLaZOG3lJVudlij+rOIGXbz4pAPc= Received: by 10.14.127.201 with SMTP id d49mr10578055eei.22.1293980070528; Sun, 02 Jan 2011 06:54:30 -0800 (PST) Received: from fscld ([94.176.153.23]) by mx.google.com with ESMTPS id x54sm13985095eeh.11.2011.01.02.06.54.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 02 Jan 2011 06:54:29 -0800 (PST) From: "dsc fbsd.other" To: Date: Sun, 2 Jan 2011 16:54:09 +0200 Keywords: BDF1out Message-ID: <004a01cbaa8c$ecbbb8e0$c6332aa0$@gmail.com> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 14.0 Thread-Index: AcuqjOipzZk8sXceQhqK0fuZHKy5Fg== Content-Language: en-us Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: jailing MYSQL error X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Jan 2011 15:06:03 -0000 Hi. I'm using ezjail standard config file, with a modified fstab file (mount_nullfs ports to jail). Cat /usr/local/etc/ezjail/j009_mysql2 export jail_j009_mysql2_hostname="j009_mysql2" export jail_j009_mysql2_ip="xx.xx.xx.xx" export jail_j009_mysql2_rootdir="/ezjail/j009_mysql2" export jail_j009_mysql2_exec_start="/bin/sh /etc/rc" export jail_j009_mysql2_exec_stop="" export jail_j009_mysql2_mount_enable="YES" export jail_j009_mysql2_devfs_enable="YES" export jail_j009_mysql2_devfs_ruleset="devfsrules_jail" export jail_j009_mysql2_procfs_enable="YES" export jail_j009_mysql2_fdescfs_enable="YES" export jail_j009_mysql2_image="" export jail_j009_mysql2_imagetype="" export jail_j009_mysql2_attachparams="" export jail_j009_mysql2_attachblocking="" export jail_j009_mysql2_forceblocking="" export jail_j009_mysql2_zfs_datasets="" export jail_j009_mysql2_cpuset="" export jail_j009_mysql2_fib="" My steps: 1. Ezjail-admin onestart j009_mysql2 2. Ezjail-admin console j009_mysql2 3. Cd /usr/ports/database/mysql55-server && make install clean 4. cp /usr/local/share/mysql/my-innodb-heavy-4G.cnf /usr/local/etc/my.cnf (modified socket file path to /var/db/mysql/mysql.sock, in both client and server lines) 5. chown -R mysql:mysql ... for ... /tmp /var/tmp /var/db/mysql 6. mysql_enable="YES" in jail rc.conf 7. /usr/local/etc/rc.d/mysql-server start 8. ...and NOTHING ... mysql-server scripts starts /usr/local/bin/mysql_install_db (creates mysql and test folders in /var/db/mysql ... but nothing else ... it's just running) I had to kill everything. After reading lots of webpages and trying all kind of stuff (including http://devel.reinikainen.net/15, but without ssl stuff), I decided to install MySQL on the host. I've made the same steps (3-5 and 7 with "onestart" instead "start") and used the same my-innodb-heavy-4G.cnf file Everything went well. Mysqld started, creating socket file and pid file; mysql_install_db had no errors. The log file says: 110102 18:07:06 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql 110102 18:07:06 [Note] Plugin 'FEDERATED' is disabled. InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use GCC atomic builtins InnoDB: Compressed tables use zlib 1.2.5 110102 18:07:06 InnoDB: Initializing buffer pool, size = 2.0G 110102 18:07:07 InnoDB: Completed initialization of buffer pool 110102 18:07:07 InnoDB: highest supported file format is Barracuda. 110102 18:07:07 InnoDB: 1.1.3 started; log sequence number 1595675 110102 18:07:07 [Note] Event Scheduler: Loaded 0 events 110102 18:07:07 [Note] /usr/local/libexec/mysqld: ready for connections. Version: '5.5.7-rc-log' socket: '/var/db/mysql/mysql.sock' port: 3306 FreeBSD port: mysql-server-5.5.7 I didn't give up ... so I did: 9. Rm -rf /var/db/mysql/* (in jail) 10. Cp /var/db/mysql/mysql/* /ezjail/j009_mysql2/var/db/mysql/mysql (from host to jail) 11. Cp /var/db/mysql/performance_schema/* /ezjail/j009_mysql2/var/db/mysql/performance_schema (from host to jail) 12. Starting and entering the jail again 13. usr/local/etc/rc.d/mysql-server start was started upon entering the jail (did not create pid and socket file) but generated this log: 110102 17:03:05 [Note] Plugin 'FEDERATED' is disabled. /usr/local/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13) 110102 17:03:05 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use GCC atomic builtins InnoDB: Compressed tables use zlib 1.2.5 110102 17:03:05 InnoDB: Initializing buffer pool, size = 2.0G 110102 17:03:06 InnoDB: Completed initialization of buffer pool InnoDB: The first specified data file /innodb/ibdata1 did not exist: InnoDB: a new database to be created! 110102 17:03:06 InnoDB: Setting file /innodb/ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 110102 17:03:06 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 256 MB InnoDB: Database physically writes the file full: wait... InnoDB: Progress in MB: 100 200 110102 17:03:08 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 256 MB InnoDB: Database physically writes the file full: wait... InnoDB: Progress in MB: 100 200 110102 17:03:10 InnoDB: Log file ./ib_logfile2 did not exist: new to be created InnoDB: Setting log file ./ib_logfile2 size to 256 MB InnoDB: Database physically writes the file full: wait... InnoDB: Progress in MB: 100 200 14. usr/local/etc/rc.d/mysql-server stop ... doesn't work because of missing pid file (the same with "mysql_upgrade" suggested by the log file) 15. './mysql/plugin.frm' file exists 16. kill everything and run again usr/local/etc/rc.d/mysql-server start with this result: 110102 17:07:40 [Note] Plugin 'FEDERATED' is disabled. /usr/local/libexec/mysqld: Can't find file: './mysql/plugin.frm' (errno: 13) 110102 17:07:40 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it. InnoDB: The InnoDB memory heap is disabled InnoDB: Mutexes and rw_locks use GCC atomic builtins InnoDB: Compressed tables use zlib 1.2.5 110102 17:07:40 InnoDB: Initializing buffer pool, size = 2.0G 110102 17:07:40 InnoDB: Completed initialization of buffer pool 110102 17:07:40 InnoDB: highest supported file format is Barracuda. InnoDB: No valid checkpoint found. InnoDB: If this error appears when you are creating an InnoDB database, InnoDB: the problem may be that during an earlier attempt you managed InnoDB: to create the InnoDB data files, but log file creation failed. InnoDB: If that is the case, please refer to InnoDB: http://dev.mysql.com/doc/refman/5.1/en/error-creating-innodb.html 110102 17:07:40 [ERROR] Plugin 'InnoDB' init function returned error. 110102 17:07:40 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 17. But i have a pid and socket file 18. "mysql_upgrade" doesn't work (hangs up) 19. Also "mysql -u root" doesn't work (hangs up) I've read http://dev.mysql.com/doc/refman/5.1/en/error-creating-innodb.html and other related webpages. I think is something related with permissions in jail, but I can't figure it out. So, my final hope is this email. Anyone has any idea? Thanks in advance! Lulu PS: I'm using: - FreeBSD Current (amd64) - Geli encryption - ZFS v28 with world and kernel build with src r215329 (patched with head-v28-v2.patch from Martin Matuska)(the patch doesn't work on the latest src) - Ports updated one week ago - Ezjail installed one week ago (buildworld with src updated one week ago)