-
Bug
-
Resolution: Fixed
-
P3
-
7
-
b08
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8179643 | 9 | Shafi Ahmad | P3 | Resolved | Fixed | b169 |
JDK-8196263 | 8u191 | Shafi Ahmad | P3 | Resolved | Fixed | b01 |
JDK-8201108 | 8u181 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8187801 | 8u172 | Shafi Ahmad | P3 | Resolved | Fixed | b01 |
JDK-8203112 | emb-8u181 | Shafi Ahmad | P3 | Resolved | Fixed | master |
In sun/management/jmxremote/ConnectorBootstrap.java, in exportMBeanServer(), we wrap IOException in AgentConfigurationError:
catch(IOException ioexception)
{
if(jmxconnectorserver == null)
throw new
AgentConfigurationError("agent.err.connector.server.io.error", ioexception,
new String[] {
jmxserviceurl.toString()
});
But in the Agent.java this exception is caught and the wrapped exception is
ignored:
if (jmxremote != null || jmxremotePort != null) {
259 if (jmxremotePort != null) {
260 jmxServer = ConnectorBootstrap.
261 startRemoteConnectorServer(jmxremotePort, props);
262 startDiscoveryService(props);
263 }
264 startLocalManagementAgent();
265 }
266
267 } catch (AgentConfigurationError e) {
268 error(e.getError(), e.getParams()); <--this just prints the
error message and not the stack trace and ignores the wrapped exception
269 } catch (Exception e) {
270 error(e);
271 }
We should fix this code to print information about the original exception as
well.
With the current code, what the user sees is the following message without the i/o error that caused this failure:
Error: JMX connector server communication error:
service:jmx:rmi://us2z24-emcs-nvm-ita-loader1.emcs.z24.usdc2.oraclecloud.com
catch(IOException ioexception)
{
if(jmxconnectorserver == null)
throw new
AgentConfigurationError("agent.err.connector.server.io.error", ioexception,
new String[] {
jmxserviceurl.toString()
});
But in the Agent.java this exception is caught and the wrapped exception is
ignored:
if (jmxremote != null || jmxremotePort != null) {
259 if (jmxremotePort != null) {
260 jmxServer = ConnectorBootstrap.
261 startRemoteConnectorServer(jmxremotePort, props);
262 startDiscoveryService(props);
263 }
264 startLocalManagementAgent();
265 }
266
267 } catch (AgentConfigurationError e) {
268 error(e.getError(), e.getParams()); <--this just prints the
error message and not the stack trace and ignores the wrapped exception
269 } catch (Exception e) {
270 error(e);
271 }
We should fix this code to print information about the original exception as
well.
With the current code, what the user sees is the following message without the i/o error that caused this failure:
Error: JMX connector server communication error:
service:jmx:rmi://us2z24-emcs-nvm-ita-loader1.emcs.z24.usdc2.oraclecloud.com
- backported by
-
JDK-8179643 Improve diagnostics in sun.management.Agent#startAgent()
-
- Resolved
-
-
JDK-8187801 Improve diagnostics in sun.management.Agent#startAgent()
-
- Resolved
-
-
JDK-8196263 Improve diagnostics in sun.management.Agent#startAgent()
-
- Resolved
-
-
JDK-8201108 Improve diagnostics in sun.management.Agent#startAgent()
-
- Resolved
-
-
JDK-8203112 Improve diagnostics in sun.management.Agent#startAgent()
-
- Resolved
-