title: Attach IntelliJ IDEA debugger to a remote java -server running process
body: <p>I run Java appliaction on Ubuntu virtual machine with command:</p>
  
  <pre><code>java -showversion -server -Xmx512M -Drps.home=${RPS_HOME} \
  -Dcontainer.host=${CONTAINER_HOST} \
  -Djava.util.logging.config.file=$4 \
  -classpath ${RPS_LIBS} com.softel.rps.impl.core.SPEngine ${CONFIG} \
  -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999
  </code></pre>
  
  <p>I opened port 9999 with command (an also forwarded port in VirtualBox):</p>
  
  <pre><code>sudo ufw allow 9999/tcp
  </code></pre>
  
  <p>And I try to attach debugger with IntelliJ IDEA:
  <a href="https://i.stack.imgur.com/URDmn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/URDmn.png" alt="IDEA debug"></a></p>
  
  <p>And finally i end up with error</p>
  
  <pre><code>IOException "handshake failed - connection prematurally closed"
  </code></pre>
  
  <p>Im not very well experienced in remote debugging. Can you tell me is it possible to attach debugger to java -server process?</p>