<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Getting Started with Grails</title>
	<atom:link href="http://fletchermcbeth.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://fletchermcbeth.wordpress.com</link>
	<description>Fletcher Mcbeth</description>
	<lastBuildDate>Mon, 15 Mar 2010 17:21:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='fletchermcbeth.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/18441ebea6072e3f38d030b9af8dc5c5?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Getting Started with Grails</title>
		<link>http://fletchermcbeth.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://fletchermcbeth.wordpress.com/osd.xml" title="Getting Started with Grails" />
	<atom:link rel='hub' href='http://fletchermcbeth.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Deploying Grails On GlassFish v3</title>
		<link>http://fletchermcbeth.wordpress.com/2010/03/11/deploying-grails-on-glassfish-v3/</link>
		<comments>http://fletchermcbeth.wordpress.com/2010/03/11/deploying-grails-on-glassfish-v3/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 17:30:53 +0000</pubDate>
		<dc:creator>Fletcher McBeth</dc:creator>
				<category><![CDATA[JRuby-on-Rails]]></category>

		<guid isPermaLink="false">http://fletchermcbeth.wordpress.com/?p=1632</guid>
		<description><![CDATA[March 11, 2010 This article walks through the steps of moving into a clean install of a 64 bit CentOS release 5.4 (Which is theoretically equivalent to Red Hat Enterprise Linux (RHEL)).  The final objective is to run a successfully deployed grails application on the web. This is the 11th article in the Getting Started [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fletchermcbeth.wordpress.com&amp;blog=6291628&amp;post=1632&amp;subd=fletchermcbeth&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>March 11, 2010</p>
<div>
<p>This article walks through the steps of moving into a clean install of a 64 bit CentOS release 5.4 (Which is theoretically equivalent to Red Hat Enterprise Linux (RHEL)).  The final objective is to run a successfully deployed grails application on the web.</p>
<p>This is the 11th article in the Getting Started with Grails tutorial series.  The entire series is as follows:</p>
</div>
<div>
<ol>
<li><a href="http://fletchermcbeth.wordpress.com/2009/01/29/introduction/" target="_self">Introduction</a></li>
<li><a href="http://fletchermcbeth.wordpress.com/2009/01/29/getting-started-with-jruby2/" target="_self">Getting started with JRuby</a></li>
<li><a href="http://fletchermcbeth.wordpress.com/2009/01/29/getting-started-with-glassfish2/" target="_self">Getting started with GlassFish</a></li>
<li><a href="http://fletchermcbeth.wordpress.com/2009/01/29/restarting-glassfish2/" target="_self">Restarting GlassFish</a></li>
<li><a href="http://fletchermcbeth.wordpress.com/2009/02/05/getting-started-with-load-balancing-apache/" target="_self">Getting started with load balancing (Apache)</a></li>
<li><a href="http://fletchermcbeth.wordpress.com/2009/02/19/load-balancing-with-web-server-redundancy-apache/" target="_self">Load balancing with web server redundancy (Apache)</a></li>
<li><a href="../2009/04/10/load-balancing-with-web-server-failover-apache/" target="_self">Load balancing with web server failover (Apache)</a></li>
<li><a href="../2009/05/29/getting-started-with-message-oriented-web-services-java-ee-5/" target="_self">Getting Started with Message Oriented Web Services (Java EE)</a></li>
<li><a href="../2009/05/31/setting-up-a-local-network-using-firewire/" target="_self">Setting up a local network using FireWire</a></li>
<li><a href="../2009/06/16/sending-email-from-grails/" target="_self">Sending Email from Grails</a></li>
<li>Deploying Grails on GlassFish v3</li>
</ol>
</div>
<p>For starters, I&#8217;m running on a MacBook Pro using Mac OS X Version 10.5.8 (Leopard) and using the bash terminal shell.</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><br />
<img class="aligncenter size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a></p>
<h2>So let&#8217;s get going&#8230;</h2>
<p><strong><span style="text-decoration:underline;">Step 1 &#8211; Security</span></strong></p>
<p>The first step is to log into your server:</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">ssh -p &lt;port number&gt; &lt;username&gt;@&lt;ip address or domain name&gt;</span></pre>
<p>for example</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">ssh -p 1234 fred@123.45.67.89</span></pre>
<p>and of course, respond at the prompt with your username.</p>
<p>Being that the username that you&#8217;re using may be given to you by the sys admin person, you should change the password to something secure (use both letters and numbers which do not spell anything from ANY dictionary (even the cleaver use of numbers to represent letters, such as &#8217;3&#8242; for &#8216;e&#8217; is dangerous)).  Change the password via the command:</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">passwd</span></pre>
<p>&#8230; and follow the prompts for entering the new password (twice).</p>
<p>Don&#8217;t forget to also change the root password.  First login as root with:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">su</span></p>
<p>&#8230; and login using the ORIGINAL (sys admin supplied) password to become root.</p>
<p>Now change the password here just like we did before with:</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">passwd</span></pre>
<p>&#8230; and follow the prompts for entering the new password (twice).</p>
<p>OK just to be sure, logout from root via:</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">exit</span></pre>
<p>and then logout from your username account via:</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">exit</span></pre>
<p>and now log back in as before:</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">ssh -p 1234 fred@123.45.67.89</span></pre>
<div><span style="font-size:small;">but, of course, use your new passwordand then try to become root via</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">su</span></p>
<p>&#8230; using the new password.</p>
<p>From here out, all communications with the remote server shall be through ssh&#8230;</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><img class="aligncenter size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a></p>
<p><strong><span style="text-decoration:underline;">Step 2 &#8211; Install The Java SDK</span></strong></p>
<p>Due to licensing conflicts between the Linux and Java licenses, Java nor the SDK are installed within the linux releases (yet(?)).  As such, we need to do a Java install&#8230;</p>
<p>We first have to web surf over to:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">http://java.sun.com/javase/downloads/index.jsp</span></p>
<p>And download the file:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">jdk-6u18-linux-x64.bin</span></p>
<p>to your desktop system.  Note:  you want to download the JDK (not the JRE).</p>
<p>We now need to Secure FTP this file into our server.</p>
<p>It&#8217;s easiest to cd into the local directory that contains the file to upload.  Then open up an SFTP connection via&#8230;</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">sftp -oPort=&lt;ssh port number&gt; &lt;username&gt;@&lt;IP address or domain name&gt;</span></p>
<p>For example:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">sftp -oPort=1234 fred@123.45.67.89</span></p>
<p>Then:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">put &lt;localFileName&gt;</span></p>
<p>will cause the file identified by &lt;localFileName&gt; to your home directory on the remote server.</p>
<p>Just for reference, using the <span style="color:#0000ff;">help</span> command from within sftp will produce a nice list of the available commands.</p>
<p>and then terminate the sftp session with the command:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">exit</span></p>
<p>Now the java JRE&#8217;s bin file needs to be placed into a more appropriate directory.  Thus ssh back into the server via:</p>
<pre style="padding-left:30px;"><span style="color:#0000ff;">ssh -p &lt;port number&gt; &lt;username&gt;@&lt;ip address or domain name&gt;</span></pre>
<p>Then:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">su</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">cd /opt</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">mkdir Java</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">cd Java</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">mv /home/&lt;username&gt;/&lt;nameOfJREBinFile&gt; .</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">chown root.root</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">sh &lt;nameOfJDKBinFile&gt;</span></p>
<p>The End User Licensing Agreement (EULA) will be displayed to you a page at a time.  Hitting the space-bar will proceed you to the next page.  When you get to the accept question, you&#8217;ll probably want to answer <span style="color:#0000ff;">yes</span> followed by a carriage return.  The bin file will then be unpacked into a JDK directory in the file&#8217;s current directory.</p>
<p>Now that the java files are in place, there&#8217;s some cleanup to do.  First create a symbolic link to help out with future updates of the JVM.  For example:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">rm jre-6u18-linux-x64.bin</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">ln -s jdk1.6.0_18/ current</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">ls -la</span></p>
<p>Secondly, cd to your personal (non-root) home directory and edit the .bashrc file:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">exit</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">cd</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">ls -la</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">cp .bashrc .bashrc_original</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">vi .bashrc</span></p>
<p>and append the following line to the file:</p>
<div id="_mcePaste" style="padding-left:30px;"><span style="color:#0000ff;">export PATH=/opt/java/current/bin:$PATH</span></div>
<p></span></div>
<p>and then save and quit the vi editor.</p>
<p>Finally activate the .bashrc script with:</p>
<div style="padding-left:30px;"><span style="font-size:small;"><span style="color:#0000ff;">source .bashrc</span></span></div>
<div style="padding-left:30px;"><span style="font-size:small;"><span style="color:#0000ff;"><br />
</span></span></div>
<div><span style="font-size:small;">and test that your JVM is configured properly:</span></div>
<p style="padding-left:30px;"><span style="font-size:small;"><span style="color:#0000ff;">java -version</span></span></p>
<p>and you should see something like:</p>
<p><span style="font-size:small;"> </span></p>
<div style="padding-left:30px;"><span style="color:#0000ff;">java version &#8220;1.6.0_18&#8243;</span></div>
<div style="padding-left:30px;"><span style="color:#0000ff;">Java(TM) SE Runtime Environment (build 1.6.0_18-b07)</span></div>
<div style="padding-left:30px;"><span style="color:#0000ff;">Java HotSpot(TM) 64-Bit Server VM (build 16.0-b13, mixed mode)</span></div>
<div style="padding-left:30px;"><span style="color:#0000ff;"><br />
</span></div>
<div>Ta Da!  You now have the JDK on your server.  :-)</div>
<div><a href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><img class="aligncenter size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a></div>
<div><strong><span style="text-decoration:underline;">Step 3 &#8211; Install GlassFish</span></strong></div>
<div><strong><span style="text-decoration:underline;"><br />
</span></strong></div>
<div>Although I&#8217;ve previously blogged about setting up GlassFish version 2.1 on a remote server (&#8220;<a title="Getting Started with GlassFish" href="http://fletchermcbeth.wordpress.com/2009/01/29/getting-started-with-glassfish2/" target="_blank">Getting Started with GlassFish</a>&#8220;), the installation of GlassFish version 3.0 onto a Linux server is different enough to merit a new howTo.</div>
<p>We start with the same URL from which we download GlassFish:</p>
<p style="padding-left:30px;"><a href="https://glassfish.dev.java.net/">https://glassfish.dev.java.net/</a></p>
<p>But this time download the GlassFish 3.0 ZIP file (the &#8220;full version&#8221; not the &#8220;web profile&#8221;).</p>
<p>and use the same methodology as described in Step 2 to upload the glassfishv3.zip file to the remote server directory:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">/opt/glassfish</span></p>
<p>but instead of using the sh command to unpack the .bin file as we did in Step 2, we need unzip the .zip file.  Luckily, the ability to unzip a file is present within Linux server images. As to be expected use the following command (as root):</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">unzip glassfishv3.zip</span></p>
<p>Now, this will create a glassfishv3 directory as well as a __MACOSX directory.  One of these directories will be used, and one will not.  Assuming that your system is a Linux system like mine, you&#8217;ll want to clean things up by removing the unnecessary __MACOSX directory with the (as root) command below (<span style="color:#ff0000;">BE CAREFUL with this command</span>, especially when in root mode (this cannot be over stressed)):</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">rm -rf __MACOSX</span></p>
<p>And for connivence, create a symbolic link:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">ln -s ./glassfishv3 current</span></p>
<p>And finally, to make life simpler for you, (not as root) append the following command to the end of your home directory&#8217;s .bashrc file:</p>
<p style="padding-left:30px;"><span style="font-size:small;"><span style="color:#0000ff;">export PATH=/opt/glassfish/current/bin:$PATH</span></span></p>
<p><span style="font-size:small;"><span style="color:#000000;">and once your .bashrc file is edited, save and quit then activate the .bashrc configurations via:</span></span></p>
<p><span style="font-size:small;"><span style="color:#000000;">source .bashrc</span></span></p>
<p><span style="font-size:small;"><span style="color:#000000;">And finally to test if your glassfish version 3 is configured properly, execute:</span></span></p>
<p style="padding-left:30px;"><span style="font-size:small;"><span style="color:#0000ff;">asadmin -?</span></span></p>
<p><span style="font-size:small;"><span style="color:#000000;">and you should see the man page for the glassfish&#8217;s asadmin.</span></span></p>
<p><span style="font-size:small;"><span style="color:#000000;">Excellent!  Your on your way to world domination.  ;-)</span></span></p>
<p><a style="text-decoration:none;" href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><img class="aligncenter size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a></p>
<p><span style="font-size:small;"><span style="color:#000000;"><span style="text-decoration:underline;"><strong>Step 4 &#8211; Setting up GlassFish Security</strong></span></span></span></p>
<p><span style="font-size:small;"><span style="color:#000000;"><span style="font-family:'Lucida Grande', Verdana, Arial, sans-serif;line-height:16px;color:#333333;font-size:12px;"> </span></span></span></p>
<p style="font-size:1.05em;">If you finished the previous step, your Unix based GlassFish server is ready to be turned on.  Note:  Firewall port 4848 should be <em>disabled</em> at this point (before we turn on GlassFish).  Behind the firewall, we&#8217;ll want to set up the GlassFish security features so that our system console will operate using a secure connection as opposed to using the default non-secure communication protocol &#8211; THEN we&#8217;ll turn on firewall port 4848.</p>
<p style="font-size:1.05em;">To verify that the extended paths that were established in Step 3 have taken effect, run the command:</p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">env</span></p>
<p style="font-size:1.05em;">and note that out of the listing produced there should be two lines that look somewhat like:</p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">PATH=&lt;a bunch of stuff&gt;:/opt/glassfish/current/bin:/opt/java/current/bin:&lt;a bunch of more stuff&gt;</span></p>
<p style="font-size:1.05em;">Now we can command-line invoke the GlassFish administrator from anywhere.  The following commands will turn the GlassFish server on:</p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">su</span></p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">asadmin start-domain</span></p>
<p style="font-size:1.05em;padding-left:60px;"><span style="color:#000000;"><strong>Note</strong>:  if you are not root and attempt to execute the (seemingly equivalent) command:</span></p>
<p style="font-size:1.05em;padding-left:90px;"><span style="color:#0000ff;">sudo asadmin start-domain</span></p>
<p style="font-size:1.05em;padding-left:60px;">you will get the following  error message:</p>
<p style="font-size:1.05em;padding-left:90px;"><span style="color:#0000ff;">/opt/glassfish/current/bin/asadmin: line 17: exec: java: not found</span></p>
<p style="font-size:1.05em;padding-left:60px;"><span style="color:#000000;"> </span></p>
<p style="padding-left:60px;">That said, <span style="color:#ff0000;">make sure that you only operate the asadmin command as root (whoami returns &#8220;root&#8221;)</span>.</p>
<p style="padding-left:60px;"><strong>End of Note.</strong></p>
<p><span style="font-size:14px;">As GlassFish starts up (about 20 to 30 seconds), there will be a couple lines of status messages as follows:</span></p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;"> </span></p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">Waiting for DAS to start &#8230;.</span></p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">Started domain: domain1</span></p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">Domain location: /opt/glassfish/glassfishv3/glassfish/domains/domain1</span></p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">Log file: /opt/glassfish/glassfishv3/glassfish/domains/domain1/logs/server.log</span></p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">Admin port for the domain: 4848</span></p>
<p style="font-size:1.05em;padding-left:30px;"><span style="color:#0000ff;">Command start-domain executed successfully.</span></p>
<p>and then the command prompt will be given back to you.  Your GlassFish DAS (domain1 server) is now running on your CentOS server.</p>
<p>Ideally, GlassFish should be configured to operate within a cluster.  As of this writing though, GlassFish version 3 does not support clustering.  :-(   I hope that the new owners see the value of continuing to improve upon GlassFish, which IMNSHO is the best app server on the planet.  Yes Oracle, I hope you&#8217;re reading this. OK, end of my digression.</p>
<p>Using your favorite web browser, surf over to:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">http://localhost:4848</span></p>
<p>At which point you should (hopefully) be served up a page that looks something like:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-21.png"><img class="aligncenter size-full wp-image-1656" title="DeployingGrailsOnLinux1" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-21.png?w=450&#038;h=468" alt="" width="450" height="468" /></a></p>
<p>Using the hierarchy tree on the left, and as show in the image above, go to:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">Configuration &#8211;&gt; Network Config &#8211;&gt; Protocols &#8211;&gt; admin-listener</span></p>
<p>and then click on the:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-7.png"><img class="aligncenter size-full wp-image-1658" title="DeployingGrailsOnLinux2" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-7.png?w=450" alt=""   /></a>checkbox.  Then the<a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-8.png"><img class="alignnone size-full wp-image-1659" title="DeployingGrailsOnLinux3" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-8.png?w=450" alt=""   /></a>button.</p>
<p>If you were to proceed with operating your GlassFish server at this point, you&#8217;ll successfully operate the GlassFish v3 Administration Console via https <span style="color:#ff0000;">BUT YOUR ADMIN CONSOLE WOULD BE ACCESSIBLE WITHOUT A PASSWORD</span> (Doooough).</p>
<p>Surfing the hierarchy tree to:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">Enterprise Server &#8211;&gt; Administrator Password</span></p>
<p><span style="color:#000000;">as shown:</span></p>
<p><span style="color:#000000;"><a style="text-decoration:none;" href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-162.png"><img class="aligncenter size-full wp-image-1687" title="DeployingGrailsOnLinux4" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-162.png?w=450&#038;h=303" alt="" width="450" height="303" /></a></span></p>
<p><span style="color:#000000;">and fill in the new password (twice).  Then click the<a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-8.png"><img class="alignnone size-full wp-image-1659" title="DeployingGrailsOnLinux3" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-8.png?w=450" alt=""   /></a>button.</span></p>
<p>In order for the security features to take effect, we&#8217;ll need to reboot the GlassFish server.  This is done through going to the hierarchy selection:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">Enterprise Server &#8211;&gt; General</span></p>
<p>Which will display the image:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-13.png"><img class="aligncenter size-full wp-image-1675" title="DeployingGrailsOnLinux5" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-13.png?w=450&#038;h=299" alt="" width="450" height="299" /></a></p>
<p>and press the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-31.png"><img class="alignnone size-full wp-image-1676" title="DeployingGrailsOnLinux6" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-31.png?w=450" alt=""   /></a> button to restart the GlassFish server.</p>
<p>To validate that your server is operating securely, open a new browse window and try to go to the insecure address:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">http://localhost:4848</span></p>
<p>and, as expected, you&#8217;ll find that there is no response from the server.  When you go to the secure address:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">https://localhost:4848</span></p>
<p>you&#8217;ll be redirected and served a page that looks like:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-153.png"><img class="aligncenter size-full wp-image-1680" title="DeployingGrailsOnLinux7" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-153.png?w=450&#038;h=410" alt="" width="450" height="410" /></a>Go ahead and click the <span style="color:#0000ff;">here</span> link which will bring you to the page:</p>
<p><a style="text-decoration:none;" href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-20.png"><img class="aligncenter size-full wp-image-1688" title="DeployingOnLinux8" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-20.png?w=450&#038;h=312" alt="" width="450" height="312" /></a></p>
<p>Which, when the GlassFish rebooting is finished, will automatically bring you to the login page:</p>
<p><a style="text-decoration:none;" href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-19.png"><img class="aligncenter size-full wp-image-1689" title="DeployingGrailaOnLinux9" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-19.png?w=450" alt=""   /></a></p>
<p>Logging in with the username <span style="color:#0000ff;">admin</span> and the password that you just established should/will bring you to your admin home page:</p>
<p><a style="text-decoration:none;" href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-52.png"><img class="aligncenter size-full wp-image-1692" title="DeployingGrailsOnLinux10" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-52.png?w=450&#038;h=471" alt="" width="450" height="471" /></a></p>
<p>Way cool!  You&#8217;re now running your GlassFish server securely.   :-)</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><img class="aligncenter size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a><span style="text-decoration:underline;"><strong>Step 5 &#8211; Turning on your database</strong></span></p>
<p>Within the GlassFish environment, no database is turned on by default.  As such, you must physically turn on the database of your choice.  There are many databases to choose from.  The simplest (but least capable to handle large amounts of traffic gracefully) is the javadb database that is included within the GlassFish v3 install.  If you cd over to where the javadb resides using:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">cd /opt/glassfish/current</span></p>
<p>and then through executing the statement:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">ls -l</span></p>
<p>you&#8217;ll see something like:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">drwxr-xr-x  2 root root 4096 Mar 10 14:50 bin</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">drwxr-xr-x 10 root root 4096 Dec  2 22:24 glassfish</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">drwxr-xr-x  4 root root 4096 Dec  2 22:51 javadb</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">drwxr-xr-x  5 root root 4096 Dec  2 22:56 mq</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">drwxrwxr-x  4 root root 4096 Dec  2 22:29 pkg</span></p>
<div>Let&#8217;s, for simplicity sake, use the (default) built-in javadb for now.  To start the javadb, execute the commands:</div>
<p style="padding-left:30px;"><span style="color:#0000ff;">su</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">asadmin start-database &#8211;dbhome /opt/glassfish/current/javadb</span></p>
<div>As the database starts up, there will be a ton of informative messages spewed to your console &#8211; the most important of which is the last line which should read:</div>
<p>Command start-database executed successfully.</p>
<div>At this point, your database is operating.  Testing of your database will be done in the next step.</div>
<p><a href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><img class="aligncenter size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a><strong>Step 6 &#8211; Using the Hello World Application to test your GlassFish server and Database</strong></p>
<p>As the name of this step implies, we&#8217;ll use an off-the-shelf known and simple application to test your new GlassFish environment. &#8211; Namely the packaged application &#8220;helloworld.war&#8221;.  This can be downloaded through the following link:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;"><a href="https://glassfish.dev.java.net/downloads/quickstart/hello.war">https://glassfish.dev.java.net/downloads/quickstart/hello.war</a></span></p>
<p>This link will download the hello.war file into your local system.</p>
<p>To upload this Grails web-app to your server, log into your GlassFish v3 administration Console and go to:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">Applications</span></p>
<p>as shown:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-22.png"><img class="aligncenter size-full wp-image-1700" title="DeployingGrailsOnLinux12" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-22.png?w=450&#038;h=281" alt="" width="450" height="281" /></a>Clicking on the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-23.png"><img class="alignnone size-full wp-image-1701" title="DeployingGrailsOnLinux13" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-23.png?w=450" alt=""   /></a> button will bring you to:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-33.png"><img class="aligncenter size-full wp-image-1705" title="DeployingGrailsOnLinux14" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-33.png?w=450&#038;h=273" alt="" width="450" height="273" /></a></p>
<p>Clicking the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-25.png"><img class="alignnone size-full wp-image-1707" title="DeployingGrailsOnLinux15" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-25.png?w=450" alt=""   /></a> button will bring up a browser through which you can select the hello.war file that you just downloaded to your desktop system.  Once the war file has been selected, click the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-32.png"><img class="alignnone size-full wp-image-1708" title="DeployingGrailsOnLinux16" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-32.png?w=450" alt=""   /></a> button, the GlassFish v3 Application Console will become embellished to look like:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-34.png"><img class="aligncenter size-full wp-image-1709" title="DeployingGrailsOnLinux17" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-34.png?w=450&#038;h=427" alt="" width="450" height="427" /></a></p>
<p>Go ahead and accept the default settings and click the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-35.png"><img class="alignnone size-full wp-image-1710" title="DeployingGrailsOnLinux18" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-35.png?w=450" alt=""   /></a> button to upload the application to the server.  Once the war file has been deployed to the server you&#8217;ll see something like:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-36.png"><img class="aligncenter size-full wp-image-1711" title="DeployingGrailsOnLinux19" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-36.png?w=450&#038;h=279" alt="" width="450" height="279" /></a></p>
<p>The last step in birthing your helloworld application is to click on the helloworld&#8217;s <span style="color:#0000ff;">Lanuch</span> link under the Applications Action column to see:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-45.png"><img class="aligncenter size-full wp-image-1732" title="DeployingGrailsOnLinux20" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-45.png?w=450&#038;h=351" alt="" width="450" height="351" /></a>Enter your name in the textbox:<a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-46.png"><img class="aligncenter size-full wp-image-1733" title="DeployingGrailsOnLinux21" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-46.png?w=450&#038;h=351" alt="" width="450" height="351" /></a>and click the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-47.png"><img class="alignnone size-full wp-image-1734" title="DeployingGrailsOnLinux22" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-47.png?w=450" alt=""   /></a> button to see:</p>
<p><a style="text-decoration:none;" href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-481.png"><img class="aligncenter size-full wp-image-1736" title="DeployingGrailsOnLinux23" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-481.png?w=450&#038;h=284" alt="" width="450" height="284" /></a></p>
<p>Ta-daaaaa!  You&#8217;ve just successfully served up from your Linux server a grails-generated web page containing information formatted from the database.  Congratulations!</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><img class="alignnone size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a></p>
<p><strong>Step 6 &#8211; Packaging your Grails Application</strong></p>
<p>In the previous step, we deployed a preexisting known functional web-app.  Most likely though, you&#8217;ll now be wanting to deploy a web-app of your own creation.  NetBeans is the IDE that I&#8217;m currently using for designing my Grails applications.  As such, if you right-click on the application name from the NetBeans hierarchy tree (left side of window) you&#8217;ll see the following contextual menu:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-57.png"><img class="aligncenter size-full wp-image-1740" title="DeployingGrailsOnLinux24" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-57.png?w=450" alt=""   /></a>Just to be on the safe side, select the <span style="color:#0000ff;">Clean</span>-out-your-intermediate-files command as shown above to remove any possible intermediate files from the development environment.</p>
<p>Next we build the projects WAR file via highlighting the project name within the hierarchy tree window, and right click to bring up the following contextual menu:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-56.png"><img class="aligncenter size-full wp-image-1741" title="DeployingGrailsOnLinux25" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-56.png?w=450" alt=""   /></a></p>
<p>And select the <span style="color:#0000ff;">Build-</span>the-WAR-file command as shown above.</p>
<p>When the Build-the-WAR-file process is running, you&#8217;ll see a bunch of information scrolled to your Output console window concluding with a statement such as:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">Done creating WAR /Users/fletch/Projects/NetBeansProjects/myTest/myTest-0.1.war</span></p>
<p>This statement not only tells you that the building of the WAR file was successful, but where your newly created WAR file is located.  Using this newly created WAR file, redo Step 6 to deploy it into your GlassFish server.</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><img class="alignnone size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a></p>
<p><span style="text-decoration:underline;"><strong>Further Discussions 1 &#8211; Exceeding JVM Memory Capacity</strong></span></p>
<p>When deploying small files, the default configuration of GlassFish is sufficient.  However, the WAR file of my relatively large web-app was over 300MBytes which exceeded the default GlassFish environment&#8217;s JVM heap capacity.  The error messages that were produced were quite cryptic but at one error message snippet that I was able to get traction with was:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">java.lang.OutOfMemoryError: GC overhead limit exceeded</span></p>
<p>This became the clue as to how to overcome my size limitation.  It turns out that GlassFish v3 defaults to a Java Virtual Machine (JVM) heap size of 512 MBytes.  Although the default JVM heap size is larger than my WAR file, there must be other GlassFish processes that are taking up space within the Java environment.  The changing of the JVM heap size configuration to something larger can be done via the graphical GlassFish v3 Administration Console.  From within the GlassFish v2 Administration Console open up:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">Configuration &#8211;&gt; JVM Settings &#8211;&gt; JVM Options</span></p>
<p>As shown below:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-70.png"><img class="aligncenter size-full wp-image-1745" title="DeployingGrailsOnLinux26" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-70.png?w=450&#038;h=423" alt="" width="450" height="423" /></a></p>
<p>Modify the JVM heap size settings from 512 MBytes (-Xmx512m) to 2048 MBytes (-Xmx2048m) as shown below:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-71.png"><img class="aligncenter size-full wp-image-1746" title="DeployingGrailsOnLinux27" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-71.png?w=450&#038;h=423" alt="" width="450" height="423" /></a></p>
<p>And press the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-60.png"><img class="alignnone size-full wp-image-1747" title="DeployingGrailsOnLinux28" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-60.png?w=450" alt=""   /></a> button to introduce a new JVM parameter entry location as shown below:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-72.png"><img class="aligncenter size-full wp-image-1748" title="DeployingGrailsOnLinux29" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-72.png?w=450&#038;h=431" alt="" width="450" height="431" /></a></p>
<p>Enter the JVM heap size setting to be 2048 MBytes (-Xms2048m) as shown below:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-73.png"><img class="aligncenter size-full wp-image-1749" title="DeployingGrailsOnLinux30" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-73.png?w=450&#038;h=431" alt="" width="450" height="431" /></a></p>
<p>For these new JVM settings to take effect, you&#8217;ll need to click the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-63.png"><img class="alignnone size-full wp-image-1750" title="DeployingGrailsOnLinux31" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-63.png?w=450" alt=""   /></a> button producing:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-74.png"><img class="aligncenter size-full wp-image-1751" title="DeployingGrailsOnLinux32" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-74.png?w=450&#038;h=441" alt="" width="450" height="441" /></a></p>
<p>Notice that there&#8217;s a new message on the top left of the screen that says:  <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-66.png"><img class="alignnone size-full wp-image-1752" title="DeployingGrailsOnLinux33" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-66.png?w=450" alt=""   /></a></p>
<p>This message is also an active link.  Go ahead and click the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-75.png"><img class="alignnone size-full wp-image-1753" title="DeployingGrailsOnLinux34" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-75.png?w=450" alt=""   /></a> link which will bring you to:</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-68.png"><img class="aligncenter size-full wp-image-1754" title="DeployingGrailsOnLinux35" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-68.png?w=450&#038;h=432" alt="" width="450" height="432" /></a></p>
<p>Clicking the <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-69.png"><img class="alignnone size-full wp-image-1755" title="DeployingGrailsOnLinux36" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-69.png?w=450" alt=""   /></a> button will, as expected, reboot the GlassFish environment.</p>
<p><a href="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png"><img class="alignnone size-full wp-image-1063" title="0-space-between-sections1" src="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png?w=450" alt=""   /></a></p>
<p><span style="text-decoration:underline;"><strong>Further Discussions 2 &#8211; When GlassFish v3 goes wiggy on you</strong></span></p>
<p>Sometimes, when attempting to stop or restart one of your web-apps, GlassFish will respond with a not-so-helpful <a href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-511.png"><img class="alignnone size-full wp-image-1758" title="DeployingGrailsOnLinux37" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-511.png?w=450" alt=""   /></a> message.</p>
<p>There are two nuclear options available to you &#8212; The lessor of the two, Redeploying your web-app;  And the more traumatic normal (or possibly even forced) restarting of GlassFish.  We&#8217;ll first go through the act of redeploying your web-app&#8230;</p>
<p>Although the first attempt at redeploying your web-app should be via the app&#8217;s <span style="color:#0000ff;">redeploy</span> button.  Being that GlassFish has lost the ability to stop the app though, you&#8217;ll get another less-than-helpful message such as:</p>
<p><a style="text-decoration:none;" href="http://fletchermcbeth.files.wordpress.com/2010/03/picture-53.png"><img class="aligncenter size-full wp-image-1760" title="DeployingGrailsOnLinux38" src="http://fletchermcbeth.files.wordpress.com/2010/03/picture-53.png?w=450&#038;h=23" alt="" width="450" height="23" /></a></p>
<p>Upon attempting to stop GlassFish via:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">su</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">asadmin stop-domain</span></p>
<p>you&#8217;ll also get a not-so-helpful &#8220;a problem occurred&#8221; message.  The nuclear option here is to do (while still as root) a:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">ps aux | grep glassfish</span></p>
<p>command through which you&#8217;ll be presented something like:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">root     14004  2.9 86.9 2711176 1791612 ?     Sl   10:00   2:50 /opt/java/jdk1.6.0_18/bin/java -cp /opt/glassfish/glassfishv3/glassfish/modules/glassfish.jar -XX:+UnlockDiagnosticVMOptions -XX:MaxPermSize=192m -XX:NewRatio=2 -XX:+LogVMOutput -XX:LogFile=/opt/glassfish/glassfishv3/glassfish/domains/domain1/logs/jvm.log -Xms2048m -Xmx2048m -client -javaagent:/opt/glassfish/glassfishv3/glassfish/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true -Dosgi.shell.telnet.maxconn=1 -Djdbc.drivers=org.apache.derby.jdbc.ClientDriver -Dfelix.fileinstall.dir=/opt/glassfish/glassfishv3/glassfish/modules/autostart/ -Djavax.net.ssl.keyStore=/opt/glassfish/glassfishv3/glassfish/domains/domain1/config/keystore.jks -Dosgi.shell.telnet.port=6666 -Djava.security.policy=/opt/glassfish/glassfishv3/glassfish/domains/domain1/config/server.policy -Dfelix.fileinstall.poll=5000 -Dcom.sun.aas.instanceRoot=/opt/glassfish/glassfishv3/glassfish/domains/domain1 -Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Dosgi.shell.telnet.ip=127.0.0.1 -Djava.endorsed.dirs=/opt/glassfish/glassfishv3/glassfish/modules/endorsed:/opt/glassfish/glassfishv3/glassfish/lib/endorsed -Dcom.sun.aas.installRoot=/opt/glassfish/glassfishv3/glassfish -Djava.ext.dirs=/opt/java/jdk1.6.0_18/lib/ext:/opt/java/jdk1.6.0_18/jre/lib/ext:/opt/glassfish/glassfishv3/glassfish/domains/domain1/lib/ext -Dfelix.fileinstall.bundles.new.start=true -Djavax.net.ssl.trustStore=/opt/glassfish/glassfishv3/glassfish/domains/domain1/config/cacerts.jks -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as -Djava.security.auth.login.config=/opt/glassfish/glassfishv3/glassfish/domains/domain1/config/login.conf -DANTLR_USE_DIRECT_CLASS_LOADING=true -Dfelix.fileinstall.debug=1 -Dorg.glassfish.web.rfc2109_cookie_names_enforced=false -Djava.library.path=/opt/glassfish/glassfishv3/glassfish/lib:/opt/java/jdk1.6.0_18/jre/lib/amd64/server:/opt/java/jdk1.6.0_18/jre/lib/amd64:/opt/java/jdk1.6.0_18/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib com.sun.enterprise.glassfish.bootstrap.ASMain -domainname domain1 -asadmin-args start-domain -instancename server -verbose false -debug false -asadmin-classpath /opt/glassfish/current/glassfish/modules/admin-cli.jar -asadmin-classname com.sun.enterprise.admin.cli.AsadminMain -upgrade false -domaindir /opt/glassfish/glassfishv3/glassfish/domains/domain1 -read-stdin true</span></p>
<p style="padding-left:30px;"><span style="color:#0000ff;">root     17283  0.0  0.0  61160   748 pts/0    S+   11:37   0:00 grep glassfish</span></p>
<p>This kind-of-scary output is merely telling you that there are two GlassFish=related processes found on your server &#8212; processes 14004 and 17283.  The second process is just the grep statement which is producing this output.  The first process is your GlassFish application running amok.  Thus, as mentioned before, the nuclear option is to just kill GlassFish with the command (as root):</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">kill 14004</span></p>
<p>To verify that you have successfully stopped the GlassFish process, run the following statement again:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">ps aux | grep glassfish</span></p>
<p>And you should now see only the grep statement running.  Sometimes, the simple kill statement won&#8217;t kill the process.  To REALLY force the process to stop, you can use:</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">kill -9 14004</span></p>
<p>This statement grants the kill command the highest authority possible and will override everything.</p>
<p>Then restart GlassFish with the command (as root):</p>
<p style="padding-left:30px;"><span style="color:#0000ff;">asadmin start-domain</span></p>
<p>When your GlassFish environment finishes starting back up, your applications that were running before should be back on line.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fletchermcbeth.wordpress.com/1632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fletchermcbeth.wordpress.com/1632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fletchermcbeth.wordpress.com/1632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fletchermcbeth.wordpress.com/1632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fletchermcbeth.wordpress.com/1632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fletchermcbeth.wordpress.com/1632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fletchermcbeth.wordpress.com/1632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fletchermcbeth.wordpress.com/1632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fletchermcbeth.wordpress.com/1632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fletchermcbeth.wordpress.com/1632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fletchermcbeth.wordpress.com/1632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fletchermcbeth.wordpress.com/1632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fletchermcbeth.wordpress.com/1632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fletchermcbeth.wordpress.com/1632/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fletchermcbeth.wordpress.com&amp;blog=6291628&amp;post=1632&amp;subd=fletchermcbeth&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fletchermcbeth.wordpress.com/2010/03/11/deploying-grails-on-glassfish-v3/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/59712a2b87eea63f781c410ddc304e05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fletchermcbeth</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-21.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-7.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux2</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-8.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux3</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-162.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux4</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-8.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux3</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-13.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux5</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-31.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux6</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-153.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux7</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-20.png" medium="image">
			<media:title type="html">DeployingOnLinux8</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-19.png" medium="image">
			<media:title type="html">DeployingGrailaOnLinux9</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-52.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux10</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-22.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux12</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-23.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux13</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-33.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux14</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-25.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux15</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-32.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux16</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-34.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux17</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-35.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux18</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-36.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux19</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-45.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux20</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-46.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux21</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-47.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux22</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-481.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux23</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-57.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux24</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-56.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux25</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-70.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux26</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-71.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux27</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-60.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux28</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-72.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux29</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-73.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux30</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-63.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux31</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-74.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux32</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-66.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux33</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-75.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux34</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-68.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux35</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-69.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux36</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2009/04/0-space-between-sections1.png" medium="image">
			<media:title type="html">0-space-between-sections1</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-511.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux37</media:title>
		</media:content>

		<media:content url="http://fletchermcbeth.files.wordpress.com/2010/03/picture-53.png" medium="image">
			<media:title type="html">DeployingGrailsOnLinux38</media:title>
		</media:content>
	</item>
	</channel>
</rss>
