eclipse port occupying error on startup - java

I am getting this error while starting eclipse. I am using eclipse on windows 7
"There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Command start-domain failed."
I have searched and found that if i put mny hostname against 127.0.0.1 then this problem can be resolve but my problem is that i can't place my hostname in my host file due to our organization internal network security and i can't even edit this file.So i want that this glassfish server stops allocating 4848 port and starts working on another port.
Please help as i got stuck in this issue.
Thanks

The Eclipse plugin contributes its own Glassfish instance that runs only as long as Eclipse runs. Uninstalling your standalone copy is probably a good solution for you. If not, reconfigure the standalone copy to use a different admin port.
A simple Google search will cover that for you. Here's what I have found as the top hit.

Related

Glassfish server domain stops running for no obvious reason

I have a glassfish 4 server installed on a Linux server. Apart from the Glassfish server default domain1, I created another domain - domain4.
Domain1 and domain4 have .WAR files of same application deployed on each of them.
But the domain4 keeps stopping for no obvious reason. I have to manually restart it with the 'sh asadmin start-domain domain4' command . This happens several times a day and it's tiring and frustrating to users. The domain1 doesn't have that issue.
I searched for solutions on google and StackOverflow.Most answers pointed to memory issues.
I increased the swappiness of the Linux so it can use more of the virtual memory if it needs more memory. However this did not work .
I asked the web host to increase the RAM from 2GB to 4 GB. This still did not solve the issue.
I undeployed the app from domain4, but the domain still goes down after a while.
I created another domain - domain5 without deploying any app on it. Yet, domain5 still goes down. Which means the problem is not from the app. But domain1 keeps running without issues.
*I even stopped domain1, to see if it was the cause and allowed domain5 to run . But after a while, domain5 still went down.
While monitoring the Linux server memory usage, I noticed the system doesn't even use up to 60% of RAM. The Glassfish server log and glassfish log didn't show any errors that point to any cause.
Does anyone have an idea of what could be the cause of this? Thank you
I created a service for the glassfish domain using the command:
asadamin>create-service domainName
it's been stable now for weeks.

error while running javain project in ububtu

i have this error when I run my project in ubuntu (sts,mysql) "Several ports (8005, 8080) required by Tomcat v8.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)."
You have to release ports (stop process running on particular port) on which you want to run your app.
This topic may be helpful:
https://askubuntu.com/questions/538208/how-to-check-opened-closed-port-on-my-computer
The error message says clearly enough. Port 8005 or 8080 is in use by other process. You need to find which process is using it.
By checking this, please refer, you can find a tool that suitable for you.

How to see tomcat console when tomcat started from services

This might be silly question but I really don't know it.
I have performed some changes in my web application in java/jsp.
Tested it in localhost in eclipse where I can see logs in console.
After that I have deployed the changes to beta server and its not
reflecting as in localhost hence want to see running logs through
tomcat console but Tomcat is already running and was started with
services utility of windows.
Is there any way to open console of running tomcat.
I do know that we can see tomcat logs as well, but running console
will be preferred for me as there are multiple projects are running on
same server.
You can check log file(s) in the tomcat-home/logs folder.
You can attach Eclipse to a running process if you have started the server with the right settings: see Attach debugger to application using Eclipse On windows, you can either delete and reinstall the services as in https://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html or, you can add these parameters in the Windows registry for the Tomcat you are running: see http://www.tomcatexpert.com/knowledge-base/allocating-more-ram-tomcat-windows . I would be very careful with the registry hack unless you've hacked the registry before and are comfortable doing it.

Instance is not GlassFish Server 3+ or it is not running, Deployment error: GlassFish Server 3+ Server cannot start. Port is occupied

I keep getting these errors
Using netbeans 7.2.1, glassfish 3.1
I looked at numerous posts for this problem, but nothing seems to work
Shanged port in \glassfish\domains\domain1\config to 9999,
after that first project deployment and running was fine, but after that the same project and others gave again these errors at deployment.
running netstat -aon | find ":80" | find "LISTENING" in cmd gives no results or sometimes java.exe process pid
what else can I do to fix it?
Thanks
If you need to start a new instance of Glassfish 3 server, you must stop the old one to free up the port. Only one instance may run at a time.

problem with tomcat 6

I just started the tomcat and opened my browser and gave http://localhost:8080. But i found 404 error.
I tried running the same in eclipse i got the following error message.
Several ports (8005, 8080, 8009)
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).
What could be the problem?
I just started the tomcat and opened my browser and gave http://localhost:8080. But i found 404 error.
Tomcat runs fine, but there was nothing to serve on the given URL. There's no ROOT webapp anywhere or there's no welcome file. You need to either deploy a webapp or let the URL point to a valid resource.
I tried running the same in eclipse i got the following error message.
Several ports (8005, 8080, 8009) 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).
A port can be used only once by only one application at time. This indicates that you haven't shutdown the first instance of Tomcat before you run the one in Eclipse which is apparently been configured to listen on same ports.
If you are using windows, probably tomcat is running as a service.
Control Panel -> Administrative Tools -> Services -> Find Apache Tomcat 6
Right Click and choose properties
Startup Type : change it to manual, and hit the stop button.
click, ok and close all windows.
You can now run tomcat from eclipse IDE without changing the ports.
Just go and kill the javaw process.

Categories

Resources