[MDEV-4112] Galera cluster broken packages error on Ubuntu 12.04.1 Created: 2013-01-25  Updated: 2013-01-31  Due: 2013-02-28  Resolved: 2013-01-31

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 5.5.28a-galera
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Dominick Rivard Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

mariadb-1 ~:lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise

mariadb-1 ~:uname -a
Linux mariadb-1 2.6.32-17-pve #1 SMP Wed Nov 28 07:15:55 CET 2012 i686 i686 i386 GNU/Linux



 Description   

Hi,

I was trying to give a shot at installing the Galera Cluster on Ubuntu 12.04. I used the repository configurator to setup my repo and I tried to follow this guide to https://kb.askmonty.org/en/getting-started-with-mariadb-galera-cluster/. The error occured right after adding the repository list when you try to install the required packages.

the error is:

mariadb-1 ~:apt-cache search mariadb
libmariadbclient-dev - MariaDB database development files
libmariadbclient18 - MariaDB database client library
libmariadbd-dev - MariaDB embedded database development files
mariadb-client - MariaDB database client (metapackage depending on the latest version)
mariadb-client-5.5 - MariaDB database client binaries
mariadb-client-core-5.5 - MariaDB database core client binaries
mariadb-common - MariaDB database common files (e.g. /etc/mysql/conf.d/mariadb.cnf)
mariadb-galera-server - MariaDB database with Galera cluster server (metapackage depending on the latest version)
mariadb-galera-server-5.5 - MariaDB database server with Galera cluster binaries
mariadb-server - MariaDB database server (metapackage depending on the latest version)
mariadb-server-5.5 - MariaDB database server binaries
mariadb-server-core-5.5 - MariaDB database core server files
mariadb-test - MariaDB database regression test suite (metapackage depending on the latest version)
mariadb-test-5.5 - MariaDB database regression test suite
mariadb-1 ~:apt-get install mariadb-galera-server galera
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mariadb-galera-server : Depends: mariadb-galera-server-5.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
mariadb-1 ~:lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.1 LTS
Release: 12.04
Codename: precise
mariadb-1 ~:uname -a
Linux mariadb-1 2.6.32-17-pve #1 SMP Wed Nov 28 07:15:55 CET 2012 i686 i686 i386 GNU/Linux



 Comments   
Comment by Dominick Rivard [ 2013-01-25 ]

Sorry I accidentally submit it without finishing the bug description:

the error is:

The following packages have unmet dependencies:
mariadb-galera-server : Depends: mariadb-galera-server-5.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

As you can see the packages are available in the repository list.

I followed this steps so far before getting the error:

  1. Add the mariadb gpg repository key
    apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
  1. Add the mariadb package for Ubuntu 12.04 repository
    echo '# MariaDB 5.5 repository list - created 2013-01-25 14:40 UTC
  2. http://downloads.mariadb.org/mariadb/repositories/
    deb http://ftp.igh.cnrs.fr/pub/mariadb//repo/5.5/ubuntu precise main
    deb-src http://ftp.igh.cnrs.fr/pub/mariadb//repo/5.5/ubuntu precise main' > /etc/apt/sources.list.d/mariadb.list
  1. Update the repository list
    apt-get update
  1. Confirm that the mariadb packages is available
    apt-cache policy mariadb-galera-server
  1. Install the mariadb packages
    apt-get install -y mariadb-galera-server galera

Regards
Dominick

Comment by Elena Stepanova [ 2013-01-30 ]

Hi,

You might be experiencing the same problem as MDEV-3882, https://lists.launchpad.net/maria-discuss/msg00698.html and https://kb.askmonty.org/en/drop-in-replacement-on-debian/ describe. If so, you could try either follow the workaround advice from https://lists.launchpad.net/maria-discuss/msg00698.html, or wait till 5.5.29 is released, the server release is being released today, and the cluster release is close behind (in case the server part doesn't solve the problem for Galera).

Comment by Elena Stepanova [ 2013-01-31 ]

Hi Dominick,

