Encountered this error while trying to debug my project. IDE: Eclipse Server: Jboss Error: Failed to connect to remote VM. Connection refused. Reason : When we install JBoss server the debug option is disabled by default. Solution : Go to ur jboss directory “<directory>/bin” and edit run.bat. Search for: rem set JAVA_OPTS = -Xdebug -Xrunjdwp:transport=dt_socket, address=8787, server=y, suspend=y %JAVA_OPTS% ‘rem’ in above statement shows that this line is comments. So remove ‘rem’ and set suspend=n.