Author Topic: Eclipse/Maven/Ubuntu problem  (Read 1102 times)

Offline BillW

  • UNIX Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
  • UNIX newbie
    • View Profile
Eclipse/Maven/Ubuntu problem
« on: June 10, 2009, 12:12:03 pm »
Currently I am starting to use both Linux and  Eclipse so I have a considerable learning.
When attempting to run a web-app under eclipse/maven, the server (either jetty or tomcat) complains that port 8080 is already being used. How does one determine what is using it and change such that is free to be used by eclipse/maven?

Thanks

Offline scotbuff

  • Sys Admin
  • UNIX User
  • *****
  • Posts: 174
  • Karma: +2/-0
    • View Profile
    • Scott.Buffington.me
Re: Eclipse/Maven/Ubuntu problem
« Reply #1 on: June 10, 2009, 06:35:23 pm »
Run the following command from the Terminal.

sudo netstat -tlnp

sudo is important if you want to see the PID and Program name.  You will probably see somethng like the following.

Code: [Select]
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      2803/mysqld     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      3764/apache2       
tcp6       0      0 :::8080                 :::*                    LISTEN      3790/jsvc

Perhaps a few more might be in there depending on what you have installed.  My guess is Tomcat is installed on your system and executing and thus already using port 8080, I believe it does by default.  You can execute the following command to verify ps -ef |grep PID#  In my example it would be ps -ef |grep 3790

Unfortunately I am not a Java guy, so not sure what your next step might be.  I would be happy to help if I can if you have further questions.  Are you attempting to start a second Tomcat instance maybe?  Let me know if you have any further questions.
« Last Edit: June 10, 2009, 06:40:38 pm by scotbuff »