List:Cluster« Previous MessageNext Message »
From:Jon Stephens Date:October 15 2009 3:56pm
Subject:Re: ndb_mgm -e shutdown FAIL!
View as plain text  
Richard McCluskey wrote:
> On Thu, 2009-10-15 at 08:42 +0200, Jon Stephens wrote:
>> Andrew Morgan wrote:
>>> Hi Richard,
>>>
>>>  Rightly or wrongly, I always stop the mysqld process with "mysqladmin -u
>>> root shutdown" before stopping the data nodes and management node through
>>> ndb_mgm.
>> Hi,
>>
>> AFAIK ndb_mgm -e shutdown does NOT affect APIs (including mysqlds), and 
>> you should do as Andrew indicates and employ mysqladmin shutdown to stop 
>> the mysqld(s).
>>
> hmmm ... that seems a little bizarre to me, as the SQL/API nodes can
> serve no purpose without the data nodes. May be it is just my setup, but
> the SQL/API servers only talk to the cluster stored NBD engined data
> nodes. If the data nodes go down, that last thing I want is for the
> SQL/API nodes to start writing to local disk, or to fill log files up
> with failed attempts to connect or reach the data nodes (especially when
> there were deliberately brought down). I guess it comes down to
> semantics whether one prefers one's application to report "cant connect
> to SQL server",as opposed to "failed to return results". They mean two
> totally different things to me, and I would perform different actions.
> To me, the first tells me "OMG database is down", second tells me "we
> dont seem to have any results", and with my application, no results can
> be acceptable (if there are truly no results, and it is not a case of
> 'failed to connect'). 

If a statement fails because the mysqld can't contact the cluster, 
mysqld returns an error message that says "Can't connect to NDBCLUSTER". 
It does not merely return an empty result set in such cases.

