diff options
Diffstat (limited to 'cpp/src/IceGrid/IceGridNode.cpp')
-rw-r--r-- | cpp/src/IceGrid/IceGridNode.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cpp/src/IceGrid/IceGridNode.cpp b/cpp/src/IceGrid/IceGridNode.cpp index f3d0b95ef1d..b88e97bf575 100644 --- a/cpp/src/IceGrid/IceGridNode.cpp +++ b/cpp/src/IceGrid/IceGridNode.cpp @@ -455,6 +455,24 @@ NodeService::start(int argc, char* argv[]) _node->getPlatformInfo().start(); // + // Ensures that the locator is reachable. + // + if(!nowarn) + { + try + { + communicator()->getDefaultLocator()->ice_timeout(15000)->ice_ping(); + } + catch(const Ice::LocalException& ex) + { + Warning out(communicator()->getLogger()); + out << "couldn't reach the IceGrid registry (this is expected "; + out << "if it's down, otherwise please check the value of the "; + out << "Ice.Default.Locator property):\n" << ex; + } + } + + // // Create the node sessions with the registries. // _sessions.create(_node); |