title: jconsole error during jrmp connection establishment nested exception is : java.io.EOFException
body: <p>I am trying to monitor a remote process using jconsole and this was the command I used</p>
  
  <pre><code>jconsole -debug localhost:4080
  </code></pre>
  
  <p>And this is the stack trace that I get</p>
  
  <pre><code>java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: 
      java.io.EOFException
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:286)
      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 sun.tools.jconsole.ProxyClient.checkSslConfig(ProxyClient.java:217)
      at sun.tools.jconsole.ProxyClient.&lt;init&gt;(ProxyClient.java:110)
      at sun.tools.jconsole.ProxyClient.getProxyClient(ProxyClient.java:463)
      at sun.tools.jconsole.JConsole$3.run(JConsole.java:510)
  Caused by: java.io.EOFException
      at java.io.DataInputStream.readByte(DataInputStream.java:250)
      at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:228)
  </code></pre>
  
  <p>It is able to attach successfully if I supply the pid of the process to jconsole.</p>