Commit 9b446645 authored by unknown's avatar unknown

removed unnecesary check in ConfigInfo

added retries to tryBind


ndb/src/common/mgmcommon/ConfigInfo.cpp:
  removed unnecesary check in ConfigInfo
ndb/src/mgmsrv/main.cpp:
  added retries to tryBind
parent 13de9798
......@@ -3118,9 +3118,7 @@ check_node_vs_replicas(Vector<ConfigInfo::ConfigRuleSection>&sections,
{
Uint32 db_nodes = 0;
Uint32 replicas = 0;
if (!ctx.m_userProperties.get("DB", &db_nodes)) {
return true;
}
ctx.m_userProperties.get("DB", &db_nodes);
ctx.m_userProperties.get("NoOfReplicas", &replicas);
if((db_nodes % replicas) != 0){
ctx.reportError("Invalid no of db nodes wrt no of replicas.\n"
......
......@@ -180,7 +180,12 @@ NDB_MAIN(mgmsrv){
glob.use_specific_ip = false;
if(!glob.use_specific_ip){
if(!glob.socketServer->tryBind(glob.port, glob.interface_name)){
int count= 5; // no of retries for tryBind
while(!glob.socketServer->tryBind(glob.port, glob.interface_name)){
if (--count > 0) {
NdbSleep_MilliSleep(1000);
continue;
}
ndbout_c("Unable to setup port: %s:%d!\n"
"Please check if the port is already used,\n"
"(perhaps a ndb_mgmd is already running),\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment