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

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?

Related

Xdebug cannot connect to remote DBGp Proxy

I am running Xdebug extension on PHP webserver (IIS), and VSCode on different development machine.
When I start listening for Xdebug session in VSCode (with Felix Becker's PHP Debug) without proxy, everything works as expected.
Now I am trying to use dbgpProxy because there are multiple devs on the development machine.
I have tried to run dbgpProxy on the webserver and register to it by activating proxy settings in VSCode, but it fails with Connection refused. At the same time, Xdebug connects to the proxy just fine and proxy tries to forward incoming session based on IDE key but of course cannot find it because the registration failed.
So I tried running dbgpProxy on the development machine. This time VSCode registered successfully with the proxy, but when Xdebug tried to connect to the listening proxy, it failed.
I was pretty sure I knew what I was doing, ports were open, everything SHOULD work but it didn't.
It turned out to be a problem in the IP addresses.
I ran the proxy with default settings, which is localhost (127.0.0.1) for both server and client part with respective ports 9000 and 9001. Which was wrong (for my situation).
To listen to the incoming connections from another machine, proxy has to be configured with real IP address of the machine it is running on, otherwise it won't listen.
In my case I have decided to run the proxy on the server, so I run it with just one parameter for the incoming client connections and leave the server parameter default (which is 127.0.0.1:9000 and of course configure XDebug in php.ini to this address and port).
dbgpProxy.exe -i 10.123.54.76:9001

Websphere Server Error Launching Server Failed

Error received while starting the server
Reason:
Launching the server failed:
Location service deamon port 9000 is in use
Change each used port number to another unused port on the Ports page of
the server configuration editor.
I already tried to restart the computer and the result still the same.
What else i try to resolve this issue??
You have 2 options:
Stop the service/process which is using 9000 port or change its value
Change that 9000 port in WebSphere configuration. Since you cannot start your server you have to do it manually, editing xml config files:
I'm assuming you have standalone single server, in case deployment mananger and multiple servers you need to find the correct one.
Go to the PROFILE_ROOT\config\cells\YOUR_CELL_NAME\nodes\YOUR_NODE_NAME\serverindex.xml and look for 9000 it should be ORB_LISTENER_ADDRESS. Change that port to free one. You can check ports that are already taken in system using for example netstat -an

Can connect to my tomcat home page but not to my GWT server homepage

I have what I think is a security setting problem. I have an instance of tomcat running on my Win7 pc listening on 8080 and I can connect fine to it from another pc.
I then have a GWT app running listening on port 8888 but I can't connect to it. Is there a setting on Win7 that I must white list what ports I want to allow remote connections to come in on. I turned my firewall off momentarily but this made no difference.
When Dev Mode starts, by default it does not allow access to your server from a remote IP. To active this, you must specify which address the server should bind to. From https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#What_options_can_be_passed_to_development_mode this is usually done by adding the following to your arguments, sometime before the modules
-bindAddress 0.0.0.0
This will bind the server to all IP addresses available to the JVM.

Eclipse TCP/IP Monitor has two ports

I was trying to monitor request using TCP/IP Monitor.
But, I see there are two ports which are in use. One is the application port[8080] and other monitoring port[9833].
Can anybody tell , why there are two different ports?
When I launch the application it launches at 9833 instead of 8080. Why this change?
Eclipse monitoring is done by capturing all the requests sent to an application (a host and a port), dumping it on the Monitor console for you, then forwarding the original request to the application.
The monitored application itself will return its responses to eclipse (where it is the client from its prospective) where eclipse dumps it on the monitoring console too.
Now, how does eclipse captures the requests sent to the monitored application at the first place? it simply runs a service that accepts these requests (on behalf of the application) and forward it, this service also returns the application responses to the original requester.
Based on the above, in eclipse TCP/IP Monitor screen, the Local monitoring port is the port of the eclipse service (which you can use any available port number for), and the other Port is the monitored application port number.
So, in your case, the application you are monitoring is running on port 8080 and eclipse service is using the port 9833 (which is just a random port that you can change).
Your application port have not been changed, it still runs on 8080 and you can try that, but no data will be captured by eclipse TCP/IP monitor unless you use the port 9833.

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

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