Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6529230

JConsole hangs up when connecting to service:jmx:rmi:///jndi/rmi://nonexistent.host:128000/jmxrmi

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 6
    • Fix Version/s: 7
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b21
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Backports

        Description

        JConsole is stuck forever in "Connecting to ..." window when trying to connect to URL with unexisting host and too big port number:

        $ jconsole service:jmx:rmi:///jndi/rmi://zoloto.partii:128000/jmxrmi

        An exception is printed in console:
        Exception in thread "VMPanel.connect" java.lang.IllegalArgumentException: port out of range:128000
        at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
        at java.net.Socket.<init>(Socket.java:179)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)
        at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:322)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java:97)
        at com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1871)
        at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1841)
        at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:257)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:248)
        at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:207)
        at sun.tools.jconsole.ProxyClient.tryConnect(ProxyClient.java:347)
        at sun.tools.jconsole.ProxyClient.connect(ProxyClient.java:297)
        at sun.tools.jconsole.VMPanel$2.run(VMPanel.java:279)

        This behavior was notified on Linux AMD64 and Windows XP.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  lmalvent Luis-Miguel Alventosa (Inactive)
                  Reporter:
                  kshiroko Kirill Shirokov (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: