jayjanssen / percona-xtradb-cluster-tutorial

NOTE: This repo has been rehomed here: https://github.com/percona/xtradb-cluster-tutorial
75 stars 22 forks source link

Percona tutorial setup problem #34

Closed cta100 closed 11 years ago

cta100 commented 11 years ago

OS Mac 10.7.5 VirtualBox 4.2.12 Vagrant 1.1.5

I was getting ready for the Conference tutorial next week (Galera in practice). When executing vagrant to create the master slave configuration I get the following output

vagrant up Bringing machine 'node1' up with 'virtualbox' provider... [node1] Importing base box 'centos6.4-i386-minimal'... [node1] Matching MAC address for NAT networking... [node1] Setting the name of the VM... [node1] Clearing any previously set forwarded ports... [node1] Creating shared folders metadata... [node1] Clearing any previously set network interfaces... [node1] Preparing network interfaces based on configuration... [node1] Forwarding ports... [node1] -- 22 => 2222 (adapter 1) [node1] Running any VM customizations... [node1] Booting VM... [node1] Waiting for VM to boot. This can take a few minutes. [node1] VM booted and ready for use! [node1] Setting hostname... [node1] Configuring and enabling network interfaces... [node1] Mounting shared folders... [node1] -- /vagrant [node1] -- /tmp/vagrant-puppet/manifests [node1] -- /tmp/vagrant-puppet/modules-0 [node1] Running provisioner: VagrantPlugins::Puppet::Provisioner::Puppet... Running Puppet with master_slave.pp... Info: Loading facts in /tmp/vagrant-puppet/modules-0/mysql/lib/facter/mysql.rb Warning: Config file /etc/puppet/hiera.yaml not found, using Hiera defaults Info: Loading facts in /tmp/vagrant-puppet/modules-0/mysql/lib/facter/mysql.rb Info: Applying configuration version '1366209080' Notice: /Stage[main]/Misc/Service[iptables]/ensure: ensure changed 'running' to 'stopped' Notice: /Stage[main]/Misc/Exec[wget http://downloads.mysql.com/docs/sakila-db.zip]/returns: executed successfully Notice: /Stage[main]/Misc/Package[screen]/ensure: created Notice: /Stage[main]/Misc/Exec[myq_gadgets]/returns: executed successfully Notice: /Stage[main]/Misc/Host[node2]/ensure: created Info: FileBucket adding {md5}42e07b94c2eda4e78b010a1347225f68 Notice: /File[/usr/local/bin/baseline_haproxy.sh]/ensure: defined content as '{md5}864c424ea9247e2cd6 0ea15cc2220a42' Notice: /Stage[main]/Misc/Package[ntp]/ensure: created Notice: /File[/usr/local/bin/quick_update.pl]/ensure: defined content as '{md5}c0a36052dfb930b85f7da4 8390b63681' Notice: /Stage[main]/Misc/Package[man]/ensure: created Info: create new repo percona in file /etc/yum.repos.d/percona.repo Notice: /Stage[main]/Percona::Repository/Yumrepo[percona]/descr: descr changed '' to 'Percona' Notice: /Stage[main]/Percona::Repository/Yumrepo[percona]/baseurl: baseurl changed '' to 'http://repo .percona.com/centos/6/os/i386/' Notice: /Stage[main]/Percona::Repository/Yumrepo[percona]/enabled: enabled changed '' to '1' Notice: /Stage[main]/Percona::Repository/Yumrepo[percona]/gpgcheck: gpgcheck changed '' to '0'

Info: create new repo percona in file /etc/yum.repos.d/percona.repo Notice: /Stage[main]/Percona::Repository/Yumrepo[percona]/descr: descr changed '' to 'Percona' Notice: /Stage[main]/Percona::Repository/Yumrepo[percona]/baseurl: baseurl changed '' to 'http://repo .percona.com/centos/6/os/i386/' Notice: /Stage[main]/Percona::Repository/Yumrepo[percona]/enabled: enabled changed '' to '1' Notice: /Stage[main]/Percona::Repository/Yumrepo[percona]/gpgcheck: gpgcheck changed '' to '0' Info: changing mode of /etc/yum.repos.d/percona.repo from 600 to 644 Notice: /Stage[main]/Percona::Toolkit/Package[perl-TermReadKey]/ensure: created Notice: /Stage[main]/Misc/Host[node3]/ensure: created Notice: /Stage[main]/Percona::Server::Packages/Package[Percona-Server-server-55.i686]/ensure: created Notice: /File[/etc/my.cnf]/ensure: created Info: /File[/etc/my.cnf]: Scheduling refresh of Service[mysql] Notice: /Stage[main]/Misc/Package[telnet]/ensure: created Notice: /Stage[main]/Misc/Host[node1]/ip: ip changed '127.0.0.1' to '192.168.70.2' Notice: /Stage[main]/Percona::Server::Packages/Package[Percona-Server-shared-compat]/ensure: created Notice: /Stage[main]/Misc/Exec[sysbench]/returns: executed successfully Notice: /File[/root/sysbench_tests]/ensure: created Notice: /Stage[main]/Percona::Toolkit/Package[perl-DBD-MySQL]/ensure: created Notice: /Stage[main]/Misc/Package[lsof]/ensure: created Notice: /Stage[main]/Percona::Toolkit/Package[perl-Time-HiRes]/ensure: created Error: Could not start Service[mysql]: Execution of '/sbin/service mysql start' returned 1:

Error: /Stage[main]/Percona::Server::Service/Service[mysql]/ensure: change from stopped to running fa iled: Could not start Service[mysql]: Execution of '/sbin/service mysql start' returned 1: Notice: /Stage[main]/Percona::Server::Service/Service[mysql]: Triggered 'refresh' from 1 events Notice: /Stage[main]//Node[node1]/Exec[replication-user]: Dependency Service[mysql] has failures: tru e Warning: /Stage[main]//Node[node1]/Exec[replication-user]: Skipping because of failed dependencies Notice: /File[/usr/local/bin/baseline.sh]/ensure: defined content as '{md5}b23ac2850ab10e76f4d8858563 a00cfa' Notice: /Stage[main]/Misc/Package[unzip]/ensure: created Notice: /File[/root/bin]/mode: mode changed '0755' to '0775' Notice: /File[/root/bin]/seluser: seluser changed 'unconfined_u' to 'system_u' Notice: /Stage[main]/Misc/Service[ntpd]/ensure: ensure changed 'stopped' to 'running' Notice: /Stage[main]/Percona::Toolkit/Package[percona-toolkit]/ensure: created Info: Creating state file /var/lib/puppet/state/state.yaml Notice: Finished catalog run in 234.70 seconds The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!

cd /tmp/vagrant-puppet/manifests && puppet apply --verbose --modulepath '/etc/puppet/modules:/tmp/vag rant-puppet/modules-0' master_slave.pp --detailed-exitcodes || [ $? -eq 2 ]

The Vagrantfile symlink points to Vagrantfile.master_slave. If I point it to Vagrantfile.bare_cluster the setup completes with no problem.

jayjanssen commented 11 years ago

So the error is:

Error: Could not start Service[mysql]: Execution of '/sbin/service mysql start' returned 1:

Error: /Stage[main]/Percona::Server::Service/Service[mysql]/ensure: change from stopped to running fa iled: Could not start Service[mysql]: Execution of '/sbin/service mysql start' returned 1:

The question is why mysql wouldn't start.

Note that it is correct to build your environment with master_slave (that's where we'll be starting).

jayjanssen commented 11 years ago

This looks like a Percona Server bug: https://bugs.launchpad.net/percona-server/+bug/1170024

You can work around it manually by 'vagrant ssh node1' , sudo -i, mysql_install_db --user=mysql, service mysql start

I'll try to see if I can work around this in the puppet scripts asap.

cta100 commented 11 years ago

Thanks very much!

----- Original Message ----- From: "Jay Janssen" notifications@github.com To: "jayjanssen/percona-xtradb-cluster-tutorial" percona-xtradb-cluster-tutorial@noreply.github.com Cc: "cta100" craig@psu.edu Sent: Wednesday, April 17, 2013 11:53:43 AM Subject: Re: [percona-xtradb-cluster-tutorial] Percona tutorial setup problem (#34)

This looks like a Percona Server bug: https://bugs.launchpad.net/percona-server/+bug/1170024

You can work around it manually by 'vagrant ssh node1' , sudo -i, mysql_install_db --user=mysql, service mysql start

I'll try to see if I can work around this in the puppet scripts asap.

— Reply to this email directly or view it on GitHub .

jayjanssen commented 11 years ago

Looks like that bug was fixed and a new version of Percona Server uploaded to our repositories last night. Your install should work cleanly now ('vagrant destroy; vagrant up' to redo it entirely).

cta100 commented 11 years ago

Success!