Question

Starting of Tomcat failed, the server port 8084 is already in use.

Asked by: mustish1

Hi: I am using NetBeans IDE 5.5. when I compile it it gives that message. How do i fix that error?

Thanks.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2006-11-20 at 17:13:52ID22067636
Tags

tomcat

,

port

,

use

,

netbeans

Topic

Java Server Pages (JSP)

Participating Experts
1
Points
500
Comments
37

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. NetBean IDE Debugger
    Netbean users; I started using the debugger a bit heavy and after a while the IDE got very sluggish. Have you experienced this problem? If so, is there a fix to make it run the way it was running? thanks
  2. simple netbean jsp application
    Hi, This is a question from 2 days old java programmer! I want to create a simple jsp web application using net bean. here is the tasks I have done: I created a jsp file. Here is its body. Its name is index.jsp. <%@ page import = "HelloJava.HelloJavaBean" %> ...
  3. NetBeans and TomCat for servlets
    Hello our lab (I am a Bioinformatist) is using an application that uses Oracle as the back end with a web application on the front end. The application is built by using Java Servlets using the Tom Cat container .(uses Velcity Template language for the "view" nad us...
  4. Tomcat 5.5.9 Port Problem
    I am trying to get Tomcat running within the Netbeans 5.0 (tomcat comes bundled) but I get the folloiwng error: The 8025 shutdown port is already in use. Therefore, I can build and not deploy my app cuz of this error message. What could be the problem?
  5. NetBeans not opening (Urgent)
    Dear experts, I can't start NetBeans. When I try to open Netbeans, it says "starting NetBeans" for few seconds and show nothing. No error message. It was working till I install tomcat 5.5. After installing tomcat, I created a webapplication project and try to depl...
  6. JSP compilation with Netbeans
    How do I compile JSP files in Netbeans 5.0? The compile file: F9 option is disabled. Any advise is really appreciated.

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: suprapto45Posted on 2006-11-20 at 17:31:45ID: 17984382

Hi,

It means that the port 8084 has already been used. I assumed that you run your embedded Tomcat within NetBeans. You need to change the port of your embedded Tomcat to other ports such as 8002 or anything.

http://www.dimensionex.net/en/docs/art008.htm

I think that your Tomcat is somewhere in <NETBEANS_FOLDER>/enterprises/tomcat....if I am not mistaken.

David

 

by: mustish1Posted on 2006-11-20 at 17:50:47ID: 17984434

Thanks David. I am using Windows 2000. This is the path of the Tomcat
C:\Program Files\netbeans-5.5\enterprise3\apache-tomcat-5.5.17\conf

But when i type http://localhost. IIS is start running as a default. I did change on that line but NetBeans still give me same error:
Starting of Tomcat failed, the server port 8084 is already in use.

I didnt find any thing like 8084 in that conf.xml file.
--------------------------------------------------------------------------------------------------
    <!-- Define a non-SSL HTTP/1.1 Connector on port 80 -->
    <Connector port="80" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
     to 0 -->

 

by: suprapto45Posted on 2006-11-20 at 17:54:51ID: 17984449

Hi,

Do not change to 80 then. It means that IIS is using your port 80. Try to change to some other values. How about 8089?

David

 

by: suprapto45Posted on 2006-11-20 at 17:56:18ID: 17984457

>>"I didnt find any thing like 8084 in that conf.xml file. "
Hmm....

Can you post your server.xml in your C:\Program Files\netbeans-5.5\enterprise3\apache-tomcat-5.5.17\conf?

 

by: mustish1Posted on 2006-11-20 at 17:56:42ID: 17984461

oh sure.

Thanks.

 

by: mustish1Posted on 2006-11-20 at 18:01:46ID: 17984484

I dont know where i do the change in the file so i upload it. If any one please tell me where would i go to change the port setting?

Thanks.

 

by: suprapto45Posted on 2006-11-20 at 18:03:09ID: 17984487

Hi,

Try to change
<Connector port="80" maxHttpHeaderSize="8192"

into
<Connector port="8089" maxHttpHeaderSize="8192"

Remember that you need to save it as server.xml. And try to run your Tomcat from your NetBeans again.

David

 

by: mustish1Posted on 2006-11-20 at 18:09:36ID: 17984512

It gives me same error:

Starting of Tomcat failed, the server port 8084 is already in use.
C:\Documents and Settings\Eric\WebApplication1\nbproject\build-impl.xml:440: Deployment error:
Starting of Tomcat failed, the server port 8084 is already in use.
See the server log for details.
BUILD FAILED (total time: 34 seconds)

 

by: suprapto45Posted on 2006-11-20 at 18:10:35ID: 17984515

Mmm....give me a sec

 

by: suprapto45Posted on 2006-11-20 at 18:13:34ID: 17984524

Can you post your build.xml?

 

by: mustish1Posted on 2006-11-20 at 18:13:54ID: 17984526

ok

 

by: mustish1Posted on 2006-11-20 at 18:18:38ID: 17984547

This file i copied it from my folder:
C:\Documents and Settings\Eric\WebApplication1

<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<project name="WebApplication1" default="default" basedir=".">
    <description>Builds, tests, and runs the project WebApplication1.</description>
    <import file="nbproject/build-impl.xml"/>
    <!--

    There exist several targets which are by default empty and which can be
    used for execution of your tasks. These targets are usually executed
    before and after some main targets. They are:

      -pre-init:                 called before initialization of project properties
      -post-init:                called after initialization of project properties
      -pre-compile:              called before javac compilation
      -post-compile:             called after javac compilation
      -pre-compile-single:       called before javac compilation of single file
      -post-compile-single:      called after javac compilation of single file
      -pre-compile-test:         called before javac compilation of JUnit tests
      -post-compile-test:        called after javac compilation of JUnit tests
      -pre-compile-test-single:  called before javac compilation of single JUnit test
      -post-compile-test-single: called after javac compilation of single JUunit test
      -pre-dist:                 called before jar building
      -post-dist:                called after jar building
      -post-clean:               called after cleaning build products
      -pre-run-deploy:           called before deploying
      -post-run-deploy:          called after deploying

    Example of pluging an obfuscator after the compilation could look like

        <target name="post-compile">
            <obfuscate>
                <fileset dir="${build.classes.dir}"/>
            </obfuscate>
        </target>

    For list of available properties check the imported
    nbproject/build-impl.xml file.


    Other way how to customize the build is by overriding existing main targets.
    The target of interest are:

      init-macrodef-javac:    defines macro for javac compilation
      init-macrodef-junit:   defines macro for junit execution
      init-macrodef-debug:    defines macro for class debugging
      do-dist:                jar archive building
      run:                    execution of project
      javadoc-build:          javadoc generation

    Example of overriding the target for project execution could look like

        <target name="run" depends="<PROJNAME>-impl.jar">
            <exec dir="bin" executable="launcher.exe">
                <arg file="${dist.jar}"/>
            </exec>
        </target>

    Notice that overridden target depends on jar target and not only on
    compile target as regular run target does. Again, for list of available
    properties which you can use check the target you are overriding in
    nbproject/build-impl.xml file.

    -->
</project>

 

by: suprapto45Posted on 2006-11-20 at 18:19:38ID: 17984553

Can you post nbproject/build-impl.xml as well as your build.xml is importing this file?

 

by: mustish1Posted on 2006-11-20 at 18:20:25ID: 17984556

ok

 

by: mustish1Posted on 2006-11-20 at 18:23:44ID: 17984569

This file i copied from folder

C:\Documents and Settings\Eric\WebApplication1\nbproject\build-impl.xml

 

by: suprapto45Posted on 2006-11-20 at 18:27:10ID: 17984584

Sorry,

Another one...

<import file="ant-deploy.xml"/>

Can you post your ant-deploy.xml? This may be the problem as it is error in deploying your app.

 

by: mustish1Posted on 2006-11-20 at 18:27:45ID: 17984587

ok no problem. Thanks to give me a time.

 

by: mustish1Posted on 2006-11-20 at 18:29:39ID: 17984593

<?xml version="1.0" encoding="UTF-8"?>
<project default="-deploy-ant" basedir=".">
    <target

name="-init" if="deploy.ant.enabled">k
        <property file="${deploy.ant.properties.file}"/>
   

     <tempfile property="temp.module.folder" prefix="tomcat" destdir="${java.io.tmpdir}"/>
       

 <unwar src="${deploy.ant.archive}" dest="${temp.module.folder}">
            <patternset

includes="META-INF/context.xml"/>
        </unwar>
        <xmlproperty

file="${temp.module.folder}/META-INF/context.xml"/>
        <delete

dir="${temp.module.folder}"/>
    </target>
    <target name="-deploy-ant"

if="deploy.ant.enabled" depends="-init">
        <echo message="Deploying ${deploy.ant.archive}

to ${Context(path)}"/>
        <taskdef name="deploy"

classname="org.apache.catalina.ant.DeployTask"
                 

classpath="${tomcat.home}/server/lib/catalina-ant.jar"/>
        <deploy

url="${tomcat.url}/manager" username="${tomcat.username}"
               

password="${tomcat.password}" path="${Context(path)}"
               

war="${deploy.ant.archive}"/>
        <property name="deploy.ant.client.url"

value="${tomcat.url}${Context(path)}"/>
    </target>
    <target name="-undeploy-ant"

if="deploy.ant.enabled" depends="-init">
        <echo message="Undeploying ${Context(path)}"/>
 

      <taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask"
               

classpath="${tomcat.home}/server/lib/catalina-ant.jar"/>
        <undeploy

url="${tomcat.url}/manager" username="${tomcat.username}"
                 

password="${tomcat.password}" path="${Context(path)}"/>
    </target>
</project>

 

by: suprapto45Posted on 2006-11-20 at 18:32:26ID: 17984600

Are there any .properties file in this folder?

 

by: mustish1Posted on 2006-11-20 at 18:32:47ID: 17984602

one sec i check

 

by: mustish1Posted on 2006-11-20 at 18:33:22ID: 17984607

genfiles.properties
project.properties

 

by: suprapto45Posted on 2006-11-20 at 18:34:49ID: 17984612

what are the contents of project.properties?

 

by: mustish1Posted on 2006-11-20 at 18:35:30ID: 17984615

build.classes.dir=${build.web.dir}/WEB-INF/classes
build.classes.excludes=**/*.java,**/*.form
build.dir=build
build.ear.classes.dir=${build.ear.web.dir}/WEB-INF/classes
build.ear.web.dir=${build.dir}/ear-module
build.generated.dir=${build.dir}/generated
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
build.web.dir=${build.dir}/web
build.web.excludes=${build.classes.excludes}
client.urlPart=
compile.jsps=false
conf.dir=${source.root}/conf
debug.classpath=${javac.classpath}:${build.classes.dir}:${build.ear.classes.dir}
debug.test.classpath=\
    ${run.test.classpath}
display.browser=true
dist.dir=dist
dist.ear.war=${dist.dir}/${war.ear.name}
dist.javadoc.dir=${dist.dir}/javadoc
dist.war=${dist.dir}/${war.name}
j2ee.platform=1.4
j2ee.server.type=Tomcat55
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
javac.compilerargs=
javac.debug=true
javac.deprecation=false
javac.source=1.4
javac.target=1.4
javac.test.classpath=\
    ${javac.classpath}:\
    ${build.classes.dir}:\
    ${libs.junit.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.preview=true
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jspcompilation.classpath=${jspc.classpath}:${javac.classpath}
lib.dir=${web.docbase.dir}/WEB-INF/lib
no.dependencies=false
platform.active=default_platform
resource.dir=setup
run.test.classpath=\
    ${javac.test.classpath}:\
    ${build.test.classes.dir}
# Space-separated list of JVM arguments used when running class with main method
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value):
runmain.jvmargs=
source.root=src
src.dir=${source.root}/java
test.src.dir=test
war.content.additional=
war.ear.name=WebApplication1.war
war.name=WebApplication1.war
war.package=true
web.docbase.dir=web

 

by: suprapto45Posted on 2006-11-20 at 18:37:42ID: 17984628

Any .url file?

 

by: mustish1Posted on 2006-11-20 at 18:39:23ID: 17984632

I didnt find any of it but i will be search it in that folder Document and Settings.

 

by: suprapto45Posted on 2006-11-20 at 18:41:23ID: 17984638

Mm.....I never think that changing the embedded Tomcat inside NetBeans is rather difficult.

I may need to test it in another machine that has NetBeans. However, I may do it in the evening so I think that you have to wait for that.

 

by: mustish1Posted on 2006-11-20 at 18:41:25ID: 17984639

Only Yahoo url files are there

 

by: mustish1Posted on 2006-11-20 at 18:42:26ID: 17984643

ok thanks no problem i also want to go on bed as my girl is looking with very angry eyes.

 

by: suprapto45Posted on 2006-11-20 at 18:44:53ID: 17984652

>>"ok thanks no problem i also want to go on bed as my girl is looking with very angry eyes."
Watch out and enjoy :).

 