Now when MariaDB 5.5.29 server is out, could you please try to install MariaDB Galera server again and see if it works?

MariaDB-Galera-server is still 5.5.28a, but I checked that on my machines 5.5.29 server release resolves the problem for the current Galera server, too.

Thanks.

Comment by Dominick Rivard [ 2013-01-31 ]

Hi Elena,

I am building the 3 vps I need to do the test, as soon as I complete my test I'll let know the results in this bug request.

Best
Dominick

Comment by Dominick Rivard [ 2013-01-31 ]

Hi Elena,

The issue installing the packages using this recipe is now resolved:
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db

  1. Add the mariadb package for Ubuntu 12.04 repository
    echo '# MariaDB 5.5 repository list - created 2013-01-25 14:40 UTC
  2. http://downloads.mariadb.org/mariadb/repositories/
    deb http://ftp.igh.cnrs.fr/pub/mariadb//repo/5.5/ubuntu precise main
    deb-src http://ftp.igh.cnrs.fr/pub/mariadb//repo/5.5/ubuntu precise main' > /etc/apt/sources.list.d/mariadb.list
  1. Update the repository list
    apt-get update
  1. Install the mariadb packages
    apt-get install -y mariadb-galera-server galera
  1. Make mariadb listen on all interfaces
    sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
  1. Configure the Galera cluster settings
    vim /etc/mysql/conf.d/mariadb.cnf
  2. the content to append to the file
    wsrep_provider=/usr/lib/galera/libgalera_smm.so
    wsrep_cluster_address=gcomm://172.30.36.62
    wsrep_sst_method=rsync

binlog_format=ROW

default_storage_engine=InnoDB

innodb_autoinc_lock_mode=2
innodb_flush_log_at_trx_commit=2
innodb_locks_unsafe_for_binlog=1

  1. Restart MySQL service
    service mysql restart

Packages are installing fine this issue is resolved. Now I have to figure out why when I am trying to restart mysql service it throws me the error:

ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

from the syslog file:
Jan 31 11:55:52 mariadb-3 mysqld: Version: '5.5.28a-MariaDB-a1~precise-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution, wsrep_23.7rc1.rXXXX
Jan 31 11:55:52 mariadb-3 mysqld: 130131 11:55:52 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Jan 31 11:55:52 mariadb-3 mysqld: 130131 11:55:52 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Jan 31 11:55:52 mariadb-3 /etc/mysql/debian-start[13941]: Upgrading MySQL tables if necessary.
Jan 31 11:55:52 mariadb-3 mysqld: 130131 11:55:52 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Jan 31 11:55:52 mariadb-3 mysqld: 130131 11:55:52 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)
Jan 31 11:55:52 mariadb-3 /etc/mysql/debian-start[13944]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Jan 31 11:55:52 mariadb-3 /etc/mysql/debian-start[13944]: Looking for 'mysql' as: /usr/bin/mysql
Jan 31 11:55:52 mariadb-3 /etc/mysql/debian-start[13944]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Jan 31 11:55:52 mariadb-3 /etc/mysql/debian-start[13944]: Phase 1/3: Fixing table and database names
Jan 31 11:55:52 mariadb-3 /etc/mysql/debian-start[13944]: /usr/bin/mysqlcheck: Got error: 1045: Access denied for user 'debian-sys-maint'@'localhost' (using password: YES) when trying to connect
Jan 31 11:55:52 mariadb-3 /etc/mysql/debian-start[13944]: FATAL ERROR: Upgrade failed
Jan 31 11:55:52 mariadb-3 /etc/mysql/debian-start[13958]: Checking for insecure root accounts.
Jan 31 11:55:52 mariadb-3 mysqld: 130131 11:55:52 [Warning] Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

Excepted that error that is none blocking I get this nice window:

MariaDB [ctest]> show status like '%wsrep%';
---------------------------------------------------------------------------------+

Variable_name Value

---------------------------------------------------------------------------------+

