• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

port already in use

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am newbies in using Tomcat.
I place the following to my catalina.sh
JAVA_OPTS=-Dcom.sun.management.jmxremote.port=9004


After that, I run the tomcat shutdown.sh and i get the following error message:
[root@localhost bin]# ./shutdown.sh
Using CATALINA_BASE: /opt/apache-tomcat
Using CATALINA_HOME: /opt/apache-tomcat
Using CATALINA_TMPDIR: /opt/apache-tomcat/temp
Using JRE_HOME: /usr/java/jdk1.5.0_22
Using CLASSPATH: /opt/apache-tomcat/bin/bootstrap.jar
Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 9004; nested exception is:
java.net.BindException: Address already in use

Can anyone guide me step-by-step on this...
Appreciate your guidance.

Looking forward to hear from you all.
Thanks in advance,
Wilson
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You probably need to find out what is using that port. Which OS are you using?
 
allen sim
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I checked. There is nothing using the port. Even i changed the port number, it still saying that Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 9004; nested exception is:
java.net.BindException: Address already in use .

I am using Linux CentOS.

Please help me..

Looking forward to hear from you.

Thanks in advance,
Allen Wilson
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're getting a message which says that port 9004 is in use, then port 9004 is in use. If your checking says it isn't in use then your checking is wrong.
 
Ranch Hand
Posts: 470
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

allen sim wrote:After that, I run the tomcat shutdown.sh and i get the following error message



What happens with Tomcat? Did it get shutdown? If not, check https://issues.apache.org/bugzilla/show_bug.cgi?id=36976
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I remember correctly, netstat -b command can be used to get all active processes and ports.
 
reply
    Bookmark Topic Watch Topic
  • New Topic