by: suprapto45Posted on 2006-11-21 at 07:04:48ID: 17987605

Hello,

I have checked my NetBeans 5.5.

Assuming that you use either WinXP or Win2000, try to find server.xml located in your Document and Setting folder. In my PC, it is in
C:\Documents and Settings\Administrator\.netbeans\5.5\apache-tomcat-5.5.17_base\conf

Find the line as
    <Connector URIEncoding="utf-8" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8084" redirectPort="8443"/>

As you can see, it is 8084 as the port. Try to change it to something else such as 8099. And try to run your project again.

Good luck

David

 

by: mustish1Posted on 2006-11-21 at 17:30:21ID: 17992312

Thanks David i just did the changes and it works cheers. Second thing which i observe is i shut down the IDE and the tomcat is still running. I open the index.jsp file and did some changes and it shows the changes there. So just to know does the web server really works without loading the netbeans as i guess is every thing is in netbeans-5.5 bundle.

 

by: mustish1Posted on 2006-11-21 at 17:31:57ID: 17992318

Basically i feel comfortable to open a notepad and start writting instead of using netbeans. If i can use the webserver without loading the IDE then its really great.

 

by: suprapto45Posted on 2006-11-21 at 18:38:36ID: 17992561

>>"Second thing which i observe is i shut down the IDE and the tomcat is still running."
It should shut down Tomcat automatically IF you run your Tomcat WITHIN the NetBeans. It won't shutdown if you start your Tomcat from OUTSIDE the NetBeans.

>>"Basically i feel comfortable to open a notepad and start writting instead of using netbeans. If i can use the webserver without loading the IDE then its really great."
Yes, you can do that. Why not? NetBeans is created for you to ease your programming language. Similarly, Eclipse, JCreator and those Java IDEs are created to make you faster in your programming language.

If I am not wrong, this is what happens when your run your project. It builds your Web Application to either WAR or EAR file and deploy it automatically to Tomcat. So you can do these procedures manually without NetBeans but it is rather complicated and complex.

My suggestion to you is to stick with IDE but you need to understand the concept as well.

David

 

by: mustish1Posted on 2006-11-21 at 18:42:40ID: 17992577

Ok thanks David.

 

by: suprapto45Posted on 2006-11-21 at 18:46:01ID: 17992600

Glad I could help

David

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...