wsrep_local_state_uuid 073e2470-6bc3-11e2-0800-c4db53eb068e
wsrep_protocol_version 4
wsrep_last_committed 37
wsrep_replicated 0
wsrep_replicated_bytes 0
wsrep_received 2
wsrep_received_bytes 259
wsrep_local_commits 0
wsrep_local_cert_failures 0
wsrep_local_bf_aborts 0
wsrep_local_replays 0
wsrep_local_send_queue 0
wsrep_local_send_queue_avg 0.000000
wsrep_local_recv_queue 0
wsrep_local_recv_queue_avg 0.000000
wsrep_flow_control_paused 0.000000
wsrep_flow_control_sent 0
wsrep_flow_control_recv 0
wsrep_cert_deps_distance 0.000000
wsrep_apply_oooe 0.000000
wsrep_apply_oool 0.000000
wsrep_apply_window 0.000000
wsrep_commit_oooe 0.000000
wsrep_commit_oool 0.000000
wsrep_commit_window 0.000000
wsrep_local_state 4
wsrep_local_state_comment Synced
wsrep_cert_index_size 0
wsrep_causal_reads 0
wsrep_incoming_addresses 192.168.2.11:3306,192.168.2.12:3306,192.168.2.13:3306
wsrep_cluster_conf_id 15
wsrep_cluster_size 3
wsrep_cluster_state_uuid 073e2470-6bc3-11e2-0800-c4db53eb068e
wsrep_cluster_status Primary
wsrep_connected ON
wsrep_local_index 2
wsrep_provider_name Galera
wsrep_provider_vendor Codership Oy <info@codership.com>
wsrep_provider_version 23.2.2(r137)
wsrep_ready ON

---------------------------------------------------------------------------------+
40 rows in set (0.00 sec)

The version I installed is this one:

mariadb-3 ~:apt-cache policy mariadb-galera-server
mariadb-galera-server:
Installed: 5.5.28-mariadb-a1~precise
Candidate: 5.5.28-mariadb-a1~precise
Version table:

mariadb-3 ~:apt-cache policy galera
galera:
Installed: 23.2.2
Candidate: 23.2.2
Version table:

Best
Dominick

Comment by Elena Stepanova [ 2013-01-31 ]

Hi Dominick,

It's a rather common configuration problem on Debian, unrelated to Galera (or MariaDB, for that matter).

Please check for example something like
http://stackoverflow.com/questions/11644300/access-denied-for-user-debian-sys-maint

Comment by Dominick Rivard [ 2013-01-31 ]

Hi Elena,

I followed your link on stackoverflow. Here is what I had to do to fix the restart issue.
I have 3 servers:

mariabd-1
mariabd-2
mariabd-3

From mariadb-1 I copied the password stored in /etc/mysql/debian.cnf and pasted it to the /etc/mysql/debian.cnf of mariadb-2 and mariadb-3.
I restarted mariadb-3 first and it didn't throw the error anymore, same for mariadb-2.

what I think happen is that when I started the empty cluster, I used the "wsrep_cluster_address=gcomm://" option within /etc/mysql/conf.d/mariadb.cnf on the mariadb-1 srver.
Then I joined mariadb-2 and mariadb-3. I think that it replicated the password from the mariadb-1 server to all the others.
That would explain why the mariadb-1 password works for all of them.

This is interesting because I never experienced that issue before and I am running a production Galera server using the codership.com packages.

Thank you for your time and you can close this bug if you want, all my issues are resolved.

Best
Dominick

Comment by Elena Stepanova [ 2013-01-31 ]

The behavior with password replication in Galera (including mysql-galera which you're probably running in production) might have changed recently along with the bug fix: https://bugs.launchpad.net/codership-mysql/+bug/1005919 . If that's the case, you might expect the same when you upgrade your production installation.

Anyway, it's great to hear that the issues are resolved, closing the report.

Comment by Elena Stepanova [ 2013-01-31 ]

Fixed by the release of mariadb-server 5.5.29.

Generated at Thu Feb 08 06:53:49 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.