Add 2nd cluster node to a single node cluster, serving as slave to a non-cluster server

71 views
Skip to first unread message

Chux

unread,
Aug 11, 2012, 7:36:54 AM8/11/12
to codersh...@googlegroups.com

Hello,

I followed all the guides, but was unable to bring up a 2-node cluster ..

Being under pressure to complete a migration, I brought up the extradb cluster as a single node cluster, and made it a slave of a non-cluster server.

Now, the migration is completed and the non-cluster master is in production, I have a need to now add the second node to the cluster.  But I still cannot get this second node talking to the established node.

There are no firewalls between both of them (being on a private local net), but they just would not talk to each other. 

Questions:
-- What is the best way to troubleshoot why the new node will not join the cluster?
-- Do I need to stop the slave processes on the active cluster first, before adding the new node?
-- Would taking a dump from the active cluster and loading it on the new node help?

Thanks in advance for any info/suggestions ..

regards,
--Chux

Henrik Ingo

unread,
Aug 11, 2012, 8:06:04 AM8/11/12
to Chux, codersh...@googlegroups.com
On Sat, Aug 11, 2012 at 2:36 PM, Chux <chuxu...@gmail.com> wrote:
> Now, the migration is completed and the non-cluster master is in production,
> I have a need to now add the second node to the cluster. But I still cannot
> get this second node talking to the established node.
>
> There are no firewalls between both of them (being on a private local net),
> but they just would not talk to each other.
>
> Questions:
> -- What is the best way to troubleshoot why the new node will not join the
> cluster?

Reading the MySQL error node on both galera nodes. If you used rpm/deb
installation, it is at /var/lib/mysql/*.err

> -- Do I need to stop the slave processes on the active cluster first, before
> adding the new node?

No. They don't interfere with each other.

With this kind of setup, you should make sure that log-slave-updates=ON.

> -- Would taking a dump from the active cluster and loading it on the new
> node help?

No. Galera does this automatically. You can add just empty nodes.

henrik


--
henri...@avoinelama.fi
+358-40-8211286 skype: henrik.ingo irc: hingo
www.openlife.cc

My LinkedIn profile: http://www.linkedin.com/profile/view?id=9522559

Chux

unread,
Aug 11, 2012, 9:51:59 AM8/11/12
to codersh...@googlegroups.com

Million thanks, Henrik ..

I am on debian and the logs are in /var/log .. with some going into /var/log/syslog

No errors show up in the logs of either the active cluster node and the node wishing to join .. It is just like they are ignoring each other ...

Or it it possible that I am being too impatient in expecting immediate signs of joining attempts for an empty node.  The DBs here add up to 2-3GB ..

-- So, is it possible that an rsync needs to be run first by the current donor before the join happens? 
-- What are the signs (log entries) on the master that could indicate attempts by a node to join ?

I have double-checked, and:
--  wsrep_on is indeed set to 1
-- the node name, ip, wsrep_url is all set up fine .. with the active cluster node set to gcomm://
-- netcat from the new node to port 4567 on the active node cluster works, so not a firewall issue
-- show status like 'wsrep%' insists there is no connection and wsrep is off .. on the joining node .. but I am able to logon to mysql on the joining node and use it normally ..
-- I am not setting wsrep_notify_cmd on either node .. is this a problem?

Any suggestions on what else I may need to do ? 

Thanks again for the assistance ..

Chux

unread,
Aug 11, 2012, 10:18:03 AM8/11/12
to codersh...@googlegroups.com

Forgot to add that, yes log-slave-updates is set on the current active cluster node ..

On Saturday, 11 August 2012 12:36:54 UTC+1, Chux wrote:

Chux

unread,
Aug 11, 2012, 10:53:09 AM8/11/12
to codersh...@googlegroups.com

I have got this FIXED now ..

It seems that, contrary to the information in the slides, one needs to set 'wsrep_cluster_address', as well as the wsrep_urls variable ..

It is working fine for me now .. thanks for the assistance, Henrik ..

On Saturday, 11 August 2012 12:36:54 UTC+1, Chux wrote:

Henrik Ingo

unread,
Aug 13, 2012, 3:56:00 AM8/13/12
to Chux, codersh...@googlegroups.com
This is not true. wsrep_urls should suffice. However, I think I have
read on this mailing list that wsrep_urls needs to be in the
mysqld_safe section, it is not read by mysqld at all. (Also, if you
don't use mysqld_safe to start mysqld, then of course it is not used
by anyone.)

Anyway, when in doubt, use wsrep_cluster_address.

henrik
> --
> You received this message because you are subscribed to the Google Groups
> "codership" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/codership-team/-/lOH1G6cGxOsJ.
>
> To post to this group, send email to codersh...@googlegroups.com.
> To unsubscribe from this group, send email to
> codership-tea...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/codership-team?hl=en.

P4tt4nz

unread,
Aug 13, 2012, 7:01:19 AM8/13/12
to codersh...@googlegroups.com
Yes the variable 'wsrep_urls' must be under [mysqld_safe]. If wsrep_urls is set you dont need 'wsrep_cluster_address'. 
I read on this group (i think) that wsrep_urls is a experimental implementation so dont know if you wanna use it in production.

/Patrik

Chux

unread,
Aug 13, 2012, 10:09:00 AM8/13/12
to codersh...@googlegroups.com, Chux, henri...@avoinelama.fi

Henrik,

Yeah, wsrep_urls was setup alright in the mysqld_safe section .. In fact, mysql would refuse to start if it was wrongly in the mysqld section .. at least on debian 6 ..

Trust me, not suppling the wsrep_cluster_address was the problem for me .. Once I had supplied wsrep_cluster_address, boom, we had lift-off

Thanks for pointing me to right places ..

best regards,
--Chux

Chux

unread,
Aug 13, 2012, 10:10:45 AM8/13/12
to codersh...@googlegroups.com

Patrick,

thanks for the extra info .. I agree, wsrep_urls (ie, without wsrep_cluster_address) may not work in all circumstances .. yet.

Alexey Yurchenko

unread,
Aug 20, 2012, 10:51:37 AM8/20/12
to codersh...@googlegroups.com, Chux, henri...@avoinelama.fi
Hi,

This is most likely because you have not specified port numbers in wsrep_urls list. We're coming with a better version of this.

Regards,
Alex
Reply all
Reply to author
Forward
0 new messages