From 431ffc0eab1226d3937a4b4f1349ce38a5c16593 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 07 May 2008 13:55:57 +0000
Subject: [PATCH] Fix for issue 3176 (Improve stop-ds error message : not enough information is provided)
---
opendj-sdk/opends/src/server/org/opends/server/tools/ManageAccount.java | 4 +++-
opendj-sdk/opends/src/messages/messages/tools.properties | 11 +++++++----
opendj-sdk/opends/src/server/org/opends/server/tools/StopDS.java | 4 +++-
3 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/opendj-sdk/opends/src/messages/messages/tools.properties b/opendj-sdk/opends/src/messages/messages/tools.properties
index cec583f..7a079b8 100644
--- a/opendj-sdk/opends/src/messages/messages/tools.properties
+++ b/opendj-sdk/opends/src/messages/messages/tools.properties
@@ -696,7 +696,8 @@
SEVERE_ERR_STOPDS_CANNOT_DETERMINE_PORT_400=ERROR: Cannot parse the value of \
the %s argument as an integer value between 1 and 65535: %s
SEVERE_ERR_STOPDS_CANNOT_CONNECT_401=ERROR: Cannot establish a connection to \
- the Directory Server: %s
+ the Directory Server %s. Verify that the server is running and that \
+ the provided credentials are valid. Details: %s
SEVERE_ERR_STOPDS_UNEXPECTED_CONNECTION_CLOSURE_402=NOTICE: The connection \
to the Directory Server was closed while waiting for a response to the \
shutdown request. This likely means that the server has started the shutdown \
@@ -1805,8 +1806,9 @@
mechanism should be used
SEVERE_ERR_PWPSTATE_CANNOT_DETERMINE_PORT_1188=ERROR: Cannot parse the value \
of the %s argument as an integer value between 1 and 65535: %s
-SEVERE_ERR_PWPSTATE_CANNOT_CONNECT_1189=ERROR: Cannot establish a connection \
- to the Directory Server: %s
+SEVERE_ERR_PWPSTATE_CANNOT_CONNECT_1189=ERROR: Cannot establish a connection to \
+ the Directory Server %s. Verify that the server is running and that \
+ the provided credentials are valid. Details: %s
INFO_UPGRADE_DESCRIPTION_FILE_1190=Specifies an existing OpenDS package \
(.zip) file to which the current build will be upgraded using the command \
line version of this tool
@@ -1875,7 +1877,8 @@
SEVERE_ERR_LDAP_CONN_CANNOT_DETERMINE_PORT_1298=ERROR: Cannot parse the value \
of the %s argument as an integer value between 1 and 65535: %s
SEVERE_ERR_LDAP_CONN_CANNOT_CONNECT_1299=ERROR: Cannot establish a connection \
- to the Directory Server: %s
+ to the Directory Server %s. Verify that the server is running and that \
+ the provided credentials are valid. Details: %s
INFO_LDAP_CONN_DESCRIPTION_HOST_1300=Directory server hostname or IP address
INFO_LDAP_CONN_DESCRIPTION_PORT_1301=Directory server port number
INFO_LDAP_CONN_DESCRIPTION_USESSL_1302=Use SSL for secure communication with \
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/ManageAccount.java b/opendj-sdk/opends/src/server/org/opends/server/tools/ManageAccount.java
index b5e532a..b942bcb 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/ManageAccount.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/ManageAccount.java
@@ -1402,7 +1402,9 @@
}
catch (LDAPConnectionException lce)
{
- Message message = ERR_PWPSTATE_CANNOT_CONNECT.get(lce.getMessage());
+ String hostPort = host.getValue() + ":" + port.getValue();
+ Message message = ERR_PWPSTATE_CANNOT_CONNECT.get(hostPort,
+ lce.getMessage());
err.println(wrapText(message, MAX_LINE_WIDTH));
return LDAPResultCode.CLIENT_SIDE_CONNECT_ERROR;
}
diff --git a/opendj-sdk/opends/src/server/org/opends/server/tools/StopDS.java b/opendj-sdk/opends/src/server/org/opends/server/tools/StopDS.java
index 3b4fc00..bad879c 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tools/StopDS.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tools/StopDS.java
@@ -669,7 +669,9 @@
}
catch (LDAPConnectionException lce)
{
- Message message = ERR_STOPDS_CANNOT_CONNECT.get(lce.getMessage());
+ String hostPort = host.getValue() + ":" + port.getValue();
+ Message message = ERR_STOPDS_CANNOT_CONNECT.get(hostPort,
+ lce.getMessage());
err.println(wrapText(message, MAX_LINE_WIDTH));
return LDAPResultCode.CLIENT_SIDE_CONNECT_ERROR;
}
--
Gitblit v1.10.0