Glassfish server domain stops running for no obvious reason - java

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.

Related

glassfish is not accessible, even though domain started

I have had glassfish installed and running on my server for a few weeks now everything was working fine but today its behaving very weirdly,
I first tried to access the admin page but it wouldnt load, so i tried to stop the domain, when I ran asadmin stop-domain domain1, the command just sat there doing nothing, tried starting the domain again, it said the domain is already running.
so I restarted the server. Still had the same issue, then went to taskmanager and stopped the glassfish server from there, started the domain again from asadmin.
now on localhost:4848 it shows the page for glassfish server is loading but nothing happens beyond that, once it showed me the login page but after I entered the credentials it didn't go any further just kept loading, non of the applications on the server are also accessible.
I checked the logs and there is nothing abnormal there just shows the regular server loading logs. My firewall is also disabled.
At this point I am completely stumped about what else I could try.
one of the application page finally loaded after a long time it is showing gc overhead limit reached, so apparently i have a memory leak somewhere
Please check that your DNS is working properly. Check host localhost, host servername.example.com and whatever the IP address that is returned for that with host <ipaddr> to make sure you are getting proper DNS resolution for all three items.

Tomcat7 detect Memory Leak

I have made a simple application using vaadin 6 witch contains a callendar and people can make some appointments in there.
The problem is, when more then like 10 people connects, the memory usage is 95%.(I have 125mb on server, running Ubuntu Server 32 bit).
Here are the screenshots:
If I enter tomcat and test if fomr memory leaks i get:
The following web applications were stopped (reloaded, undeployed), but their
classes from previous runs are still loaded in memory, thus causing a memory
leak (use a profiler to confirm):
/myapp
/myapp
/myapp
/myapp
/myapp
When I installed tomcat I just made a clean install, and changed the ports so i can connect to it on port 80, also I have added some users so I can connect to web manager. THat is all
Can there be something in my code or I did not set up tomcat correctly that causes this memory leak?
Your getting this because static variables. When you are restart your server or application the static variables will not unload some time. This link will help you to understand about this:http://frankkieviet.blogspot.ca/2006/10/classloader-leaks-dreaded-permgen-space.html

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.

Using VisualVM on JBoss application server

I am trying to debug some memory leaks in my applications on JBoss 7. So I downloaded VisualVM, connected to running JBoss instance on localhost (which already took 5 minutes which si strange). BUT, I don't have the Perform GC option in Monitor section (button is disabled) and the Thread tab is missing completely. It is also the same for other Java applications like NetBeans, only with exception of the VisualVM itself.
I also tried jVisual and it can't event connect to my JBoss server. I've read that this can be caused by some user accounts issues (you can't run VisualVM as root) but I am running all these aplications under my personal account.
Problem has been solved, you need to put visualvm.sh into JBOSS_HOME/bin and run VisualVM from there. Here you can find how to get this file. Then you need to connect through JMX with query like service:jmx:remoting-jmx://{host_name}:{port} (so in my case localhost:9999). That worked for me.

eclipse port occupying error on startup

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.

Categories

Resources