MySQL Forums
Forum List  »  NDB clusters

Data Node/Mgmt Node in NDBCluster disconnect make error code 157 returned in Java Persistence application
Posted by: Support HK
Date: November 24, 2016 12:42AM

We have faced the issue when one of the DB is disconnected for few seconds, and Application cannot get that data and get cause code for 4010, 4002, 157. They are

2016-11-15 12:50:07,362 ERROR [FunctionLoadScript]: FunctionLoadScript:evalFunction:org.luaj.vm2.LuaError: Ph2_SAI_Blocking_fv3.lua:118 vm error: <openjpa-2.3.0-r422266:1540826 fatal general error> org.apache.openjpa.persistence.PersistenceException: Got temporary error 4119 'Simple/dirty read failed due to node failure' from NDBCLUSTER {prepstmnt 2042562641 SELECT t0.sub_imsi, t0.imsi, t0.order_tag, t0.ts FROM sub_imsi_map t0 WHERE (t0.sub_imsi = ?) LIMIT ?, ?} [code=1297, state=HY000]
2016-11-15 12:50:07,600 ERROR [FunctionLoadScript]: FunctionLoadScript:evalFunction:
org.luaj.vm2.LuaError: CUHK_SMMT_Package_fv6c.lua:376 vm error: <openjpa-2.3.0-r422266:1540826 fatal general error> org.apache.openjpa.persistence.PersistenceException: Got temporary error 4002 'Send to NDB failed' from NDBCLUSTER {prepstmnt 1489215881 SELECT t0.sub_msisdn, t0.country_code, t0.imsi, t0.order_tag, t0.ts FROM sub_msisdn_map t0 WHERE (t0.sub_msisdn = ?) LIMIT ?, ?} [code=1297, state=HY000]
Caused by: <openjpa-2.3.0-r422266:1540826 fatal general error> org.apache.openjpa.persistence.PersistenceException: Got error 157 'Unknown error code' from NDBCLUSTER {prepstmnt 1486946986 SELECT t0.sub_imsi, t0.imsi, t0.order_tag, t0.ts FROM sub_imsi_map t0 WHERE (t0.sub_imsi = ?) LIMIT ?, ?} [code=1296, state=HY000]
So, I have a question is in cluster, why did if one of DB data node/mgmd is down, transaction will be fail? (Using [(mysql-5.6.11 ndb-7.3.2)]) Below is config.ini of those 4 DB.

---------------------------------------------------------------------

So, I have a question is in cluster, why did if one of DB data node/mgmd is down, transaction will be fail? (Using [(mysql-5.6.11 ndb-7.3.2)]) Below is config.ini of those 4 DB.
############################################
#MySQL master configuration file
#Node ID will assigned as below
#ID# 1-5 : MGMD
#ID# 6-10 : NDBD
#ID# 11-20 : APID
############################################
# TCP PARAMETERS
[tcp default]
SendBufferMemory=128M
ReceiveBufferMemory=128M

[ndb_mgmd default]
Datadir=/var/lib/mysql-cluster # Directory for MGM node log files
LogDestination=FILE:filename=my-cluster.log
ArbitrationRank=1
Hostname =10.10.10.202
[ndbd default]
# Options affecting ndbd processes on all data nodes:
NoOfReplicas=2 # Number of replicas
DataMemory=8G # How much memory to allocate for data storage
IndexMemory=4G # How much memory to allocate for index storage
# For DataMemory and IndexMemory, we have used the
# default values. Since the "world" database takes up
# only about 500KB, this should be more than enough for
# this example Cluster setup.
MaxNoOfConcurrentOperations=2000000
MaxNoOfConcurrentTransactions=2000000
MaxNoOfOrderedIndexes=2048
MaxNoOfLocalOperations=2500000
TransactionDeadlockDetectionTimeout=10000
HeartbeatIntervalDbDb=3000
HeartbeatIntervalDbApi=3000
MaxNoOfAttributes=4000
MaxBufferedEpochs=1000
NoOfFragmentLogFiles=300

datadir=/var/lib/mysql-cluster # Directory for Data node log files
Hostname =10.10.10.202

[ndb_mgmd]
Hostname =10.10.10.202
ArbitrationRank=2
Nodeid=1
[ndb_mgmd]
Hostname =10.10.10.203
ArbitrationRank=2
Nodeid=2
[ndb_mgmd]
Hostname =10.10.10.101
ArbitrationRank=1
Nodeid=3

[ndbd]
Hostname=10.10.10.202
Nodeid=6
[ndbd]
Hostname=10.10.10.203
Nodeid=7
[ndbd]
Hostname=10.10.10.200
Nodeid=8
[ndbd]
Hostname=10.10.10.201
Nodeid=9

[mysqld]
Hostname=10.10.10.202
Nodeid=11
[mysqld]
Hostname=10.10.10.203
Nodeid=12
[mysqld]
Hostname=10.10.10.200
Nodeid=13
[mysqld]
Hostname=10.10.10.201
Nodeid=14
[mysqld]
Hostname=10.10.10.100
Nodeid=15
[mysqld]
Hostname=10.10.10.101
Nodeid=16
[mysqld]
[mysqld]

At that time, eth0 of 10.10.10.203 is tried to removed.
Nov 15 12:49:26 DB-04 kernel: igb: eth0 NIC Link is Down
Nov 15 12:49:26 DB-04 kernel: bonding: bond0: link status definitely down for interface eth0, disabling it
Nov 15 12:49:26 DB-04 kernel: bonding: bond0: making interface eth4 the new active one.
Nov 15 12:49:37 DB-04 kernel: igb: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Nov 15 12:49:37 DB-04 kernel: bond0: link status definitely up for interface eth0, 1000 Mbps full duplex.
Nov 15 12:49:54 DB-04 kernel: tg3 0000:20:00.0: eth4: Link is down
Nov 15 12:49:54 DB-04 kernel: bonding: bond0: link status definitely down for interface eth4, disabling it
Nov 15 12:49:54 DB-04 kernel: bonding: bond0: making interface eth0 the new active one.
Nov 15 12:50:08 DB-04 kernel: tg3 0000:20:00.0: eth4: Link is up at 1000 Mbps, full duplex
Nov 15 12:50:08 DB-04 kernel: tg3 0000:20:00.0: eth4: Flow control is off for TX and off for RX
Nov 15 12:50:08 DB-04 kernel: tg3 0000:20:00.0: eth4: EEE is enabled
Nov 15 12:50:08 DB-04 kernel: bond0: link status definitely up for interface eth4, 1000 Mbps full duplex.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.