Can't run a Servlet with Tomcat because something is using the ports - eclipse

I'm trying to write a Servlet in eclipse configured to use Tomcat 5.5 and I get the following error when I try to run it:
Several ports (8080, 8009) required by Tomcat v5.5 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s)
As far as I know, Tomcat 5.5 is the one using port 8080, and when I go to http://localhost:8080 I do get the Tomcat success page, so it looks like eclipse tries to run another instance of Tomcat without shutting down the original and fails. How do I solve this?

like it says, something is using the port.
there are two solutions for your problem.
identify (on windows with netstat command) what is using the port (e.g. skype, ...) and stop it
change the port of your tomcat runtime in eclipse -> http://techteam.wordpress.com/2009/02/13/changing-the-tomcat-port-settings-in-eclipse/
hope this helps

Related

Wildfly stops when running in debug mode in Eclipse

I installed Eclipse and the Jboss Tools plugin with Wildfly.
I can run Wildfly in Eclipse in non-debug mode with no problems. But when I start Wildfly in debug, I can use it for a few minutes, and then it suddenly stops processing, the server ends.
I checked the log and there's nothing. What could be wrong?
Please note the JBoss Tools 4.9.0 is validated against 2018-09 but not against 2018-12.
Do you see something in the server log when the server dies ?
We had this issue and it was because we changed our config to close the management port, which had been used to detect that the server had started. Eclipse could no longer detect that the server had started, so it shut down the process after a set time (450 seconds)
To resolve the issue, we did the following in the Eclipse's Overview panel for our JBoss Server:
Changed the Start Timeout to 30, so it would only fail if it actually couldn't start in 30 seconds rather than waiting for 450
Changed our "Server State Detectors" to detect a Web Port for Startup Poller and Process Terminated for Shutdown Poller.
Changed the Server Ports to match our new configuration
Excerpt from JBoss Community Archive
The tooling was unable to verify your server started. Our tooling has several methods to see if your server is up or not. The two most-often used methods are either "Web Port Poller" or "Management Poller".
You can see which your server is using by opening the server object (In Servers view, double-click your server) and on the right side you'll see a section on polling.
If your server adapter (fancy word for the tooling's representation of your server) is using the Management Port Poller, you should make sure your server is actually exposing the management port. For local servers this shouldn't be an issue, since local servers should automatically expose the management port. You may want to verify in the Ports section (also in the server editor) that the management port is correct. To check if the server is up, we run a management command against the server. If the server responds properly, we declare the server to be started.
If you're using the web port poller, then you may want to verify your web port is correct. To verify the server is up, the Web Port Poller opens a URL connection on {serverHost}:{webPort} and sees if we get a valid connection.

how to run multiple web servers on Tomcat in Eclipse(ubuntu)?

It is showing port number clash. See the error below :
Several ports (8080, 8080) required by Tomcat v6.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
How to change the port number of one of those?

Angular app not working in IE 9 on remote server

I have a simple angular application that works just fine when deployed on my local JBoss instance, but when I deploy the same war file in our sandboxed environment (also JBoss) the application doesn't load. Just shows up as a blank page. When viewed on Chrome or FF it works fine as well.
Not a lot to go on, but any pointers in the right direction would be very helpful.
Edit: Just another piece of info, it doesn't work locally on IE either when the address contains the computer name and not localhost. So http://localhost:8080/angularapp works but http://[machinename]:8080/angularapp does not.
In the post you don't make completely clear in what environments you've the problem (it's clear it doesn't work using IE, but does it work in all cases with Chrome and FF?).
But the problem you're experiencing when trying to access using the machine name (http://machinename:8080/...), may be caused because you've not defined properly the IP bindings in the JBoss startup: by default JBoss binds only to localhost (127.0.0.1), if you want JBoss to be accessed from any other network interface, you've to define it. That can be done using the -b parameter of the startup script (run.sh for Jboss 3.x/4.x/5.x/6.x or standalone.sh if it's JBoss 7). For example:
./run.sh -b xxx.xxx.xxx.xxx (where xxx.xxx.xxx.xxx is your server IP) will make the JBoss accessible only from that IP (and its corresponding machine name, provided is correctly defined in the DNS or /etc/hosts ...), but not from localhost.
./run.sh -b 0.0.0.0 will make the JBoss accessible from all the networks interfaces of your server.

tomcat and eclipse: starting server

in my system i am using eclipse and tomcat server. I hav 3 different versions of tomcat servers.
But i am trying to run only one server at a time. But by default Already one server is running on port number 8080. When i am trying to start the tomcat server in 8081 port, the tomcat server is not getting start.
I have configured my tomcat home, and server.xml in eclipse properly. But I don't know what I am missing. please guide me.
It sounds like you don't have your port numbers defined and each tomcat instance is fighting to grab the port range first before the others.
Check your config file to make sure the port numbers are specified for each instance.
see how to change port in y=tomcat , may be you forgot to change some where
http://www.mkyong.com/tomcat/how-to-change-tomcat-default-port/
you can stop another tomcat service before you start your tomcat gets started , end process tomcatX(X is version) from task-manager

Run jsp in eclipse on specific port and ssl

I have used Eclipse 3.4 to create a Dynamic Web Project. I have also configured my server to use port 8443 with ssl. If I start my server I can access my test.jsp by going to it's address
https://localhost:8443/TestContext/test.jsp
In eclipse, I have installed this server and added my project to the server. If I Run test.jsp it always launches as
http://localhost:8080/TestContext/test.jsp
My question is: How can I set up eclipse to run this on https://localhost:8443/ rather than the default 8080? Thanks in advance.
You should have a project called "Servers". There your tomcat should have its folder - for example "Tomcat 6.0.20 at localhost-config". There is server.xml there, in which you can enable SSL.
When you enable the SSL, the server accepts requests on port 8443 as well as on 8080. The server is not run on a port - it accepts connections on multiple ports. So just type https://localhost:8443/