summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/CHANGES3
-rw-r--r--cpp/src/IceGrid/IceGridNode.cpp18
2 files changed, 21 insertions, 0 deletions
diff --git a/cpp/CHANGES b/cpp/CHANGES
index 8e92eaa28a9..e2711a071fc 100644
--- a/cpp/CHANGES
+++ b/cpp/CHANGES
@@ -17,6 +17,9 @@ Changes since version 3.2.X (binary incompabible)
what() is implemented in terms of ice_print(), so overriding ice_print()
also changes the string returned by what().
+- The IceGrid node now prints a warning if it can't reach the IceGrid
+ registry when it starts. This warning can be disabled with --nowarn.
+
Changes since version 3.2.0
---------------------------
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);