<?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/"
	>

<channel>
	<title>Cricalix.Net &#187; $work</title>
	<atom:link href="http://www.cricalix.net/categories/work/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cricalix.net</link>
	<description>Going sane since 1978</description>
	<lastBuildDate>Tue, 23 Mar 2010 07:44:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Crashing Glassfish</title>
		<link>http://www.cricalix.net/archives/2009/10/28/crashing-glassfish/</link>
		<comments>http://www.cricalix.net/archives/2009/10/28/crashing-glassfish/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 10:29:10 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=555</guid>
		<description><![CDATA[Had a report recently that our QA application servers kept falling over (Glassfish that is, not the hardware).    Started looking into it today, couldn&#8217;t find a sign of anything wrong.  Then one of the lead developers added a comment about how they&#8217;d seen this behaviour when the default Glassfish debug port (9009) gets pinged by [...]]]></description>
			<content:encoded><![CDATA[<p>Had a report recently that our QA application servers kept falling over (Glassfish that is, not the hardware).    Started looking into it today, couldn&#8217;t find a sign of anything wrong.  Then one of the lead developers added a comment about how they&#8217;d seen this behaviour when the default Glassfish debug port (9009) gets pinged by our monitoring system.  Then the developer who reported the problem commented &#8216;oh yeah, we turned that on on Sunday&#8217;.</p>
<p>Gotta love trying to work out why something is crashing when no one has said that the configuration has been changed (and the other implementations are perfectly stable).</p>
<p>Note to self: tripwire those machines.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2009/10/28/crashing-glassfish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vSphere and hardware monitoring</title>
		<link>http://www.cricalix.net/archives/2009/09/25/vsphere-and-hardware-monitoring/</link>
		<comments>http://www.cricalix.net/archives/2009/09/25/vsphere-and-hardware-monitoring/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 09:33:27 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=553</guid>
		<description><![CDATA[Recently upgraded one of our HP servers to VMware vSphere 4.0, and found that we couldn&#8217;t see the hardware status from the vCenter client.  All it would print was &#8220;Hardware monitoring service not responding, the host is not powered on&#8221;, despite the host certainly being powered on.  A VMware Communities posting suggested that it was [...]]]></description>
			<content:encoded><![CDATA[<p>Recently upgraded one of our HP servers to VMware vSphere 4.0, and found that we couldn&#8217;t see the hardware status from the vCenter client.  All it would print was &#8220;Hardware monitoring service not responding, the host is not powered on&#8221;, despite the host certainly being powered on.  A VMware Communities posting suggested that it was either firewall related (nope), or that removing the host and re-adding it might work.  Turns out there was a third option &#8211; just disconnect and reconnect the ESX host.</p>
<p>So simple, and now I have full visibility of the fans and temperatures on the host server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2009/09/25/vsphere-and-hardware-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outlook 2007 and Internet Calendars</title>
		<link>http://www.cricalix.net/archives/2009/06/19/outlook-2007-and-internet-calendars/</link>
		<comments>http://www.cricalix.net/archives/2009/06/19/outlook-2007-and-internet-calendars/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 15:20:53 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=540</guid>
		<description><![CDATA[Someone at work has requested a way to access our SugarCRM system from their Outlook 2007 / PDA client, so that the meetings can be synchronized properly.  A bit of research led me to the Sugar iCal patch on SugarForge, and the Internet Calendars option in Outlook 2007.  Unfortunately, the first set of instructions I [...]]]></description>
			<content:encoded><![CDATA[<p>Someone at work has requested a way to access our SugarCRM system from their Outlook 2007 / PDA client, so that the meetings can be synchronized properly.  A bit of research led me to the <a href="http://www.sugarforge.org/frs/?group_id=161" target="_blank">Sugar iCal</a> patch on SugarForge, and the Internet Calendars option in Outlook 2007.  Unfortunately, the first set of instructions I found said to use the Files &gt; Data Files Management option to access the Internet Calendars.  This method didn&#8217;t work very well (actually, it didn&#8217;t work at all), as Outlook would never synchronize the iCal file (it always said pending), and would promptly lose the setting when I closed Outlook.</p>
<p>It turns out the proper way to do it, when using Exchange integration, is to access Tools &gt; Accounts, and add the calendar subscription there.  The Send/Receive option in Outlook then works flawlessly, pulling down all the changes in the SugarCRM source every time Send/Receive is run.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2009/06/19/outlook-2007-and-internet-calendars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java, I Stab At Thee!</title>
		<link>http://www.cricalix.net/archives/2009/01/31/java-i-stab-at-thee/</link>
		<comments>http://www.cricalix.net/archives/2009/01/31/java-i-stab-at-thee/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 16:15:32 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[puppet]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=498</guid>
		<description><![CDATA[I&#8217;m doing some final tuning work on the Puppet recipes for our Glassfish installation, and Java has reared one of its ugly heads again.  In this case, it&#8217;s the whole management of the command line arguments for the JVM.
The majority of the arguments we need to configure take the form
-D$variable=$value
-XX:$variable=$value
The problem is, Java also [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m doing some final tuning work on the Puppet recipes for our Glassfish installation, and Java has reared one of its ugly heads again.  In this case, it&#8217;s the whole management of the command line arguments for the JVM.</p>
<p>The majority of the arguments we need to configure take the form<br />
-D$variable=$value<br />
-XX:$variable=$value</p>
<p>The problem is, Java also has arguments that look like<br />
-X$variable$value</p>
<p>This means my nice simple recipe to deal with tweaking the Glassfish JVM options doesn&#8217;t actually handle all the cases, so I now need to either go write a more complex one (and imbue it with knowledge as to what variables don&#8217;t have equal signs), or write a second recipe with a different name to handle these special snowflake options.</p>
<p>Feh.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2009/01/31/java-i-stab-at-thee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crash (but not burn)</title>
		<link>http://www.cricalix.net/archives/2008/11/20/crash-but-not-burn/</link>
		<comments>http://www.cricalix.net/archives/2008/11/20/crash-but-not-burn/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 12:18:22 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[cisco catalyst]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=434</guid>
		<description><![CDATA[On a good day, I learn something new.
Today can thus be classified as a good day, even if it did involve a bug that caused a Catalyst 5500 core switch to crash, taking out our entire network.
Cisco support wiki on said bug.
]]></description>
			<content:encoded><![CDATA[<p>On a good day, I learn something new.</p>
<p>Today can thus be classified as a good day, even if it did involve a bug that caused a Catalyst 5500 core switch to crash, taking out our entire network.</p>
<p><a href="https://supportwiki.cisco.com/ViewWiki/index.php/The_EARL-2:LKUPRAM_Err_and_the_blkcmbParityErrHdlr_messages_appear_on_a_Catalyst_5000_family_switch">Cisco support wiki</a> on said bug.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2008/11/20/crash-but-not-burn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An opaque Glassfish error</title>
		<link>http://www.cricalix.net/archives/2008/10/13/an-opaque-glassfish-error/</link>
		<comments>http://www.cricalix.net/archives/2008/10/13/an-opaque-glassfish-error/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 09:44:06 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[ejb]]></category>
		<category><![CDATA[glassfish]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=429</guid>
		<description><![CDATA[Doing more testing at work today, and decided to pickup the latest compiled output from the build server.
Exception occured in J2EEC Phasejava.lang.IllegalArgumentException: Unknown ContainerTransaction type [Requires]
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [EJB FILE] &#8212; Unknown ContainerTransaction type [Requires]
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:390)
Pinged one of the developers about that, and apparently it means that the transaction-type in ejb-jar.xml [...]]]></description>
			<content:encoded><![CDATA[<p>Doing more testing at work today, and decided to pickup the latest compiled output from the build server.</p>
<blockquote><p>Exception occured in J2EEC Phasejava.lang.IllegalArgumentException: Unknown ContainerTransaction type [Requires]<br />
com.sun.enterprise.deployment.backend.IASDeploymentException: Error loading deployment descriptors for module [EJB FILE] &#8212; Unknown ContainerTransaction type [Requires]<br />
at com.sun.enterprise.deployment.backend.Deployer.loadDescriptors(Deployer.java:390)</p></blockquote>
<p>Pinged one of the developers about that, and apparently it means that the transaction-type in ejb-jar.xml is wrong.  Yay.  For a reason I cannot fathom, Google had no results for this error either.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2008/10/13/an-opaque-glassfish-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making OpenNMS faster</title>
		<link>http://www.cricalix.net/archives/2008/09/17/making-opennms-faster/</link>
		<comments>http://www.cricalix.net/archives/2008/09/17/making-opennms-faster/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 15:27:13 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[opennms]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=422</guid>
		<description><![CDATA[$work uses OpenNMS to monitor our various devices (servers, switches, routers, printers etc), mostly via SNMP.  Today, while looking at the various events that had been recorded, I noticed that a relatively simple search was taking more than 2 minutes to process through ~250,000 event rows (plus associated rows in other tables).  I turned on [...]]]></description>
			<content:encoded><![CDATA[<p>$work uses <a href="http://www.opennms.org/index.php/Main_Page">OpenNMS</a> to monitor our various devices (servers, switches, routers, printers etc), mostly via SNMP.  Today, while looking at the various events that had been recorded, I noticed that a relatively simple search was taking more than 2 minutes to process through ~250,000 event rows (plus associated rows in other tables).  I turned on query logging (log_statements = &#8216;all&#8217; &amp;&amp; service postgresql reload), and re-ran the search from the web interface.</p>
<p>Lo and behold, the culprit was revealed &#8211; the search went something like</p>
<blockquote><p>UPPER(eventlogmsg) LIKE &#8216;%value%&#8217;</p></blockquote>
<p>Even if that field was indexed,the use of the &#8216;%&#8217; on the front would negate the use of the index.  I threw the query into <a href="http://www.pgadmin.org/">PGAdmin</a>, and discovered that the query plan that PostgreSQL chose was a pair of nested loop joins &#8211; unpleasant to say the least.  A quick gander at the docs, and a few SQL statements later, and I had a full-text index on the eventlogmsg field.  Several test queries convinced me that it was much faster, so I threw the new query into PGAdmin and asked for the pretty query plan.  Two hash joins and a sort, and a query time of 31 milliseconds; or more than 5000 times faster.</p>
<p>So, I&#8217;ve filed a Bugzilla entry for this with the OpenNMS team &#8211; unfortunately it&#8217;s specific to PostgreSQL 8.3, but that&#8217;s something that can probably be determined at run-time and install-time.  Hopefully they agree that it&#8217;s a worthwhile performance change, as full-text indexes won&#8217;t actually help the LIKE usage &#8211; the code will have to change to generate new SQL statements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2008/09/17/making-opennms-faster/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Autostarting Glassfish on CentOS</title>
		<link>http://www.cricalix.net/archives/2008/07/22/autostarting-glassfish-on-centos/</link>
		<comments>http://www.cricalix.net/archives/2008/07/22/autostarting-glassfish-on-centos/#comments</comments>
		<pubDate>Tue, 22 Jul 2008 10:18:03 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[glassfish]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=404</guid>
		<description><![CDATA[I&#8217;ve been working with Glassfish recently, from the system administration point of view.  First task, after getting a good build with Maven (doing it with basic rpm methods netted me a massive dependency list, including things like Firefox!), was to write an init script so that Glassfish can be integrated into the CentOS boot sequence.
Because [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with <a href="https://glassfish.dev.java.net/" target="_blank">Glassfish</a> recently, from the system administration point of view.  First task, after getting a good build with Maven (doing it with basic rpm methods netted me a massive dependency list, including things like Firefox!), was to write an init script so that Glassfish can be integrated into the CentOS boot sequence.</p>
<p>Because we might have multiple domains set up inside of Glassfish, I opted for a setup similar to the Tomcat5 init script &#8211; check the basename of $0, and use that to determine which domain to boot up.  The fiddling in start() gets around the fact that Glassfish doesn&#8217;t seem to write a PID file out where we need one.</p>
<p>So, just in case anyone else needs to do this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># chkconfig: 2345 85 15</span>
<span style="color: #666666; font-style: italic;"># description: GlassFish is a Java Application Server.</span>
<span style="color: #666666; font-style: italic;"># processname: glassfish</span>
<span style="color: #666666; font-style: italic;"># pidfile: /var/run/glassfish.pid</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># source function library</span>
. <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>functions
&nbsp;
<span style="color: #007800;">RETVAL</span>=<span style="color: #000000;">0</span>
<span style="color: #007800;">GLASSFISH_BIN</span>=<span style="color: #ff0000;">&quot;/var/lib/glassfish/bin&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Basename works with symbolic links.</span>
<span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$(basename $0)</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">unset</span> ISBOOT
<span style="color: #666666; font-style: italic;"># Trim off the Sxx/Kxx prefix</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${NAME:0:1}</span>&quot;</span> = <span style="color: #ff0000;">&quot;S&quot;</span> <span style="color: #660033;">-o</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">${NAME:0:1}</span>&quot;</span> = <span style="color: #ff0000;">&quot;K&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
    <span style="color: #007800;">NAME</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">${NAME:3}</span>&quot;</span>
    <span style="color: #007800;">ISBOOT</span>=<span style="color: #ff0000;">&quot;1&quot;</span>
<span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #666666; font-style: italic;"># Trim off the glassfish- prefix</span>
<span style="color: #007800;">NAME</span>=<span style="color: #800000;">${NAME:10}</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># /etc/init.d/glassfish should never be called directly.</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-z</span> <span style="color: #007800;">$NAME</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> $<span style="color: #ff0000;">&quot;Cannot start Glassfish without specifying a domain.&quot;</span>
        failure
        <span style="color: #7a0874; font-weight: bold;">echo</span>
        <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
start<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> $<span style="color: #ff0000;">&quot;Starting Glassfish V2 domain <span style="color: #007800;">$NAME</span>: &quot;</span>
        daemon <span style="color: #660033;">--user</span> glassfish <span style="color: #660033;">--pidfile</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>glassfish-<span style="color: #007800;">$NAME</span>.pid <span style="color: #ff0000;">&quot;<span style="color: #007800;">$GLASSFISH_BIN</span>/asadmin start-domain <span style="color: #007800;">$NAME</span> &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&quot;</span>
        <span style="color: #007800;">RETVAL</span>=<span style="color: #007800;">$?</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$RETVAL</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
                <span style="color: #007800;">PID</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ps</span> U glassfish <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #007800;">$NAME</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{ print $1}'</span><span style="color: #000000; font-weight: bold;">`</span>
                <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$PID</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt; <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>glassfish-<span style="color: #007800;">$NAME</span>.pid
                <span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock<span style="color: #000000; font-weight: bold;">/</span>subsys<span style="color: #000000; font-weight: bold;">/</span>glassfish-<span style="color: #007800;">$NAME</span>
        <span style="color: #000000; font-weight: bold;">fi</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
stop<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> $<span style="color: #ff0000;">&quot;Shutting down Glassfish V2 domain <span style="color: #007800;">$NAME</span>: &quot;</span>
        <span style="color: #007800;">$GLASSFISH_BIN</span><span style="color: #000000; font-weight: bold;">/</span>asadmin stop-domain <span style="color: #007800;">$NAME</span> <span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>null <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&amp;</span>gt;<span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000;">1</span>
        <span style="color: #007800;">RETVAL</span>=<span style="color: #007800;">$?</span>
        <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$RETVAL</span> <span style="color: #660033;">-eq</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock<span style="color: #000000; font-weight: bold;">/</span>subsys<span style="color: #000000; font-weight: bold;">/</span>glassfish-<span style="color: #007800;">$NAME</span> <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>glassfish-<span style="color: #007800;">$NAME</span>  <span style="color: #000000; font-weight: bold;">&amp;</span>amp;<span style="color: #000000; font-weight: bold;">&amp;</span>amp; success <span style="color: #000000; font-weight: bold;">||</span> failure
        <span style="color: #7a0874; font-weight: bold;">echo</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
  start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        start
        <span style="color: #000000; font-weight: bold;">;;</span>
  stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        stop
        <span style="color: #000000; font-weight: bold;">;;</span>
  restart<span style="color: #000000; font-weight: bold;">|</span>reload<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        stop
        start
        <span style="color: #000000; font-weight: bold;">;;</span>
  condrestart<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-f</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>lock<span style="color: #000000; font-weight: bold;">/</span>subsys<span style="color: #000000; font-weight: bold;">/</span>glassfish-<span style="color: #007800;">$NAME</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
            stop
            start
        <span style="color: #000000; font-weight: bold;">fi</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  status<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        status glassfish-<span style="color: #007800;">$NAME</span>
        <span style="color: #007800;">RETVAL</span>=<span style="color: #007800;">$?</span>
        <span style="color: #000000; font-weight: bold;">;;</span>
  <span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> $<span style="color: #ff0000;">&quot;Usage: $0 {start|stop|restart|condrestart|status}&quot;</span>
        <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #007800;">$RETVAL</span></pre></div></div>

<p>The alternative is to define a /etc/sysconfig/glassfish file, and insert a variable with the list of domains to boot, in sequence.  This is a little harder to manage automatically in <a href="http://reductivelabs.com/projects/puppet/" target="_blank">Puppet</a>, but might be a better solution if precise boot sequences are required (this method will boot in sequence based on the S numbers in the base script, and then the alphabetical ordering of the names).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2008/07/22/autostarting-glassfish-on-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows XP, VPNs and DNS</title>
		<link>http://www.cricalix.net/archives/2008/07/12/windows-xp-vpns-and-dns/</link>
		<comments>http://www.cricalix.net/archives/2008/07/12/windows-xp-vpns-and-dns/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 08:48:52 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[vpn]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=401</guid>
		<description><![CDATA[I have a work-supplied laptop.  Until this week, whenever I activated the PPTP VPN to work, I was able to resolve all of our internal servers by DNS name.  This is good, it means I can navigate our network at work without remembering IP addresses.
This week I&#8217;m on call.  I had to VPN in to [...]]]></description>
			<content:encoded><![CDATA[<p>I have a work-supplied laptop.  Until this week, whenever I activated the PPTP VPN to work, I was able to resolve all of our internal servers by DNS name.  This is good, it means I can navigate our network at work without remembering IP addresses.</p>
<p>This week I&#8217;m on call.  I had to VPN in to check out a failed Internet connection, and found to my horror that DNS resolution no longer worked.  I pondered for a moment, and then hard-coded the DNS server for the underlying network device to the work DNS servers and was able to get on with the job.</p>
<p>I&#8217;ve just been looking for what the heck has gone wrong; my home PC is able to open up the same VPN connection (I checked every single setting) and DNS resolution works.  What I found was a <a href="http://www.computing.net/answers/networking/vpn-dns-issue/31161.html" target="_blank">page </a>describing a registry edit that fixes the problem.  Did said regedit, and presto, the VPN from the laptop works again.  The thing that bugs me is I don&#8217;t know how that setting got changed.  Mindboggling.</p>
<p>For the record, in case that page goes away, edit HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Linkage, double-click Bind and move the NdisWanIp entry to the top of the list.</p>
<p>Windows.  Feh.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2008/07/12/windows-xp-vpns-and-dns/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CatOS, bonded channels and non-bonded servers</title>
		<link>http://www.cricalix.net/archives/2008/06/30/catos-bonded-channels-and-non-bonded-servers/</link>
		<comments>http://www.cricalix.net/archives/2008/06/30/catos-bonded-channels-and-non-bonded-servers/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 16:21:35 +0000</pubDate>
		<dc:creator>cricalix</dc:creator>
				<category><![CDATA[$work]]></category>

		<guid isPermaLink="false">http://www.cricalix.net/?p=399</guid>
		<description><![CDATA[It came to my attention today that when a Catalyst running CatOS reports
Port  Status     Channel   Channel     Neighbor                  Neighbor
                 mode      status      device                    port
----- ---------- --------- ----------- ------------------------- ----------
8/7  connected   on        channel
8/8  connected   on        channel

it means the two ports [...]]]></description>
			<content:encoded><![CDATA[<p>It came to my attention today that when a Catalyst running CatOS reports</p>
<pre>Port  Status     Channel   Channel     Neighbor                  Neighbor
                 mode      status      device                    port
----- ---------- --------- ----------- ------------------------- ----------
8/7  connected   on        channel
8/8  connected   on        channel
</pre>
<p>it means the two ports are bonded together.  This poses distinct problems when the server isn&#8217;t aware that the two connections are bonded.  A CentOS installation process that takes 5 minutes normally was still running 3 hours later, and it wasn&#8217;t even half-way.  What was even more interesting was that the repository server showed files being downloaded, but Anaconda swore blind that nothing was happening.</p>
<p>Live and learn.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cricalix.net/archives/2008/06/30/catos-bonded-channels-and-non-bonded-servers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

