Can't start tomcatv9.0 in Eclipse - java

Server OverviewI am getting an error while trying to start tomcat from eclipse. The error message shows.
The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
what I have done is installed tomcat v9.0 and eclipse oxygen and connected tomcat with eclipse.
Windows 7 - 32 bit
Eclipse Oxygen
Tomcat v9.0
Please help me!
The error message is...
error message
I followed an udemy course "Spring & Hibernate for Beginners"

The admin port is set to '-' which is not correct. Set it e.g. to 8005 or some other free port.

Helo, probably you not configured TomCat admin port yet. It's easy:
In Eclipse TomCat overview configuration, just assign a number to a TomCat admin port. The number can be 8085.
After that, if you get the error "Port 8080 required by Tomcat v9.0 Server at localhost is already in use" signify that you has two Tomcat instances and both your installed and launched instance can not both listen on the same port at the same time. You'll have to change one of them or in windows you can stop the Tomcat running service in command line:
net stop Tomcat9

Related

Java remote debugging (JPDA) not working for me in Tomcat 9

I'm trying to remotely debug a Tomcat webapp on a recently upgraded Tomcat 9.0.13 and Open JDK 11.0.1. Server is Redhat Enterprise Linux 7.6 and I'm using Eclipse on a Windows 7 developer box to connect.
Tomcat starts, and the app is accessible on port 8080 but fails on certain requests. So on my Eclipse, I've configured a Remote Java application with my configuration details. When I try to connect to it, the connecting fails with
Failed to connect to remote VM. Connection refused.
I'm using the default port, 8000 and on the Linux server, netstat -an shows that there is a process listening on that port when Tomcat starts and not when Tomcat stops.
I've tried telnet from the Windows box to port 8000 and get
$ telnet c516vefpubrec 8000
Trying XX.XXX.XX.XX...
telnet: Unable to connect to remote host: Connection refused
When I do the same running our old Tomcat 7 + Java 1.8 everything is successful. I've tried other ports with the same result.
Could this be a bug? Is there a configuration item to enable JPDA on Tomcat 9?
I had this exact same issue. I'm running an application from a centos vm and trying to debug from my windows machine.
I had to go into the catalina.sh file on the vm and make an edit.
In the section that says that handles the jpda flag, the JPA_OPTS variable needed to be changed to JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=*:$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
Note the *: before the JPDA variable. This allows any ip address to have access to remote debugging. I believe by default it only allows local host.
Hope this helps.
I had similar issue running Tomcat 9 in docker.
I specified the JPDA_ADDRESS in the docker build to allow access from any host:
ENV JPDA_ADDRESS=8000
CMD ["catalina.sh", "jpda", "run"]
In case you are on Windows and using Tomcat as Service 64-bit. Then it would be needed to change in the Windows registry.
This registry path:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\<Tomcat9ServiceName>\Parameters\Java
With 32-bit Windows this path will be without WOW6432Node.
There is a string value Options and remote debug can be enabled by adding these 2 lines there
-Xdebug
-Xrunjdwp:transport=dt_socket,address=*:4446,server=y,suspend=n
if you do not put *: to address parameter, then remote debug will be possible only from localhost. *: means you can connect from anywhere/any host to the tomcat for debugging.
Tomcat9ServiceName - is the name of the Tomcat Service which shown in the screenshot below and usually you type it during the installation

Tomcat server port in use

I have updated my Eclipse Oxygen version from 4.7.0 to 4.7.2. After that my Apace tomcat server 8 is not starting up stating the port is already in use.
I have tried changing the port numbers, killing the java task in task manager, shutdown .bat in bin folder. the error remains the same
change the port by double click on the server in server console -> Port Number -> change the port number for an other one.

How to kill all glassfish instances

Can anyone tell me how to kill a Glassfish instance using the port 4848 and 8080.
I installed Glassfish, and found that the Glassfish installation isn't working properly, so deleted all the Glassfish files from my ubuntu machine with stopping the Glassfish server (./asadmin stop-domain).
Now I downloaded other Glassfish version (nightly build 5.0, because JDBC MySQL doesn't work) and tried to start the server (./asadmin start-domain). I get the following error.
There is a process already using the admin port 4848 -- it probably is
another instance of a GlassFish server.
Can anyone tell me how to kill a Glassfish instance using the port
4848 and 8080.
There is probably running only one instance of Glassfish on this ports, but you can kill it like this:
pkill -f glassfish
If you don't have a root shell you might have to use sudo in front of the cmd.

Wildfly 8.1.0 Final and Netbeans 8.0: WildFly Application Server Start Failed. HTTP Connector port 8080 is already in use

U have updated Wildfly from 8.0.0 FINAL to 8.1.0 FINAL. When I am trying to run the application in Netbeans 8.0, it fails starting and the following message is shown:
WildFly Application Server Start Failed. HTTP Connector port 8080 is already in use.
When I am trying to manage the server from Netbeans menu, stop is disabled and killing hangs. I can kill the server from the system, but nothing changes. Still I cannot deploy/run the application from the environment anyhow.
It seems Netbeans starts the server twice.
All right, I just found the problem. The previous problem happened when I have used "Update Existing 8.0.0.Final Install" from Wildfly downloads over the existing 8.0.0 installation.
When I desperately installed a fresh 8.1.0 installation, everything seems to work. So the problem is probably in the update package.

Server Oracle WebLogic Server 11gR1 PatchSet 1 at localhost failed to start

I am using portal1032_win32.exe file to install the weblogic server in my local. After following basic installation by providing password and choosing the folder names and selected jdk which comes through installation. Also created domain by providing the defalut configurationd and chooses adminserver alone.
I have opened the eclipse IDE comes through this and started. Added the server by choosing base_domain. I have started the server. here is my problem It is taking more time and finally displaying following message "Server Oracle WebLogic Server 11gR1 PatchSet 1 at localhost failed to start."
The workaround is simple:
add
-Dsun.lang.ClassLoader.allowArraySyntax=true
after -vmargs string in eclipse.ini

Categories

Resources