• Register
0 votes
200 views

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

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)

OR

 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

Solution:

  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
1 answer 90 views
90 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 975 views
975 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 mphil 2.3k points
1 vote
2 answers 76 views
76 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
1 vote
1 answer 62 views
62 views
Problem: I am very new to Web.xml coding. Currently I am facing serious problem because of my web.xml file. If I try to run my Apache tomcat 8 server then every time it shows me below error: Server tomcat v8.0 server at localhost failed to start. in eclipse. If I ... . This error made my life like the hell. So I am looking for the help from web.xml expert who can help me in fixing my problem.
asked May 18 Martin K 6.6k points
0 votes
1 answer 438 views
438 views
Problem : Currently I am trying to develop the REST API using the Spring Framework I am unable to run my application because of below error. Description: The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may ... this application to listen on another port. My 8080 port on my PC is seems to be busy. How can I fix this issue?
asked Feb 28 mphil 2.3k points