0

I just started with Amazon AWS. I am created a EC2 instance and then I am installed a Glassfish 4 server. The EC2 instance is always running, but glassfish domain is stopped after few minutes. The steps I follow are: 1- Connect to EC2 instance with PuTTY. 2- Command: "./glassfish4/glassfish/bin/asadmin" 3- Command: "start-domain"

When domain is started I can use the glassfish console and launch my web applications correctly. The problem is that after a time period, maybe one or two minutes, I try to go to my web applications and are not running, and the glassfish console is not running, and, in PuTTY, I type "restart-domain" and PuTTY say me that the domain is stopped:

asadmin> restart-domain
Server is not running, will attempt to start it...
Waiting for domain1 to start                 
Successfully started the domain : domain1
domain  Location: /home/ec2-user/glassfish4/glassfish/domains/domain1
Log File: /home/ec2-user/glassfish4/glassfish/domains/domain1/logs/server.log
Admin Port: 4848
Command restart-domain executed successfully.
asadmin>

¿Why? ¿Maybe a configuration problem? ¿A kind of "timeout" that i don't know?

Thank you for help me and sorry for my english. :P

  • +info: I have installed Jdk 1.7 and the AWS instance image is "Amazon Linux AMI x86_64 PV" (amzn-ami-pv-2013.09.1.x86_64-ebs (ami-be1c848e)). – user2838957 Dec 08 '13 at 13:15
  • Ok, i think the problem is solved. I just test doing the same steps but, just when app is launched and working fine, I make logout of glassfish console and then type "exit" two time in SSH clien to exit from asadmin and then exit from SSH session. Doing it, after 1 hour the app still working fine, so, I suposse the problen is solved... – user2838957 Dec 08 '13 at 15:39
  • Hello again. I'm Sorry but today, i try again and the glassfish domain wasn't running. Why the domain shutdown automatically? Maybe is cause of inactivity period? ... I don't understand it... i am going crazy with this, and in Google is imposible find a solution... :( – user2838957 Dec 09 '13 at 18:07
  • Hello again. I was using the Public DNS of my instance in AWS, instead use the Elastic IP service, associating a Elastic IP to my instance running, so, the public DNS changed every 24h period, but the EIP never change... If I don't write in this post again, it will mean that it was the solution. – user2838957 Dec 10 '13 at 14:17
  • Hello again... again... :) The glassfish server work now perfectly. I want add other action that i should have do to avoid the unexpectly domain shutdown. This had being for me the other reason for this problem, and maybe is frecuent using free AWS, with few resources. The solution is increase the swap memory. In this topic is explained how do it: http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance – user2838957 Jan 11 '14 at 09:54

0 Answers0