Connection refused: connect

By: Ramlak Emailed: 1646 times Printed: 2119 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

If you are seeing this ' Connection refused: connect' error in your tomcat stdout log file then I am sure it keeps repeating quite frequently and your log file grows tremendously due to this error.

This error may not be affecting the functionality of your webapps but it will affect the performance of the tomcat and slow it down. The main cause of this error is due to some sort of http monitor setting in your tomcat web.xml file. The complete error looks like this. Connection refused: connect
at Method)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at<init>(Unknown Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at Source)
at org.netbeans.modules.web.monitor.server.NotifyUtil$

This happens as soon as you add an external server to Netbeans, and tell it to monitor the HTTP traffic, it will install a Filter to apply to all HTTP requests, to pass directly to Netbeans, so that it may show it in the Monitor. This is a good thing, when Netbeans is running. However, as soon as Netbeans isn't running, your performance will fall dramatically, as the Tomcat server tries to connect to a non existing Netbeans, and pay the penalty of waiting to find that out, for every single HTTP request.

Now you may tell me, I never did anything like that. I dont even know what netbeans is etc. etc. Whatever is the case, just follow the steps I have listed here and this problem will be resolved.

  1. Stop the Tomcat if it is running.
  2. Second goto the Tomcat Install Directory, and into the common directory, and then into libs. Inside here you will see a file called "org-netbeans-modules-web-httpmonitor.jar". Delete this or move it. It should not be in this directory.
  3. Third you need to edit the web.xml file inside the conf directory in the Tomcat Install Directory. You are looking for a block of XML that says something very similar to

    </filter-mapping>Delete that block from the file, and save it.
  4. Finally, you can restart Tomcat, and you will no longer see that error again.

JSP Home | All JSP Tutorials | Latest JSP Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.

Bookmark and Share


1. View Comment

I am facing the same problem but org-netbeans-modules-web-httpmonitor.jar\". is already not added in my lib file so it is not working for me please tell if anybody have any others solution


View Tutorial          By: Anonymous at 2009-05-08 07:59:09
2. View Comment


View Tutorial          By: MAEN ZIAD HUDAIB at 2009-07-01 01:55:28
3. View Comment

I deploy a project in apache tomcat and backend to project is when i tried to retrive the data it get error "java.rmi.connectionexception connection refused to local host" and "".
please send the solution. It's very urgent i have to submit my academic project within 2days

View Tutorial          By: satish at 2010-08-04 05:31:59
4. View Comment

I faced an exception " Connection refused", and the fix to my prob was:
Login using putty to the server IP with uid/pwd, go to root and hit ftp, at the ftp prompt, type the command "open" followed by <IP address> if this shows “connection refused” then it means we are not able to get connected to the server. Solution is at the OS level, one of the services vsftpd is not running because of the server which was abruptly shut down over the weekend . They restarted the service and now my app works fine.

View Tutorial          By: Sandhya Rani Vellanki at 2010-11-15 00:39:24
5. View Comment

I am getting this error with Minecraft; Feed the Beast Launcher. I do not have TomCat, and do not know if this mod uses it at all. If it does, I have no idea where to find it. Any suggestions on fixing this error with this program pack?

View Tutorial          By: LadyKianna at 2013-03-11 05:52:54

Your name (required):

Your email(required, will not be shown to the public):

Your sites URL (optional):

Your comments:

More Tutorials by Ramlak
While Loop in
For Each…Next Loop in
For Loop in
Do Loop in
Setting Up SSL on Tomcat
Unicode and UTF-8 in C
Sample program to demonstrate the use of ActionListener HTTPS hostname wrong: should be PKIX path building failed: unable to find valid certification path to requested target Connection refused: connect
'LINK.EXE' is not recognized as an internal or ext
Using Transactions in JDBC
What is the ACID principal?
How connection pooling works in Java and JDBC
A simple JDBC application sample code

More Tutorials in JSP
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: ` Permission denied <null>:80
JSP Alert Example
JSP CheckBox Example
Uploading an Image to a Database using JSP
Uploading a file to a server using JSP
A JSP page that gets properties from a bean
The page Directive in JSP
The taglib, tag, include, attribute and the variable Directive in JSP
Declarations in JSP
Scriptlets and Expressions in JSP
Tag Libraries in JSP
The Request Object in JSP
The Response Object in JSP
The Out Object in JSP
The Session Object in JSP

More Latest News
Most Viewed Articles (in JSP )
JSP CheckBox Example
JSP Program for display Date
JSP Example to connect to MS SQL database and retrieve records
Sending Email using JSP
What are the different scopes in JSP?
JSP Alert Example
Comparison operators in JSP
Uploading a file to a server using JSP
Uploading an Image to a Database using JSP
Automatically Refreshing a JSP
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: ` Permission denied <null>:80
The JSP Program running first Time.
Embedding java codes in jsp sciptlets
Protecting your website with a login page
Form Object
Most Emailed Articles (in JSP)
Steps to get a Free SSL certificate for your Tomcat
What is JSP?
Retrieving a Portion of a String
Tags using in jsp
Tag libraries
Closing Windows
Radio Object
Frame Object
Math Object
Disabling Scriptlets in JSP using web.xml
Getting HTTP Request Headers in a JSP
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: ` Permission denied <null>:80
What is JSP?
Click to Activate and Use this control
Built-in Object in Javascript