diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-04-17 13:50:21 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-04-17 13:50:21 +0000 |
commit | 80c433cebc96292cf3e0e5a701c38a338883022e (patch) | |
tree | 32d01c832592071cfeb56afffd40de14d0f95884 /cpp/src/IceGrid/IceGridNode.cpp | |
parent | fixed build failure with GCC (diff) | |
download | ice-80c433cebc96292cf3e0e5a701c38a338883022e.tar.bz2 ice-80c433cebc96292cf3e0e5a701c38a338883022e.tar.xz ice-80c433cebc96292cf3e0e5a701c38a338883022e.zip |
Added warning to IceGrid node is registry can't be reached
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); |