<?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>Tork Wrench &#187; howto</title>
	<atom:link href="http://www.torkwrench.com/category/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.torkwrench.com</link>
	<description>Things I learnt today, working on IBM Lotus Web Content Management.</description>
	<lastBuildDate>Tue, 17 Aug 2010 06:50:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to override a NetApp Filer missing battery shutdown</title>
		<link>http://www.torkwrench.com/2010/08/17/how-to-overide-a-netapp-filer-missing-battery-shutdown/</link>
		<comments>http://www.torkwrench.com/2010/08/17/how-to-overide-a-netapp-filer-missing-battery-shutdown/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 06:50:30 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[FAS960C]]></category>
		<category><![CDATA[Filer]]></category>
		<category><![CDATA[NetApp]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=256</guid>
		<description><![CDATA[How to override the automatic shutdown in a NetApp Filer <a href="http://www.torkwrench.com/2010/08/17/how-to-overide-a-netapp-filer-missing-battery-shutdown/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Our team recently became the proud owners of a dirty massive NetApp disk array. It was ex lease, so we got it for almost nothing. It&#8217;s circa 2004, so it old and dusty and a some of the hardware doesn&#8217;t work, but with a little TLC we&#8217;ve got it up and humming away. It was good fun getting it to work. I&#8217;m not entirely sure what to do with it, probably just dump more VMs on it!</p>
<p>One of the problems we had getting it to work was the NVRAM IV card . Being such an old machine, the battery backed cache on there was getting on a bit. Messages like this would come up in the console when booting:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[nvram.bat.error:CRITICAL]: The NVRAM battery in the chassis is *degraded*<br />
[nvram.bat.error:CRITICAL]: The NVRAM battery in the chassis is *partially discharged*<br />
[monitor.nvramLowBattery:CRITICAL]: NVRAM battery is dangerously low.<br />
[nvram.bat.error:CRITICAL]: replayed event: The NVRAM battery in the chassis is *not safe to boot. Delay for charging canceled by user. Charger is ON *</div></div>
<p>In this situation, the machine sits in suspended animation for up to 10 hours until the battery charges to a certain level. It&#8217;s like being stuck in the bios. My battery is so old that it won&#8217;t hold enough charge, so I&#8217;m SOL. </p>
<p>You can override this charging phase by pressing ctrl-c when the filer is booting, however it will turn itself off after 24 hours, lest you should get complacent and think that your data is safe in the event of a power outage. NetApp as a company seem to be really serious about preventing data outage (mad respect yo)!</p>
<p>I think it would be cool to replace the battery in there, but I haven&#8217;t been able to find anywhere that will send me one for a reasonable price. Reading through the lines of the NetApp support site seams to suggest that the battery is only bundled with a NVRAM card, and that you can&#8217;t get them separately. I&#8217;ve cracked open the plastic seal on the battery and it looks like it is just a few camera batteries wired together and attached to a random circuit board. Haven&#8217;t been able to find any suitable parts yet to build my own, but if I do, you dear reader will be the first to know.</p>
<p>Until then I will disable the automatic shutdown, which seems to be undocumented, for obvious reasons. At the NetApp console, go :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">options raid.timeout 0</div></div>
<p>It&#8217;ll periodically spit out little passive aggressive missives like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">nvram.bat.missing.error:CRITICAL]: The NVRAM battery in the chassis is *missing or dead*. . Ensure battery is present and connected to the NVRAM card.<br />
[no.halt.nvramLowBattery:warning]: NVRAM battery is dangerously low. Automatic system shutdown is disabled. Replace the battery immediately!</div></div>
<p>But just ignore them &#8211; it should keep on trucking!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/08/17/how-to-overide-a-netapp-filer-missing-battery-shutdown/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add additional packages to a Fedora repo</title>
		<link>http://www.torkwrench.com/2010/04/21/how-to-add-additional-packages-to-a-fedora-repo/</link>
		<comments>http://www.torkwrench.com/2010/04/21/how-to-add-additional-packages-to-a-fedora-repo/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 05:28:56 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[createrepo]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=212</guid>
		<description><![CDATA[How to add extra packages to your Fedora / CentOS / RHEL repository with the createrepo command. <a href="http://www.torkwrench.com/2010/04/21/how-to-add-additional-packages-to-a-fedora-repo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s time to give Fedora 12 a whirl on our servers. In the lab we are massive users of anaconda&#8217;s kickstart system for doing unattended installs. This means that everything has to be perfect, otherwise the install will hang. For instance, if a package that you have defined in the kickstart isn&#8217;t there, anaconda (the name for Fedora&#8217;s installer) will hang. </p>
<p>I&#8217;ve noticed that Fedora has dropped the compat-libstdc++-296 and compat-libstdc++-33, which we require for DB2. The compat packages are in still the &#8216;Everything&#8217; directory in the <a href="http://mirrors.fedoraproject.org/publiclist/Fedora/12/">Fedora 12 mirror sites</a>, so we can download them and add them to our repository. This approach would work with any RHEL/CentOS/Fedora type distro.</p>
<p>1. Extract the CD/DVD to a folder.<br />
2. Copy the packages you would like to add to the Packages subdirectory<br />
3. Cd to the top level directory of the extracted files (you should see directories like Packages, repodata, images as subdirectories )<br />
4. Run this command :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">createrepo --update -g repodata/comps.xml .</div></div>
<p>This will update the package metadata in the repodata directory to include the new packages that you have added.<br />
5. Add your new packages to the %packages section of the kickstart file &#8211; anaconda will now find the packages. For example, this is what mine says:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">%packages --nobase<br />
@core<br />
vim-enhanced<br />
-exim<br />
-samba-winbind<br />
-cairo<br />
-krb5-libs<br />
-fedora-release-notes<br />
-python<br />
-python-libs<br />
-gtk2<br />
-selinux-policy-targeted<br />
-selinux-policy<br />
-policycoreutils<br />
-system-config-samba<br />
-wireless-tools<br />
-openldap<br />
-libthai<br />
-cups-libs<br />
-efibootmgr<br />
-hicolor-icon-theme<br />
-fedora-logos<br />
-system-config-network-tui<br />
-system-config-firewall-tui<br />
-perl-Module-Pluggable<br />
-perl-Convert-ASN1<br />
-perl<br />
-popt<br />
-libtiff<br />
-libselinux<br />
-libselinux-devel<br />
-linux-atm-libs<br />
-cyrus-sasl-lib<br />
-ed<br />
-newt-python<br />
-mdadm<br />
-python-numeric<br />
-kudzu<br />
-gamin<br />
-parted<br />
-wireless-tools<br />
@smb-server<br />
libaio<br />
wget<br />
yum<br />
rpm-build<br />
createrepo<br />
sudo<br />
ntp<br />
openssh-server<br />
openssh-clients<br />
dhclient<br />
kernel-headers<br />
gcc<br />
gcc-c++<br />
mlocate<br />
anacron<br />
vixie-cron<br />
crontabs<br />
make<br />
curl<br />
unzip<br />
svn<br />
compat-libstdc++-296<br />
compat-libstdc++-33<br />
<br />
%post</div></div>
<p>This package selection is really minimal and enables us to build a Fedora machine from nothing in about 5 minutes!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/04/21/how-to-add-additional-packages-to-a-fedora-repo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Offline Physical 2 Virtual conversion (p2v) using free tools</title>
		<link>http://www.torkwrench.com/2010/02/23/offline-physical-2-virtual-conversion-p2v-using-free-tools/</link>
		<comments>http://www.torkwrench.com/2010/02/23/offline-physical-2-virtual-conversion-p2v-using-free-tools/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 05:10:54 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[p2v]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=200</guid>
		<description><![CDATA[How to convert a Physical Linux server to a Virtual Linux Server using free tools. <a href="http://www.torkwrench.com/2010/02/23/offline-physical-2-virtual-conversion-p2v-using-free-tools/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a bit confused about VMware&#8217;s Converter and when you can use it. Which offering is free? Which is paid? From the last time I looked, I think you need the enterprise product to do an offline conversion. And call me old school, but online conversion just seems like voodoo to me. I was in the office this weekend, trying to convert an important physical machine to a virtual one and it failed for all sorts of reasons:</p>
<p>1. SSH keys. If you have a heavily locked down machine with ssh key logins, you cannot use the online converter.</p>
<p>2. Network. If you can&#8217;t hit the &#8216;source&#8217; machine with ssh, you can&#8217;t convert it. Maybe it&#8217;s on another network, or has a firewall running on it. </p>
<p>3. So since all that didn&#8217;t work, you&#8217;re forced to install the converter on the same machine you are converting. Except you don&#8217;t want to do that because you will have to fill out lots of forms because you are installing a new piece of software on a production machine.</p>
<p>This is a fail safe method of converting a physical Linux server into a virtual one. I converted my physical machine to an ESX 4.0 host, but this method would probably work for other versions of VMware as well.</p>
<p>1. Power down the server.</p>
<p>2. Boot up the server using a linux live cd . <a href="http://www.slax.org/">(I like Slax)</a></p>
<p>3. At the command line, run:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">dd if=/dev/sda | ssh user@server 'dd of=sda.img'</div></div>
<p>Where server is a (linux) server with about twice as much disk space as you have, and /dev/sda is the address of the disk you would like to convert. You could probably do more that one disk using this howto, but I only did one.</p>
<p>4. Install Qemu on the Linux server. You should be able to find it in your yum repo, or apt-get repo.</p>
<p>5. Run this to convert the raw dd image to a vmdk.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">qemu-img convert sda.img -O vmdk sda.vmdk</div></div>
<p>6. Copy the sda.vmdk to your datastore, using scp if you have ssh enabled on your VMware host, or using the Datastore browser if you don&#8217;t. Make sure to create a folder for the new machine.</p>
<p>7. Create a new VM in the vSphere Console, using values similar to the physical machine you are replacing. Make sure to select Custom at the first screen, not typical.</p>
<p>8. When it comes time to create a new disk, point vSphere at your newly converted vmdk file.</p>
<p>9. Boot up the server, and you&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/02/23/offline-physical-2-virtual-conversion-p2v-using-free-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing RHEL 5 using the VMware Paravirtualized SCSI driver (pvscsi)</title>
		<link>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/</link>
		<comments>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 02:24:32 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[pvscsi]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=184</guid>
		<description><![CDATA[How to install RHEL 5 with the VMware Paravirtualized SCSI driver embedded into the installation media, and then how to automate the installation using it <a href="http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>VMware ESX 4.0 offers a number of different SCSI disk controllers. One of the newer and more interesting ones is the paravirtualized scsi adapter. As with any type of paravirtualized  driver the paravirtualized scsi driver promises to be faster and use less CPU cycles than the other storage drivers, and since I/O performance is so important to overall system performance in virtualized environments, I thought it was worth a look. I don&#8217;t have any solid numbers about how it performs with WebSphere Portal, but once I do you will be the first to know.</p>
<p>The new driver has a number of drawbacks, most notably it is not supported as a boot device. VMware expect you to configure your OS on one &#8216;normal&#8217; drive and then install a secondary drive with the paravirtualized adaptor. As well as being a pain from a management standpoint , it also ignores the speed increases that you would derive from having the OS on this faster device.</p>
<p>The method below will allow you to install Red Hat Enterprise 5.4 on your primary boot device using the pvscsi driver, and includes steps about how to automate the process with Redhat&#8217;s excellent kickstart system. If you are just interested in doing this on one system, <a href="http://vmadmin.nt.com.au/?p=28" target="_blank">I would follow these steps instead .</a> My steps are good if you want to automate this procedure over many machines, but it&#8217;s probably overkill if you just want to try pvscsi on one machine. Hopefully these steps will be outdated soon when the pvscsi module makes it into the regular mainline kernel, which looks like it might happen in 2.6.33!</p>
<p>1. Create a new VM from the vSphere Console in the usual way.</p>
<p>2. Click edit settings on the new VM and select the SCSI controller 0 device, then up on the right hand side pane, click Change SCSI Controller Type and select VMware Paravirtual.</p>
<p><img class="aligncenter size-full wp-image-185" title="pvscsi-esx" src="http://www.torkwrench.com/wp-content/uploads/2010/01/pvscsi-esx.png" alt="pvscsi-esx" width="460" height="340" /></p>
<p>Now we must create boot media. I use iso images and the virtual cdrom device in VMware, but you could modify these steps and use them with PXE booting or USB booting quite easily. The process here is to add the pvscsi kernel module to the boot disk, so the RHEL installer can see the VMware disk.</p>
<p>3. Grab the prebuilt boot.iso from the images/ subdirectory and unextract it. You can do this by running:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mount -o loop boot.iso /mnt/boot<br />
<br />
cd /mnt/boot<br />
<br />
mkdir ~/boot<br />
<br />
cp -R * ~/boot<br />
<br />
cd ~/boot</div></div>
<p>You should now have an isolinux subdirectory in this directory.</p>
<p>4. Extract initrd.img . This is the initial ram disk which contains the boot files that the installer requires to run. Create a temp directory and extract it into it.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mkdir tmp<br />
cd tmp<br />
gzip -dc ../initrd.img | cpio -ivd</div></div>
<p>5. Now we need to extract (again!) the modules archive, so we can add pvscsi to it.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd modules<br />
gzip -dc modules.cgz | cpio -ivd</div></div>
<p>This will make a new subdirectory which will have the same name as your kernel version. Mine looks like this :<br />
2.6.18-164.el5/x86_64<br />
If you are running a 32 bit kernel or a different version of Redhat, yours will look slightly different.</p>
<p>6. Extract the VMware tools rpm and copy the precompiled driver into the modules directory. Make another temp directory and copy the Vmware Tools rpm into it. You should be able to get the VMware tools rpm from your ESX host or from the VMware website.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm2cpio VMwareTools-4.0.0-latest.i386.rpm | cpio -idmv<br />
find . -name pvscsi.o | grep 2.6.18-164.el5 (this will return the path to where the driver is - the one below is my path)<br />
cp usr/lib/vmware-tools/modules/binary/bld-2.6.18-8.el5-x86_64smp-RHEL5/objects/pvscsi.o [temp dir from step 4]/modules/2.6.18-164.el5/x86_64/pvscsi.o<br />
cp usr/lib/vmware-tools/modules/binary/bld-2.6.18-8.el5-x86_64smp-RHEL5/objects/pvscsi.o [temp dir from step 4]/modules/2.6.18-164.el5/x86_64/pvscsi.ko</div></div>
<p>Then delete the temporary VMware tools directory.</p>
<p>7. Now we need to edit a bunch of text files that are in the modules subdirectory so Redhat can find the new driver.</p>
<p>At the bottom of module-info add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pvscsi<br />
&nbsp; &nbsp; &nbsp; &nbsp; scsi<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;VMware PVSCSI driver&quot;</div></div>
<p>At the bottom of modules.alias add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">alias pci:v000015ADd000007C0sv*sd*bc*sc*i* pvscsi</div></div>
<p>At the bottom of modules.dep add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pvscsi: scsi_mod</div></div>
<p>In pci.ids, search for &#8217;15ad&#8217; . You will see an entry for a few  VMware devices. To this list add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">07c0 &nbsp;PVSCSI SCSI Controller</div></div>
<p>The whole stanza will look something like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">15ad &nbsp;VMware<br />
&nbsp; &nbsp; &nbsp; &nbsp; 0405 &nbsp;SVGA II Adapter<br />
&nbsp; &nbsp; &nbsp; &nbsp; 0710 &nbsp;SVGA Adapter<br />
&nbsp; &nbsp; &nbsp; &nbsp; 07c0 &nbsp;PVSCSI SCSI Controller</div></div>
<p>8. Now we need to compress everything. First the modules.cgz (and still in the modules directory) :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">find 2.6.18-164.el5 | cpio -H newc -ov | gzip -9 -c - &gt; modules.cgz<br />
rm -rf 2.6.18-164.el5</div></div>
<p>9. Compress the initrd.img</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd ..<br />
find . | cpio -H newc -ov | gzip -9 -c - &gt; initrd.img</div></div>
<p>10. Everything is compressed up again, now to make a boot cd.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd ..<br />
mkisofs -o pvscsi.iso -V pvscsi -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -T .</div></div>
<p>11. Copy pvscsi.iso to your ESX datastore and click edit settings on your paravirtualized guest vm. Set the cdrom to boot from pvscsi.iso . </p>
<p>This is enough to get the installation image to boot correctly with the pvscsi driver, but what will happen next is that the server will reboot using the regular kernel, and it won&#8217;t have the pvscsi driver available to it, so the machine will not reboot. We need to install and configure the VMware tools rpm after the RHEL install so when the machine reboots it will have access to the pvscsi driver file. </p>
<p>If you don&#8217;t want to use kickstart to do this, and the end of the install, drop into a shell by typing ALT-CTRL-F2 and download the VMware tools rpm from a local webserver, or you could copy it to the guest VM using scp or something. For example :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm -Uvh http://yourwebserver/vmwaretools.rpm<br />
vmware-config-tools.pl --default</div></div>
<p>Reboot and you should be good. Read on if you would like to automate this procedure.</p>
<p>12.The easiest way to create a kickstart file is to run through a normal install and then to copy the ~/anaconda-ks.cfg file from the server, which will have all your settings saved in it. <a href="http://www.torkwrench.com/wp-content/uploads/2010/01/example2.cfg">Or look at my example. </a> . All you should need to do here is change the url, key, hostname, rootpw parameters and edit the url to the vmware tools rpm to something valid for your environment and you should be good to go.</p>
<p>Stay tuned for performance numbers to show if any of this is even worth it! <img src='http://www.torkwrench.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Generating a java heap dump when WebSphere AppServer is not responding</title>
		<link>http://www.torkwrench.com/2009/12/29/generating-a-java-heap-dump-when-websphere-appserver-is-not-responding/</link>
		<comments>http://www.torkwrench.com/2009/12/29/generating-a-java-heap-dump-when-websphere-appserver-is-not-responding/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 04:05:14 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=178</guid>
		<description><![CDATA[How to convert a system dump to a java heap dump .  <a href="http://www.torkwrench.com/2009/12/29/generating-a-java-heap-dump-when-websphere-appserver-is-not-responding/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This one is going to be esoteric.</p>
<p>Working in System Test, you tend to see problems crop up that can only be recreated after a certain amount of time. A memory leak, for example, might not appear to cause any problems until well into a test run. And it&#8217;s tough luck if you haven&#8217;t enabled the correct settings to obtain diagnostic information to debug the problem. You need to stop the server, set the required parameters (verbose gc, Xdump parameters, whatever) and rerun the test to reproduce the problem, which may take days.</p>
<p>Today at work a situation arose where a run had failed and the server was hung. You could send a kill -3 (a sigquit) at the process it would spit out a javacore file which is useful if you have some sort of thread contention or deadlocks. However the developer working on this problem wanted a heap dump, something which is difficult to generate if the server is not responding. </p>
<p><a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.express.doc/info/exp/ae/tprf_generatingheapdumps.html">(Incidently, if the server is responding, you can use wsadmin to generate a heap dump, which is way easier than the method described below).</a></p>
<p>I ended up stumbling upon a neat way to generate a heap dump when the server is not responding. </p>
<p>1. Run</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gcore -o &lt;corefile&gt; &lt;pid&gt;</div></div>
<p>Gcore is in the gdb package and forces the system to dump a binary core file. It should be about as large as the memory space that the java process was using when you ran it. Gcore is a Linux specific command; gdb proper should work on other unices, gcore is more of a convenience command. On Windows, use Dr Watson. The IBM support site has some excellent technotes around this sort of thing. I usually just google &#8220;Mustgather websphere hang&#8221; or something and they&#8217;ll often come up.</p>
<p>2. Run</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">. &lt;wp_profile&gt;/bin/setupCmdLine.sh</div></div>
<p>to put all these nifty java tools in your path. </p>
<p>3. Run</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;jextract &lt;coredumpname&gt; -nozip</div></div>
<p>This converts the system dump (core dump) into a useable format. It also produces an xml file that lists each active method and class taken at the time of the dump . </p>
<p>4. Run</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">jdmpview -core &lt;corefilename&gt; -xml &lt;corefilename&gt;.xml -J-Xmx&lt;big number&gt;</div></div>
<p>Where &#8220;big number&#8221; is a memory size bigger than the initial core file in bytes.<br />
jdmpview gives you a command line menu of ways you can poke and prod the dump file. And it is from here where you can construct a java heap dump from a system dump. Simply type <strong>heapdump</strong> at this prompt and it will create a phd (portable heapdump format) file which you can use in one of the many analysis tools in IBM Support Assistant, or else send it on to your friendly neighbourhood support professional.  <img src='http://www.torkwrench.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  A word of warning. With a large system dump file the final &#8216;heapdump&#8217; step seems to be quite slow. Still, it is better than waiting for days to reproduce the initial problem!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2009/12/29/generating-a-java-heap-dump-when-websphere-appserver-is-not-responding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 Steps to installing Portal 6.1.5 on Ubuntu 9.10</title>
		<link>http://www.torkwrench.com/2009/12/07/5-steps-to-installing-portal-6-1-5-on-ubuntu-9-10/</link>
		<comments>http://www.torkwrench.com/2009/12/07/5-steps-to-installing-portal-6-1-5-on-ubuntu-9-10/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 04:06:20 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[Karmic Koala]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[WebSphere Application Server]]></category>
		<category><![CDATA[WebSphere Portal]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=163</guid>
		<description><![CDATA[Here's how to install Portal 6.1.5 on Ubuntu 9.10  <a href="http://www.torkwrench.com/2009/12/07/5-steps-to-installing-portal-6-1-5-on-ubuntu-9-10/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another new version of Portal, another new version of Ubuntu . Here&#8217;s how to get them to play nicely together. Most of these steps are needed for any recent version of Ubuntu. Obligatory disclaimer, Ubuntu is a non supported platform, so don&#8217;t run anything important on this it. IBM support won&#8217;t help you!</p>
<p>1. Install libstdc++5 from <a href="http://packages.ubuntu.com/jaunty/libstdc++5">here</a>. Apparently this has been dropped from karmic (9.10) but you can use 9.04 packages instead and it will work.</p>
<p>2. Make sure you can ping yourself on the fully qualified hostname that you will be using in the install. This is a good general tip for installing Portal. If the machine doesn&#8217;t respond, add an alias in your /etc/hosts file, like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">127.0.0.1 &nbsp; localhost yourhostname yourhostname.fullyqualified.com</div></div>
<p>Also think about disabling any firewalls . The install process needs to be able to connect to certain ports running on your machine.<br />
If you let the install run all the way through, and then re enable your firewall after, debugging and adding new firewall exceptions should be way easier. </p>
<p>3. <a href="http://www.torkwrench.com/wp-content/uploads/2009/12/redhat-release">Drop this file in /etc .</a> It will make AppServer think that you are running RHEL<br />
5,  which is a supported OS.</p>
<p>4. Unlink /bin/sh and link it to /bin/bash, like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /bin<br />
unlink sh<br />
ln -s /bin/bash sh</div></div>
<p><a href="http://www.torkwrench.com/2009/05/04/getting-websphere-portal-to-install-on-ubuntu"><br />
Here&#8217;s a more detailed post about why you need to do this, if you are interested.</a></p>
<p>5. Don&#8217;t use sudo ./install.sh, but rather execute sudo su and then run ./install.sh . The installer executes a ConfigEngine.sh task late in the install, and if you use sudo to execute install.sh, the installer will attempt to run the ConfigEngine task as your logged in user, not as root, and the task will fail. </p>
<p>I think you should also be able to run the install as a non root user, I just haven&#8217;t tried it yet, I will post back when I have.</p>
<p>These steps also work with 6101. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2009/12/07/5-steps-to-installing-portal-6-1-5-on-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Creating a Virtualbox guest machine from a physical machine</title>
		<link>http://www.torkwrench.com/2009/09/16/creating-a-virtualbox-guest-machine-from-a-physical-machine/</link>
		<comments>http://www.torkwrench.com/2009/09/16/creating-a-virtualbox-guest-machine-from-a-physical-machine/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 23:49:40 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=144</guid>
		<description><![CDATA[How to create a virtual machine from a physical machine using a Linux live CD and VirtualBox. <a href="http://www.torkwrench.com/2009/09/16/creating-a-virtualbox-guest-machine-from-a-physical-machine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a  Lenovo T60 , which I run Notes and Sametime on. It&#8217;s a nice machine but a pain to have to carry home every day if I want to work at home. </p>
<p><a href="http://www.troyastle.com/">Another guy in the office </a>mentioned that he had converted his work laptop into a VM, so he could work at home on his nice quick desktop machine. I run Ubuntu 9.04 on the laptop and Windows 7 at home.</p>
<p>The T60 has a pretty hectic partitioning scheme, LVM, ext4, encrypted partitions, the whole works. This procedure handled it all. It makes a &#8216;bit for bit&#8217; copy of the drive, and I knew it should work, but am happy it did anyway.</p>
<p>Here&#8217;s how to do it:</p>
<p>1. Boot up using a live cd. I used an Ubuntu 9.04 disk.<br />
2. Grab a external drive bigger that the entire internal drive. The T60 hard drive is only 100GB, so this wasn&#8217;t hard.<br />
3. Use fdisk -l to figure out which drive is which. My internal drive was /dev/sda and the external was /dev/sdb<br />
4. Mount the external drive, if it isn&#8217;t mounted. Let&#8217;s say it&#8217;s mounted at /media/external<br />
5. Run</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;dd if=/dev/sda of=/media/external/drive.img bs=4096</div></div>
<p>If you don&#8217;t have an external drive, <a href="http://www.zdnetasia.com/techguide/disasterrecovery/0,39044895,61955438,00.htm">you could use netcat or scp or something</a>, and send the drive image over the wire instead. It&#8217;ll just be much slower. </p>
<p>6. Reboot the laptop, you don&#8217;t need it anymore.<br />
7. Copy drive.img to the host machine. I&#8217;m running Virtual Box 3.06 on Windows 7.<br />
8. Run this command to convert the raw disk image to a Virtual Box drive image file.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">C:\Program Files\Sun\VirtualBox&gt;VBoxManage.exe convertfromraw \<br />
&nbsp;c:\drive.img c:\users\&lt;username&gt;\.VirtualBox\Machines\laptop\drive.vdi</div></div>
<p>9. Create a new Virtual Box Guest in the usual way, and point it to the vdi file. I used a SATA controller since my laptop has one, but not sure if this matters or not.<br />
10. Boot up your new guest machine. </p>
<p>Hey presto, it&#8217;s the same! Now I don&#8217;t have to carry my laptop home anymore. It seems to run a bit slower than the native machine, but that&#8217;s to be expected.</p>
<p>This would probably work for a Windows physical machine too, although I think you&#8217;d want to add an extra step at the beginning. On the Windows laptop, set the IDE controller to use the Microsoft driver, rather than your default driver before you take the image. That way, when the guest OS boots up, it will have access to a &#8216;lowest common denominator&#8217; disk driver.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2009/09/16/creating-a-virtualbox-guest-machine-from-a-physical-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get your own local copy of the Infocenter</title>
		<link>http://www.torkwrench.com/2009/07/01/how-to-get-your-own-local-copy-of-the-infocenter/</link>
		<comments>http://www.torkwrench.com/2009/07/01/how-to-get-your-own-local-copy-of-the-infocenter/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 02:42:33 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[infocenter]]></category>
		<category><![CDATA[WebSphere Application Server]]></category>
		<category><![CDATA[WebSphere Portal]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=118</guid>
		<description><![CDATA[How to get your own local version of the WebSphere Portal infocenter, in case you can't get to the website. <a href="http://www.torkwrench.com/2009/07/01/how-to-get-your-own-local-copy-of-the-infocenter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If I&#8217;m going out to meet a customer, I&#8217;ll always make sure to have a local copy of the infocenter on hand in case I have to look something up. </p>
<p>Luckily enough, there&#8217;s an easy way to do this. The infocenters for <a href="http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp">WebSphere Application Serve</a>r and <a href="http://publib.boulder.ibm.com/infocenter/wpdoc/v6r1m0/index.jsp">WebSphere Portal</a> are available in Eclipse Help System form, which is pretty much the same way they are presented over the web. </p>
<p>You can download the infocenter in Eclipse Help System format from <a href="http://www-01.ibm.com/software/webservers/appserv/was/library/v70/nd-dp/index.html">this page for WAS</a> and <a href="http://www.ibm.com/developerworks/websphere/zones/portal/proddoc.html">this page for Portal. </a></p>
<p>If you don&#8217;t have Eclipse already, <a href="http://www.eclipse.org/downloads/">download it from here.</a> Any one of the versions should do. Unzip Eclipse and then copy the infocenter zips into the eclipse/plugins directory. Then unzip the infocenter zips in the plugins directory.</p>
<p><img src="http://www.torkwrench.com/wp-content/uploads/2009/07/dump-infocenter.png" alt="dump-infocenter" title="dump-infocenter" width="527" height="475" class="aligncenter size-full wp-image-120" /></p>
<p> Now start Eclipse, and pick any old workspace. Click Help -> Help Contents, and the Infocenter zips that you copied in should be along side any other help files that come with Eclipse originally.</p>
<p><img src="http://www.torkwrench.com/wp-content/uploads/2009/07/infocenters-in.png" alt="infocenters-in" title="infocenters-in" width="693" height="408" class="aligncenter size-full wp-image-121" /><br />
Now you have a local copy, make sure to update it since the infocenter is updated monthly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2009/07/01/how-to-get-your-own-local-copy-of-the-infocenter/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to solve CWWIM4520E on Portal 6.1</title>
		<link>http://www.torkwrench.com/2009/05/27/how-to-solve-cwwim4520e-on-portal-61/</link>
		<comments>http://www.torkwrench.com/2009/05/27/how-to-solve-cwwim4520e-on-portal-61/#comments</comments>
		<pubDate>Wed, 27 May 2009 06:52:20 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[Portal 6.1]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=82</guid>
		<description><![CDATA[How to solve EJPSG0015E, CWWIM4520E by remapping portal attributes to ldap ones. <a href="http://www.torkwrench.com/2009/05/27/how-to-solve-cwwim4520e-on-portal-61/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You may have seen this error if you tried the steps in <a href="http://www.torkwrench.com/2009/04/20/configuring-wcm-email-actions-with-a-local-smtp-server/">&#8220;Configuring WCM email actions with a local SMTP server&#8221;</a>.</p>
<p>When you edit the user&#8217;s properties this nasty error can appear if your Portal server is connected to an LDAP.</p>
<div id="attachment_83" class="wp-caption aligncenter" style="width: 526px"><img class="size-full wp-image-83" title="ldap-error" src="http://www.torkwrench.com/wp-content/uploads/2009/05/ldap-error.png" alt="Error entering mail address into Self Care Portlet" width="516" height="584" /><p class="wp-caption-text">Error entering mail address into Self Care Portlet</p></div>
<p>Btw, this is a 6.1 or Portal.Next beta specific error, it should work fine on 6.0.</p>
<p>Here&#8217;s the full text of the error:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">com.ibm.wps.util.DataBackendException: EJPSG0015E: Data Backend Problem<br />
com.ibm.websphere.wim.exception.WIMSystemException: <br />
CWWIM4520E The 'javax.naming.directory.SchemaViolationException: <br />
[LDAP: error code 65 - Object Class Violation]; <br />
remaining name 'uid=xyzadmin,ou=People,dc=test'; <br />
resolved object com.sun.jndi.ldap.LdapCtx@65aa65aa' <br />
naming exception occurred during processing.</div></div>
<p>The reason this happens is that the portlet ( the self care portlet in this case)  is wired up to write the email address you entered in the form to a <a href="http://www.ibm.com/developerworks/websphere/techjournal/0701_ilechko/0701_ilechko.html">VMM</a> attribute called ibm-primaryEmail . If your ldap schema doesn&#8217;t have a user attribute in it called ibm-primaryEmail , then you&#8217;re going to get an error when you try and write something to it.</p>
<p>Just to check it out, let&#8217;s look at the LDAP schema on this server (which is IBM Tivoli Directory Server 6.0)  . I&#8217;m using the awesome and free <a href="http://directory.apache.org/studio/">Apache Directory Studio </a>to investigate the LDAP schema here.  Once the connection to the ldap is defined, go LDAP -&gt; Open Schema Browser , and select the tab attribute types.</p>
<div id="attachment_85" class="wp-caption aligncenter" style="width: 506px"><img class="size-full wp-image-85" title="schema1" src="http://www.torkwrench.com/wp-content/uploads/2009/05/schema1.png" alt="TDS ldap schema" width="496" height="616" /><p class="wp-caption-text">TDS ldap schema</p></div>
<p>Ok, so we have an attribute type &#8216;drink, favouriteDrink&#8217; ;o) , but no ibm-primaryEmail . No matter, there is a &#8216;mail&#8217; attribute there. We can make Portal use that to save email related attributes.</p>
<p>Open up wkplc.properties and find the section entitled <strong>LDAP Attribute Configuration</strong> (it&#8217;s near the bottom) . Here&#8217;s my completed one:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># Use the following &nbsp;properties to add an attribute mapping between the<br />
# Portal attribute name and the ldap attribute name<br />
<br />
# the name of the attribute in LDAP<br />
standalone.ldap.attributes.mapping.ldapName=mail<br />
<br />
# the name of the attribute in portal<br />
standalone.ldap.attributes.mapping.portalName=ibm-primaryEmail<br />
<br />
# list of entityTypes the mapping should be applied to<br />
standalone.ldap.attributes.mapping.entityTypes=PersonAccount</div></div>
<p>Cool, now run the task :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ConfigEngine.sh wp-update-standalone-ldap-attribute-config</div></div>
<p>If you are using a federated ldap setup, edit the corresponding federated properties instead, and then run the following task:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">ConfigEngine.sh wp-update-federated-ldap-attribute-config</div></div>
<p>. Restart the server and try the form again. It should correctly save the email attribute for the user and you can get on with sending email through Portal. Just for kicks, lets look at what that task did. It just edits the wimconfig file, which defines how VMM interacts . Open wimconfig.xml (wp_profile/config/cells/&lt;cellname&gt;/wim/config/wimconfig.xml) and search for ibm-primaryEmail.</p>
<p>Here is the part that does the mapping:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;config:attributes name=&quot;mail&quot; propertyName=&quot;ibm-primaryEmail&quot;&gt;<br />
&lt;config:entityTypes&gt;PersonAccount&lt;/config:entityTypes&gt;<br />
&lt;/config:attributes&gt;</div></div>
<p>So the task is really just a (welcome) convenience, all it does it edit the xml file for you. Anyone who has tried to set up multirealms on 6.0 would be grateful for that!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2009/05/27/how-to-solve-cwwim4520e-on-portal-61/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ERRORCODE=-4214, SQLSTATE=28000 from DB2 on Ubuntu</title>
		<link>http://www.torkwrench.com/2009/05/04/errorcode-4214-sqlstate28000-from-db2-on-ubuntu/</link>
		<comments>http://www.torkwrench.com/2009/05/04/errorcode-4214-sqlstate28000-from-db2-on-ubuntu/#comments</comments>
		<pubDate>Mon, 04 May 2009 06:36:46 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[db2]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[portal]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=59</guid>
		<description><![CDATA[Connection authorization failure occurred.  Reason: Local security service non-retryable error. ERRORCODE=-4214, SQLSTATE=28000 is a common error when using DB2 on newer versions of Ubuntu. This post describes how to fix this problem. <a href="http://www.torkwrench.com/2009/05/04/errorcode-4214-sqlstate28000-from-db2-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Two posts in one day, wow. It&#8217;s all part of our special series: how to install and configure WebSphere Portal 6.1 on Ubuntu. This isn&#8217;t a Portal only issue, rather it&#8217;s a DB2+Ubuntu issue.</p>
<p>After getting Portal installed on this Ubuntu machine, you&#8217;re probably going to want to transfer the default Derby database to something more robust like DB2. So you edit wkplc_comp.properties and wkplc_dbtype.properties, and start to run:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">./ConfigEngine.sh create-database</div></div>
<p>And you get this in the ConfigTrace.log</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; [sqlproc] action: execute-sql-scripts<br />
&nbsp; [sqlproc] _________________________________________________________<br />
&nbsp; [sqlproc] Database autocommit parameter true<br />
&nbsp; [sqlproc] No delimiter has been specified, using [;] to separate the SQL statements.<br />
&nbsp; [sqlproc] Reading file /opt/WebSphere/wp_profile/ConfigEngine/config/database/work/db2/createBufferpools.run<br />
&nbsp; [sqlproc] Could not connect to database<br />
&nbsp; [sqlproc] com.ibm.db2.jcc.b.ao: [jcc][t4][2010][11246][3.53.70] Connection authorization failure occurred. &nbsp;Reason: Local security service non-retryable error. ERRORCODE=-4214, SQLSTATE=28000<br />
BUILD FAILED</div></div>
<p>Hmm, ok, I thought db2 was working. A good habit when debugging these things is to take the piece that ConfigEngine is trying run and run it independently. So right now I want ConfigEngine to create an empty db2 database that I can run database-transfer against. Try this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">su - db2inst1<br />
db2 create db WP610 using codeset UTF8 territory au pagesize 8192</div></div>
<p>And that comes back successfully. However, that command sequence is not an accurate representation of what ConfigEngine is actually doing. We&#8217;re running ConfigEngine as root. But the ConfigEngine script is using the &#8220;user db2inst1 using
<password>&#8221; modifiers on the end of the database create command. So how about this?</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">db2 create db WP610 using codeset UTF8 territory au pagesize 8192 user db2inst1 using password<br />
SQL30082N &nbsp;Security processing failed with reason &quot;15&quot; (&quot;PROCESSING FAILURE&quot;). <br />
SQLSTATE=08001</div></div>
<p>Ah ha, a failure. In the first example, DB2 already trusts the user that we&#8217;re logged is as (db2inst1), so it doesn&#8217;t need to go back to the operating system and authenticate it. In the second example, we are logged in as root, so db2 needs to go to the operating system and authenticate the user. Ubuntu uses the tried and true passwd + shadow file combo to store usernames and their associated passwords. The trouble is since Ubuntu 8.10, it uses the newer and more secure SHA512 hashing function to store the passwords, and DB2 doesn&#8217;t understand SHA512. So the workaround is to change the hashing function in use on the machine, reset the password and then we should be able to use the &#8220;user db2inst1 using
<password>&#8221; type commands again.</p>
<p>Open /etc/pam.d/common-password in a text editor and change this line:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">password &nbsp; &nbsp; &nbsp; &nbsp;[success=1 default=ignore] &nbsp; &nbsp; &nbsp;pam_unix.so obscure&lt;strong&gt; sha512&lt;/strong&gt;</div></div>
<p>to</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">password &nbsp; &nbsp; &nbsp; &nbsp;[success=1 default=ignore] &nbsp; &nbsp; &nbsp;pam_unix.so obscure &lt;strong&gt;md5&lt;/strong&gt;</div></div>
<p>Then run passwd db2inst1 and put the same or a new password. If you look at the shadow file , the hash will change from something like this:<br />
SHA512</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">db2inst1:$6$IKe6x6Zq$bSajPzHNIy7jQrPXbI8CrPRlpDYUVm8.A2BhNCxes5cY6LWoh7hQr14XW4agBWbW1ywKkSSDSLFV.NXCr2/1z0:14368:0:99999:7:::</div></div>
<p>MD5</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">db2inst1:$1$FF0YDtZn$gemqCKt4Ml375mhiBXk2U/:14368:0:99999:7:::</div></div>
<p>(The unencrypted password here is &#8216;password&#8217; &#8211; don&#8217;t get too excited!) .</p>
<p>Now try running <strong>ConfigEngine.sh create-database</strong> again. It should work. Make sure you change the system /etc/pam.d/common-password back to sha512, as you want the rest of your users to use this hashing function as it is more secure than md5sum . Hopefully DB2 should address this in a fixpack.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2009/05/04/errorcode-4214-sqlstate28000-from-db2-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
