MySQL is justly famous for providing incomprehensible error messages. The typical response to receiving one of these messages is to google for it, because someone else has almost certainly run into the same problem before, and the answer will be posted on a forum.
Perhaps because NDB is somewhat more exotic than MySQL itself, I have been privileged to encounter some messages that the Internets could not completely decode for me. As a public service, I intend to annotate the unusual error messages I receive.
The first entry in this MySQL error lexicon is deceptively complicated. It is actually a well known error message with a common meaning. But like all the best words, it has another more subtle meaning. I encounted it when one of our NDB API nodes died, and after rebooting, was unable to rejoin the cluster and provided only this message, which is contradictory on its face:
[MgmSrvr] Allocate nodeid (0) failed. Connection from ip 192.168.2.24. Returned error string "Connection done from wrong host ip 192.168.2.24."I have found that message can mean any of the following:
- The obvious meaning: an NDB node has been configured to connect using the wrong IP address. Perhaps the node id is specified in the connect string and it doesn't match the IP address of the node.
- A node is trying to connect but it hasn't been configured at all. This is also very common, but does require a slightly more liberal interpretation of the error message.
- NDB allocates resources for each node that is configured, and as long as it believes that a node is connected, it will not let another process connect as the same node (be that by specifying the node id or auto-detecting the node id using the IP address). It may be that if the node has died in a particular way, ndb_mgmd still thinks that it is connected. Issuing "PURGE STALE SESSIONS" from ndb_mgm may cause ndb_mgmd to recognize that the node is no longer connected. Reports indicate that improvements to NDB may have rendered this problem obsolete.
- Just as ndb_mgmd allocates resources for each node, so do the data nodes. And even if ndb_mgmd is aware that the problem node is not connected, the data nodes may mistakenly believe that it is, especially if it has died in an inopportune manner. If the configuration is correct, and issuing "PURGE STALE SESSIONS" and restarting ndb_mgmd do not solve the problem, there may be a stale connection on a data node. The command "lsof" will show whether ndbd has an open connection to the host that can not join the cluster. If it does, a rolling restart of the data nodes may release the resources that are preventing the node from joining.
The center-mounted ceiling fixture found in most homes is a lighting fixture whose best use is perhaps to provide enough light to install other lights. You are virtually guaranteed to cast a shadow on whatever task you undertake, or have the light source in your field of vision, or in some cases, both. 


