• Register
0 votes

Problem  :

I am often facing the below error when I want to Debug from my Eclipse IDE.

Message: “Failed to connect to remote VM. Connection Refused”

How can I fix this error?

6 5 3
7,540 points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

In my case I had to turn my Windows Firewall off

1- Open your Windows Firewall by just clicking the Start button Picture of the Start button, and then clicking the Control Panel. In your search box, just type firewall, and after that click on Windows Firewall.

2- Now just click on Turn Windows Firewall on or off. The Administrator permission required If you are prompted for the administrator password or the confirmation, type your password or provide the confirmation.

3- Click on Turn off Windows Firewall (not recommended by me) under the each network location that you are trying to stop the protection, and after that click on OK.

Some times you need below steps also

  1. To stop all the Vpn client services (fortiClient ,vpn Client ...)
  1. To stop all the Antivirus Firewall ( exemple Kaspersky => Configuration => Anti-Hacker)


 I am using the jboss so the solution to your problem is very simple just restart using the below command :

service jboss-portal restart



9 7 4
38,600 points
0 votes


  1. In your debug configuration you'll have to identify the correct port of your server (GF:9009 / Tomcat:8000)

  2. You'll have to place the JVM property of the server to debug

For Glassfish:

Log in to admin-console > Configurations > server-config > JVM-Settings > check DEBUG checkbox > restart server

For Tomcat:

make file debug.bat/.sh (depending on your OS) in %TOMCAT_HOME%/bin directory and write

   set JPDA_ADDRESS=8000
    set JPDA_TRANSPORT=dt_socket
    catalina.bat jpda start

in it.

Afterwards you've made this file begin server by executing debug.bat/.sh.

Cueerntly, you must be able to debug remotely in Eclipse after you fix the required properties in your debug configuration.

In case you're running tomcat in a Win environment as a service you don't have a catalina.bat file in the bin-directory of your tomcat installation.
For setting your server into debug-mode please attempt the following:

  1. Run the Configuration option in Windows Menu or run %catalina_home%/bin/tomcat6w.exe

  2. In Java tab, include this line to Java:

10 6 4
31,120 points

Related questions

0 votes
0 answers 11 views
Problem: telnet unable to connect to remote host connection refused
asked Feb 19 Dan phillip 4.8k points
0 votes
1 answer 173 views
Problem : I am having a box with 8gb of ram, so I don't think the total memory is the issue. This application is running properly on boxes with 6gb or less ram. What I am trying to do is to reserve 3GB of space using -Xmx3G command under "VM ... : Error occurred during initialization of VM; Could not reserve enough space for object heap using -Xmx3G Why am I getting such error any clue?
asked Nov 26, 2019 alecxe 7.5k points
0 votes
1 answer 4 views
Problem: What caused the error, " Error: failed to connect to port 9050: connection refused " ?
asked 3 days ago salim1 39k points
0 votes
1 answer 1 view
1 view
Problem: I tried to find out the solution on the web when I face this problem (Failed to connect to server: Connection refused (111).) but I did not get any useful information that I can continue if you know what is the solution to this please tell me.
asked Mar 30 zayed1 35.6k points
1 vote
1 answer 7 views
Problem: Can someone please help fix this : smtp error failed to connect to server connection refused 111
asked Mar 18 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 4 views
Problem: How to fix this error : smtp error: failed to connect to server: connection refused (111)
asked Mar 18 MUHAMMAD MUNEEB 83k points
1 vote
1 answer 2 views
Problem: Any ideas on what I need to do to fix this? smtp error: failed to connect to server: connection refused (111)smtp connect() failed.
asked Mar 18 MUHAMMAD MUNEEB 83k points
0 votes
1 answer 1.7K views
Problem : I am very new to Curl. I have recently started learning Curl. Whenever I try to connect to the Elasticsearch using below command curl http://localhost:9200 it is working properly. But when I try to run the following command curl http://IpAddress: ... showing me below error “Curl: (7) failed to connect to localhost port 9200: connection refused” How can I resolve above error?
asked Feb 20, 2020 mphil 2.3k points
1 vote
2 answers 398 views
Problem : Is there anything I can do to solve the following problem? unable to connect to upstart: failed to connect to socket /com/ubuntu/upstart: connection refused
asked Nov 11, 2019 peterlaw 6.9k points
0 votes
1 answer 4 views
Problem: I spotted this error > channel 2: open failed: connect failed: connection refused
asked Apr 1 Azlan2020 2.3k points