> 
> I will add the mysqladmin shutdown thing for now though ...
> 
> 
> thanks
> 
> Richard
> 
> 
> 
>> I will examine the docs and make sure this is mentioned clearly therein.
>>
>> cheers
>>
>> jon.
>>
>>> Regards, Andrew.
>>>
>>>> -----Original Message-----
>>>> From: Richard McCluskey [mailto:rmccluskey@stripped]
>>>> Sent: 13 October 2009 22:33
>>>> To: cluster@stripped
>>>> Subject: ndb_mgm -e shutdown FAIL!
>>>>
>>>> Hi Guys,
>>>>
>>>> So I have build a second cluster for testing purposes, and all of the
>>>> nodes are on a single (localhost) machine. I followed the little
>>>> walk-through here :
>>>>
>>>> http://www.clusterdb.com/mysql-cluster/creating-a-simple-cluster-on-a-
>>>> single-linux-host/
>>>>
>>>> and got it working great, except for one thing. When I issue a shutdown
>>>> from within ndb_mgm the SQL/API nodes fail to shutdown:
>>>>
>>>> [root@test-db01 init.d]# ndb_mgm
>>>> -- NDB Cluster -- Management Client --
>>>> ndb_mgm> show
>>>> Connected to Management Server at: localhost:1186
>>>> Cluster Configuration
>>>> ---------------------
>>>> [ndbd(NDB)]	2 node(s)
>>>> id=2	@127.0.0.1  (mysql-5.1.35 ndb-7.0.7, Nodegroup: 0, Master)
>>>> id=3	@127.0.0.1  (mysql-5.1.35 ndb-7.0.7, Nodegroup: 0)
>>>>
>>>> [ndb_mgmd(MGM)]	1 node(s)
>>>> id=1	@127.0.0.1  (mysql-5.1.35 ndb-7.0.7)
>>>>
>>>> [mysqld(API)]	2 node(s)
>>>> id=4	@127.0.0.1  (mysql-5.1.35 ndb-7.0.7)
>>>> id=5	@127.0.0.1  (mysql-5.1.35 ndb-7.0.7)
>>>>
>>>> ndb_mgm> shutdown
>>>> Node 2: Cluster shutdown initiated
>>>> Node 3: Cluster shutdown initiated
>>>> Node 2: Node shutdown completed.
>>>> Node 3: Node shutdown completed.
>>>> 091013 17:29:00 [Note] NDB Binlog: Node: 2, down, Subscriber bitmask 00
>>>> 091013 17:29:00 [Note] NDB Binlog: Node: 3, down, Subscriber bitmask 00
>>>> 091013 17:29:00 [Note] NDB Binlog: cluster failure
>>>> for ./mysql/ndb_schema at epoch 442/0.
>>>> 091013 17:29:00 [Note] NDB Binlog: ndb tables initially read only on
>>>> reconnect.
>>>> 091013 17:29:00 [Note] NDB Binlog: cluster failure
>>>> for ./mysql/ndb_apply_status at epoch 442/0.
>>>> 091013 17:29:00 [Note] Restarting Cluster Binlog
>>>> 2 NDB Cluster node(s) have shutdown.
>>>> Disconnecting to allow management server to shutdown.
>>>> 091013 17:29:01 [Note] NDB Binlog: Node: 2, down, Subscriber bitmask 00
>>>> 091013 17:29:01 [Note] NDB Binlog: Node: 3, down, Subscriber bitmask 00
>>>> 091013 17:29:01 [Note] NDB Binlog: cluster failure
>>>> for ./mysql/ndb_schema at epoch 442/0.
>>>> 091013 17:29:01 [Note] NDB Binlog: ndb tables initially read only on
>>>> reconnect.
>>>> 091013 17:29:01 [Note] NDB Binlog: cluster failure
>>>> for ./mysql/ndb_apply_status at epoch 442/0.
>>>> 091013 17:29:01 [Note] Restarting Cluster Binlog
>>>> ndb_mgm>quit
>>>>
>>>> When I then look at my process list, I see that the SQL nodes are still
>>>> up :
>>>>
>>>> mysql    18375  0.0  0.2 174304 22696 ?        Sl   17:14
>>>> 0:00 /opt/mysql-cluster/current/bin/mysqld
>>>> --defaults-file=/opt/mysql-cluster/current/conf/my.1.cnf
>>>> mysql    18398  0.0  0.2 221816 23224 ?        Sl   17:14
>>>> 0:00 /opt/mysql-cluster/current/bin/mysqld
>>>> --defaults-file=/opt/mysql-cluster/current/conf/my.2.cnf
>>>>
>>>>
>>>>
>>>> could someone tell me why the mysql SQL/API servers did not shut down ?
>>>>
>>>> thanks in advance,
>>>>
>>>> Richard
>>>>
>>>> --
>>>> Richard McCluskey
>>>> Senior Engineer,
>>>> go2 Media Inc.
>>>> rmccluskey@stripped
>>>> (617) 457-7870 ext 108
>>>>
>>>> m.go2.com - The best entertainment guide on mobile.
>>>>
>>>> --
>>>> MySQL Cluster Mailing List
>>>> For list archives: http://lists.mysql.com/cluster
>>>> To unsubscribe:
>>>> http://lists.mysql.com/cluster?unsub=1
>>>
>>>
>>
>> -- 
>>
>>
>> Jon Stephens - jon.stephens@stripped
>> Technical Writer
>> MySQL Documentation Team
>> Sun Microsystems AB
>> MySQL and Software Infrastructure Group
>> Liljeholmen (Stockholm), Sweden
>> Summer: UTC +02.00 / Winter: UTC +01.00
>> Mobile: +46 (0) 736 773 993
>> Skype: plastic-fish
>> MySQL: www.mysql.com
>> Sun: www.sun.com
>>
> 


-- 


Jon Stephens - jon.stephens@stripped
Technical Writer
MySQL Documentation Team
Sun Microsystems AB
MySQL and Software Infrastructure Group
Liljeholmen (Stockholm), Sweden
Summer: UTC +02.00 / Winter: UTC +01.00
Mobile: +46 (0) 736 773 993
Skype: plastic-fish
MySQL: www.mysql.com
Sun: www.sun.com

Thread
ndb_mgm -e shutdown FAIL!Richard McCluskey13 Oct
  • Re: ndb_mgm -e shutdown FAIL!Richard McCluskey13 Oct
  • RE: ndb_mgm -e shutdown FAIL!Andrew Morgan13 Oct
    • Re: ndb_mgm -e shutdown FAIL!Jon Stephens15 Oct
      • Re: ndb_mgm -e shutdown FAIL!Richard McCluskey15 Oct
        • Re: ndb_mgm -e shutdown FAIL!Andrew Morgan15 Oct
          • Re: ndb_mgm -e shutdown FAIL!Hartmut Holzgraefe15 Oct
          • Re: ndb_mgm -e shutdown FAIL!Jon Stephens15 Oct
        • Re: ndb_mgm -e shutdown FAIL!Jon Stephens15 Oct