How to kill all glassfish instances - java

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.

Related

Can't start tomcatv9.0 in Eclipse

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

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

can't run wildfly 9.0.2 from netbeans 8.1 under Windows 8.1

I can't start my Wildfly server in Netbeans.
I am running Windows 8.1, WildFly 9.0.2 Final, Netbeans 8.1.
I get the error:
WildFly Application Server start failed. Check whether the standalone.bat script is executable.
The server does not start.
Note: I can start WildFly from a command shell using standalone.bat script and I can deploy my application from the admin console using a web browser.
My windows 8 account has administration rights and I have also tried running the server in Netbeans when I am logged in as Administrator. The error message is always the same.
I would be very grateful for any help you can give!

How to add glassfish server on a remote windows server to netbeans

I have been trying to add my glassfish server installation on a windows server that is on my network to netbeans on my laptop but no luck.
The Glassfish server is already installed on the server and it works properly. but I cant seems to add it to my netbeans on my laptop to get it to work.
Netbeans detects that it is a valid installation but I cant start the glassfish server from netbeans.
Any help will be appreciated.
Thanks!
I had to enable remote login from external servers by using the command asadmin enable-secure-admin

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.

Categories

Resources