Tips for changing your Portal datasources

For some reason, we’ve got a test system that is hooked up to a db2 database that is using DHCP. This would be ok if Portal was configured to talk to the hostname of the database server, but it’s using the IP. So the inevitable happened and the IP of the database changed and the Portal server went down.

So the obvious fix is to change the datasource so it’s using the hostname of the database server, rather than the ip (or set a static IP for the database server, but that wouldn’t really require a whole blog post now would it!).

To do this, fire up the WAS admin console and navigate to datasources.

datasources

Your list of datasources might be different to mine, depending on your database, but the principles are the same.

Go into each datasource and at the bottom you will see a properties dialog. Change the old IP to a hostname.

change the IP to a hostname

change the IP

All of them need to be changed, so go back into each one and change it. Now run the test, by selecting each one and clicking the test connection button.

You should get a message like this:

successful test connection message

successful test connection message

Now start Portal. Hmm, I get this when I try to go to the site….

” Error 404: Initialization of one or more services failed. ”

Check the SystemOut.log :

Caused by: com.ibm.websphere.ce.cm.StaleConnectionException: [ibm][db2][jcc][t4][2043][11550] Exception java.net.SocketException: Error opening socket to server /9.185.226.121 on port 50,000 with message: Operation timed out: connect:could be due to invalid address.DSRA0010E: SQL State = null, Error Code = -4,499

at sun.reflect.GeneratedConstructorAccessor64.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:522)

at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapExceptionHelper(GenericDataStoreHelper.java:523)

at com.ibm.websphere.rsadapter.GenericDataStoreHelper.mapException(GenericDataStoreHelper.java:578)

at com.ibm.ws.rsadapter.AdapterUtil.mapException(AdapterUtil.java:2159)

... 11 more

Hang on, the datasource test worked? Why won’t the server start? It looks like it’s using the old database server IP still!

The answer lies in the transaction logs that WAS uses. These binary log files contain XA transactions that might not have been executed yet. You should take care when messing about with these files – they are there for a reason. But on the other hand, the server won’t start now, so we can hardly make things worse, can we :o) . Stop the server1 and WebSphere_Portal application servers and go to your wp_profile directory. Delete the contents of the tranlog and recoverylogs directories and try to start the server again.

This message should appear in SystemOut :

[4/08/09 15:23:16:825 EST] 00000012 LogHandle I CWRLS0007I: No existing recovery log files found in C:/WebSphere/wp_profile\tranlog\win61\win61\WebSphere_Portal\transaction\tranlog. Cold starting the recovery log.

[4/08/09 15:23:16:825 EST] 00000012 LogFileHandle I CWRLS0006I: Creating new recovery log file C:/WebSphere/wp_profile\tranlog\win61\win61\WebSphere_Portal\transaction\tranlog\log1.

[4/08/09 15:23:16:841 EST] 00000012 LogFileHandle I CWRLS0006I: Creating new recovery log file C:/WebSphere/wp_profile\tranlog\win61\win61\WebSphere_Portal\transaction\tranlog\log2.

[4/08/09 15:23:16:856 EST] 00000012 LogHandle I CWRLS0007I: No existing recovery log files found in C:/WebSphere/wp_profile\tranlog\win61\win61\WebSphere_Portal\transaction\partnerlog. Cold starting the recovery log.

[4/08/09 15:23:16:856 EST] 00000012 LogFileHandle I CWRLS0006I: Creating new recovery log file C:/WebSphere/wp_profile\tranlog\win61\win61\WebSphere_Portal\transaction\partnerlog\log1.

[4/08/09 15:23:16:856 EST] 00000012 LogFileHandle I CWRLS0006I: Creating new recovery log file C:/WebSphere/wp_profile\tranlog\win61\win61\WebSphere_Portal\transaction\partnerlog\log2.

[4/08/09 15:23:16:903 EST] 00000012 RecoveryManag A WTRN0028I: Transaction service recovering 0 transactions.

Success, now the server will start up!

Posted in tip | Tagged , , | Leave a comment

Best comment spam ever

Astonishing indeed! I don’t get this sort of comment spam. What’s the payoff for these people? There’s no links in the post!

edit-comments

Posted in Uncategorized | Leave a comment

How to get your own local copy of the Infocenter

If I’m going out to meet a customer, I’ll always make sure to have a local copy of the infocenter on hand in case I have to look something up.

Luckily enough, there’s an easy way to do this. The infocenters for WebSphere Application Server and WebSphere Portal are available in Eclipse Help System form, which is pretty much the same way they are presented over the web.

You can download the infocenter in Eclipse Help System format from this page for WAS and this page for Portal.

If you don’t have Eclipse already, download it from here. 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.

dump-infocenter

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.

infocenters-in
Now you have a local copy, make sure to update it since the infocenter is updated monthly.

Posted in howto | Tagged , , , | 3 Comments

DB2 and ConfigEngine : Security mechanism not supported

I try to post really random solutions here, and this one’s a doozy ! I was updating a production machine from Portal 6.1.0 to 6.1.0.2. I always run the ConfigEngine tasks validate-standalone-ldap and validate-database-connection before I run any Portal update to make sure that the update won’t fail from something silly like a missing password. I’d highly recommend this practice on your Portal systems.
This time when running validate-database-connection, I ran into this error:


action-validate-database:
[echo] domain 'jcr'
[echo] DbtDbDriver 'com.ibm.db2.jcc.DB2Driver'
[echo] DbtDbLibrary '/home/db2inst1/sqllib/java/db2jcc.jar:/home/db2inst1/sqllib/java/db2jcc_license_cu.jar'
[echo] DbtDbUser 'db2inst1'
[echo] DbtDbUrl 'jdbc:db2://localhost:50000/WPS6TCP'
[echo] DbtDbName 'WPS6TCP'
[java] [06/28/09 13:47:09.620 EST] Attempting to make connection using: jdbc:db2://localhost:50000/WPS6TCP :: db2inst1 :: PASSWORD_REMOVED
[java] [06/28/09 13:47:09.875 EST] ERROR: Error obtaining connecting for jdbc:db2://localhost:50000/WPS6TCP
[java] com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][t4][201][11237] Connection authorization failure occurred. Reason: Security mechanism not supported.
[java] at com.ibm.db2.jcc.a.b.m(b.java:1981)
[java] at com.ibm.db2.jcc.a.b.a(b.java:1565)
[java] at com.ibm.db2.jcc.a.bb.b(bb.java:3386)
[java] at com.ibm.db2.jcc.a.bb.a(bb.java:332)
[java] at com.ibm.db2.jcc.a.bb.a(bb.java:112)
[java] at com.ibm.db2.jcc.a.b.j(b.java:1259)
[java] at com.ibm.db2.jcc.a.b.b(b.java:1132)
[java] at com.ibm.db2.jcc.a.b.b(b.java:715)
[java] at com.ibm.db2.jcc.a.b.a(b.java:701)
[java] at com.ibm.db2.jcc.a.b.a(b.java:378)
[java] at com.ibm.db2.jcc.a.b.(b.java:316)
[java] at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:166)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:572)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:165)
[java] at com.ibm.wps.config.db.Database.init(Database.java:139)
[java] at com.ibm.wps.config.db.validation.ValidationDriver.main(ValidationDriver.java:209)

It looked like the problem I’d seen on Ubuntu, where the database password was hashed with an unsupported scheme, but it couldn’t be, because this was on a plain old RHEL system. The difference was that I’d recently changed DB2’s database manager settings from AUTHENTICATION = SERVER to AUTHENTICATION = DATA_ENCRYPT . DATA_ENCRYPT is good because it will send your sql data and your authentication details encrypted across the wire.

Anyway, to make the validation work on a system where you have enabled the DATA_ENCRYPT parameter, just add securityMechanism=13; to the end of the database url. So mine becomes:

jcr.DbUrl=jdbc:db2://localhost:50000/WP6TCP:securityMechanism=13;

So how would the system work in any case, if the database url was wrong?!? The answer is clear after delving into the WebSphere admin console a little bit. I’d configured the custom properties of each Portal datasource post database transfer to work with DATA_ENCRYPT, but not the database urls in wkplc_comp.properties. Here’s where you would set it.

data_encrypt

It is important to emphasize that the wkplc*.properties file in ConfigEngine are templates only, and don’t affect the running of the system, until you run a ConfigEngine task against them. Only then do their values get copied to the actual Portal server.

Posted in Uncategorized | Tagged , , , | Leave a comment

How to solve CWWIM4520E on Portal 6.1

You may have seen this error if you tried the steps in “Configuring WCM email actions with a local SMTP server”.

When you edit the user’s properties this nasty error can appear if your Portal server is connected to an LDAP.

Error entering mail address into Self Care Portlet

Error entering mail address into Self Care Portlet

Btw, this is a 6.1 or Portal.Next beta specific error, it should work fine on 6.0.

Here’s the full text of the error:

com.ibm.wps.util.DataBackendException: EJPSG0015E: Data Backend Problem
com.ibm.websphere.wim.exception.WIMSystemException:
CWWIM4520E The 'javax.naming.directory.SchemaViolationException:
[LDAP: error code 65 - Object Class Violation];
remaining name 'uid=xyzadmin,ou=People,dc=test';
resolved object com.sun.jndi.ldap.LdapCtx@65aa65aa'
naming exception occurred during processing.

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 VMM attribute called ibm-primaryEmail . If your ldap schema doesn’t have a user attribute in it called ibm-primaryEmail , then you’re going to get an error when you try and write something to it.

Just to check it out, let’s look at the LDAP schema on this server (which is IBM Tivoli Directory Server 6.0)  . I’m using the awesome and free Apache Directory Studio to investigate the LDAP schema here.  Once the connection to the ldap is defined, go LDAP -> Open Schema Browser , and select the tab attribute types.

TDS ldap schema

TDS ldap schema

Ok, so we have an attribute type ‘drink, favouriteDrink’ ;o) , but no ibm-primaryEmail . No matter, there is a ‘mail’ attribute there. We can make Portal use that to save email related attributes.

Open up wkplc.properties and find the section entitled LDAP Attribute Configuration (it’s near the bottom) . Here’s my completed one:


# Use the following properties to add an attribute mapping between the
# Portal attribute name and the ldap attribute name

# the name of the attribute in LDAP
standalone.ldap.attributes.mapping.ldapName=mail

# the name of the attribute in portal
standalone.ldap.attributes.mapping.portalName=ibm-primaryEmail

# list of entityTypes the mapping should be applied to
standalone.ldap.attributes.mapping.entityTypes=PersonAccount

Cool, now run the task :

ConfigEngine.sh wp-update-standalone-ldap-attribute-config

If you are using a federated ldap setup, edit the corresponding federated properties instead, and then run the following task: ConfigEngine.sh wp-update-federated-ldap-attribute-config . 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/<cellname>/wim/config/wimconfig.xml) and search for ibm-primaryEmail.

Here is the part that does the mapping:


PersonAccount

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!

Posted in howto | Tagged , , , | 5 Comments

W00t! Portal.Next beta available!

Been working on this one for a while. Download it here.

If you’re a Linux person, I’d wait for the VMWare images to come out, as they’ll be Linux based installs.

Posted in Uncategorized | Leave a comment

ERRORCODE=-4214, SQLSTATE=28000 from DB2 on Ubuntu

Updated 28th October, 2010
Newer versions of DB2 address this problem. Read about it here.

Two posts in one day, wow. It’s all part of our special series: how to install and configure WebSphere Portal 6.1 on Ubuntu. This isn’t a Portal only issue, rather it’s a DB2+Ubuntu issue.

After getting Portal installed on this Ubuntu machine, you’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:


./ConfigEngine.sh create-database

And you get this in the ConfigTrace.log


[sqlproc] action: execute-sql-scripts
[sqlproc] _________________________________________________________
[sqlproc] Database autocommit parameter true
[sqlproc] No delimiter has been specified, using [;] to separate the SQL statements.
[sqlproc] Reading file /opt/WebSphere/wp_profile/ConfigEngine/config/database/work/db2/createBufferpools.run
[sqlproc] Could not connect to database
[sqlproc] com.ibm.db2.jcc.b.ao: [jcc][t4][2010][11246][3.53.70] Connection authorization failure occurred. Reason: Local security service non-retryable error. ERRORCODE=-4214, SQLSTATE=28000
BUILD FAILED

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:

su - db2inst1
db2 create db WP610 using codeset UTF8 territory au pagesize 8192

And that comes back successfully. However, that command sequence is not an accurate representation of what ConfigEngine is actually doing. We’re running ConfigEngine as root. But the ConfigEngine script is using the “user db2inst1 using ” modifiers on the end of the database create command. So how about this?

db2 create db WP610 using codeset UTF8 territory au pagesize 8192 user db2inst1 using password
SQL30082N Security processing failed with reason "15" ("PROCESSING FAILURE").
SQLSTATE=08001

Ah ha, a failure. In the first example, DB2 already trusts the user that we’re logged is as (db2inst1), so it doesn’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’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 “user db2inst1 using ” type commands again.

Open /etc/pam.d/common-password in a text editor and change this line:


password [success=1 default=ignore] pam_unix.so obscure sha512

to

password [success=1 default=ignore] pam_unix.so obscure md5

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:
SHA512

db2inst1:$6$IKe6x6Zq$bSajPzHNIy7jQrPXbI8CrPRlpDYUVm8.A2BhNCxes5cY6LWoh7hQr14XW4agBWbW1ywKkSSDSLFV.NXCr2/1z0:14368:0:99999:7:::

MD5

db2inst1:$1$FF0YDtZn$gemqCKt4Ml375mhiBXk2U/:14368:0:99999:7:::

(The unencrypted password here is ‘password’ – don’t get too excited!) .

Now try running ConfigEngine.sh create-database 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.

Posted in howto | Tagged , , , | 8 Comments

Getting WebSphere Portal to install on Ubuntu

Ok, ok, I know Ubuntu isn’t supported by IBM, but if you’re a developer, and you run Ubuntu on your laptop and would like to run Portal on there too, here’s how you do it. This should work for Debian too . I guess this isn’t really a Portal only problem, rather it’s a general Application Server + Ubuntu issue. I’ve only tried this with 6.1, but it is probably an issue with 6.0 as well, since it uses similar profile creation code.

For some reason Ubuntu, ships a shell called ‘dash’ as their default, rather than good old bash. (Well, they have their reasons.) This presents a problem for App Server, as all the scripts in AppServer/bin use #!/bin/sh (the Bourne shell) as their command interpreter, which on a Redhat machine is symlinked to /bin/bash . The reason why AppServer uses the Bourne shell is that it needs to work on AIX and Solaris too, and you can’t be sure that you have bash on one of those machines.

If you try to call wsadmin.sh on an Ubuntu system you get this error :

/opt/WebSphere/AppServer/bin/wsadmin.sh: 116: Bad substitution

Now, when you’re installing Portal, it installs AppServer, and then calls the manageprofile.sh script to create the default profile for Portal “wp_profile” . Manageprofile.sh calls a bunch of ant scripts that needs to use wsadmin.sh (you can see where I’m going here….) . You might notice in AppServer/log/wp_profile_create.log messages like this :


Checking for wsadmin listener initialization
Is wsadmin listener available? ? false
Returning with returnCode=-1
Failure detected in fatal config action.
wsadmin failed with exception = wsadmin task failed with return code :-1

It actually hangs for 20 minutes waiting for wsadmin to start!

So how do you fix it? Simply, before you install it, unlink /bin/sh -> /bin/dash , and relink so it reads /bin/sh -> /bin/bash

Carefully:

cd /bin
unlink sh
ln -s /bin/bash sh

Now the install should run properly.

Posted in howto | Tagged , , , , , , | 29 Comments

Configuring WCM email actions with a local SMTP server

Wow, here goes, a post about WCM!

We often need to set up simple email system to test WCM’s email action. This feature is used in workflow. The system can be configured to email a user when they need to approve content to move to the next workflow stage, for example.

I like to set up a local smtp/pop3 server on the same machine that Portal is running on, then we don’t have to worry about DNS or MX records or anything nasty like that and can focus on the WCM features. This could be useful for you if you need to run a demo or something all on the same machine.

I did these steps on a Redhat 5 machine. My server’s fully qualified hostname is narrabeen.ilwwcm.au.ibm.com , for those following along at home.

First install postfix and dovecot . They are simple and secure and do just what we want. If you are familiar with another MTA, like sendmail, just use that instead.

yum install postfix dovecot ; yum remove sendmail

or for the non yum users out there

rpm -Uvh postfix.rpm dovecot.rpm ; rpm -e sendmail

Note that you should remove sendmail after you install postfix otherwise rpm will complain about dependency issues.

Dovecot works completely out of the box, just run :

service dovecot start

And test it from your machine by trying to telnet to port 110 on the server.

Cool, lets make some local users that we can send mail to.

useradd user1 ; passwd user1
useradd adminuser ; passwd adminuser

This creates local mailboxes on the server that we will address later as : <user>@<fullyqualifieddomainname> . In my case these addresses are user1@narrabeen.ilwwcm.au.ibm.com and adminuser@narrabeen.ilwwcm.au.ibm.com . Please note that WCM will not forward to user@localhost type addresses, so you will need to address your mail to a ‘proper’ domain.

Now the WCM part. Open your WCMConfigService.properties file. I am using 6.1.0.1 at the moment, but this is valid for any version of WCM. The config file named differently in 5.1 (connect.cfg), and located somewhere else (under Portal Home instead of in the profile) in 6.0, but the properties are quite similar. On 6.1 this is located in [PROFILE_PATH]/PortalServer/wcm/shared/app/config/wcmservices/WCMConfigService.properties
We are concerned with this paragraph:

# workflow - SMTP Mail Setup
connect.connector.mailconnector=defaultsmtpserver,defaultfromaddress,defaultreplytoaddress
connect.connector.mailconnector.defaultsmtpserver=mail.yourmailserver.com
connect.connector.mailconnector.defaultfromaddress=admin@yourmailserver.com
connect.connector.mailconnector.defaultreplytoaddress=admin@yourmailserver.com

Change mail.yourserver.com to your mail server , and the default addresses to adminuser@yourmailserver.com . The defaultfromaddress will be the user that WCM will send the mail as. You should make this a real address so if the user replies to the email, it won’t go bouncing around your email system for days. Restart Portal to make those changes take effect .

Now we need to link users in Portal to the email addresses we have created. Load up Portal, log in as your admin user and go to Administration -> Users and Groups .

Create a new user and enter the email address.

Entering Admin email address

Entering Admin email address

Edit your admin user too, and assign it the email address admin@localhost, which you created earlier.

Create a new library and assign the user manager access to the library. Go to the authoring portlet, click configure and select the library you just created. Logout and log in as the new user.

Now you’ll have to create all the basic stuff before you can create content. Start with the email action and enable all the options, so it will send an email to every account involved in the process. Now add the email action to the ‘entry’ section of the first workflow stage and add the workflow stage to a workflow. Create a presentation template, authoring template, site, site area and finally a piece of content. It should be in the draft stage now. Since the email action is in the entry section, it will be fired every time we create new content, which is good for testing the email action.

Email action on the first workflow stage

Email action on the first workflow stage

Configure up your POP3 client of choice and point it to your Portal/email server using the admin username and password (since the admin user will need to approve the content). I am using the excellent Thunderbird for this purpose. If everything has gone well, we should see an email sitting in Thunderbird.

Ding, new content to be approved!

Ding, new content to be approved!

As you can see, the email that appears is from wcmadmin@narrabeen.ilwwcm.au.ibm.com , which is the value I used for “defaultfromaddress” in the WCMConfigService.properties file.

What if it doesn’t work ? Email is like a series of tubes (with apologies to Ted Stevens) . You need to check that the email is being generated by WCM, and then if WCM is sending it to the right place, and *then* if postfix is sending it to dovecot. SystemOut doesn’t log emails that are sent out so it can be difficult to debug. This trace string is your friend if you’re not sure where to start. It should log WCM’s attempt to send the mail to postfix.

*=info: com.presence.connect.connector.*=all: com.aptrix.pluto.workflow.actions.EmailAction=all

To use the trace string, go to Administration -> Portal Analysis -> Enable Tracing and copy the trace string into the box. A trace.log file should appear in [PROFILE_ROOT]/logs/WebSphere_Portal/

If WCM is sending the email properly, you will see something like this in the trace.log :


[4/20/09 12:14:13:195 EST] 000001fa EmailAction 3 WorkflowAction EmailAction is adding "adminuser@narrabeen.ilwwcm.au.ibm.com" to list of recipients for mailtest7
[4/20/09 12:14:13:302 EST] 000001fa MailConnectio 3 MailConnector: Getting new SMTP transport
[4/20/09 12:14:13:680 EST] 000001fa MailConnectio 3 MailConnector: Mail Sent!

If the mail is still not turning up in the mailbox, we need to turn our attention to /var/log/maillog . By default both dovecot and postfix will log to this file.


Apr 20 10:47:11 narrabeen postfix/smtpd[25554]: connect from narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 10:47:11 narrabeen postfix/smtpd[25554]: 1DB7D798040: client=narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 10:47:11 narrabeen postfix/cleanup[25557]: 1DB7D798040: message-id=<1803316092.1240188430966.JavaMail.root@narrabeen>
Apr 20 10:47:11 narrabeen postfix/qmgr[30835]: 1DB7D798040: from=, size=1146, nrcpt=1 (queue active)
Apr 20 10:47:11 narrabeen postfix/smtpd[25554]: disconnect from narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 10:47:11 narrabeen postfix/smtp[25558]: 1DB7D798040: to=, relay=none, delay=0.19, delays=0.08/0.11/0/0, dsn=5.4.6, status=bounced (mail for narrabeen.ilwwcm.au.ibm.com loops back to myself)

I had this problem when trying to set this up. Postfix does a number of checks to figure out whether to relay the mail to another mail server, or to keep it on the local server and route it to a local user. We want it to do the latter.
We need to change the value mydestination so it matches the mail server address we are using (everything to the right of the @ symbol in the email address) . Additionally we should change mynetworks_style from subnet (the default) to host, as we don’t want postfix to accept mail from any other host in our subnet or not.
If your postfix server is on a different machine to portal, you’d obviously skip this step.

mydestination = $myhostname, localhost.$mydomain, narrabeen.ilwwcm.au.ibm.com
mynetworks_style = host

To make these changes take effect run:

service postfix restart

Now create a new piece of content. Tailing /var/log/maillog helps to make sure the mail is correctly hitting postfix.

pr 20 12:14:13 narrabeen postfix/smtpd[29334]: connect from narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 12:14:13 narrabeen postfix/smtpd[29334]: 9B60D798040: client=narrabeen.ilwwcm.au.ibm.com[127.0.0.1]
Apr 20 12:14:13 narrabeen postfix/cleanup[29337]: 9B60D798040: message-id=<1790995136.1240193653304.JavaMail.root@narrabeen>
Apr 20 12:14:13 narrabeen postfix/qmgr[26483]: 9B60D798040: from=, size=1142, nrcpt=2 (queue active)
Apr 20 12:14:13 narrabeen postfix/local[29338]: 9B60D798040: to=, relay=local, delay=0.17, delays=0.05/0.09/0/0.04, dsn=2.0.0, status=sent (delivered to mailbox)

Jackpot!

Another useful command to use when debugging postfix is postconf -n , which will print all the parameters that are currently in effect for the server.

Well, hope that made some sense, send me a message and let me know how you went.

Posted in howto | Tagged , , , , | 1 Comment

java.lang.UnsatisfiedLinkError: /opt/WebSphere/AppServer/java/jre/bin/libawt.so: libXmu.so.6

Excuse me for titling a post with an exception! Now that I have your attention…..

I’m doing a bit of work on Portal 6.0.  for a customer, and have installed my test environment on Redhat Enterprise 5.3 . I don’t often use a GUI for these machines and sometimes run into problems. On this one I ran the configure-wcm-authoring WPSConfig.sh task but navigated to the WCM Authoring Portlet and found a blank page. The portlet was on the page, but it wasn’t being rendered. A quick look through the SystemErr.log show the culprit:

[4/1/09 16:10:39:329 EST] 00000084 SystemErr     R java.lang.UnsatisfiedLinkError: /opt/WebSphere/AppServer/java/jre/bin/libawt.so: libXmu.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2144)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2004)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:910)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:76)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java(Compiled Code))
at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:81)
at java.awt.Color.<clinit>(Color.java:280)
at com.ibm.psw.uil.nls.UilCommonResources.<clinit>(UilCommonResources.java:246)
at com.ibm.psw.uil.util.UilStatusInfoHelper$ESIData.<init>(UilStatusInfoHelper.java:1153)
at com.ibm.psw.uil.util.UilStatusInfoHelper.<clinit>(UilStatusInfoHelper.java:997)
at com.ibm.psw.wcl.components.table.WTable.createDefaultClassComparators(WTable.java:1007)
at com.ibm.psw.wcl.components.table.WTable.<init>(WTable.java:733)
at com.ibm.psw.wcl.components.table.WTable.<init>(WTable.java:707)
at com.ibm.psw.wcl.components.table.WTable.<init>(WTable.java:664)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WBasicTable.<init>(WBasicTable.java:80)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WRepositoryBrowserTable.<init>(WRepositoryBrowserTable.java:131)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WRepositoryBrowser.createTable(WRepositoryBrowser.java:304)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WRepositoryBrowser.initialise(WRepositoryBrowser.java:210)
at com.ibm.workplace.wcm.app.ui.portlet.widget.WRepositoryBrowser.<init>(WRepositoryBrowser.java:127)
at com.ibm.workplace.wcm.app.ui.portlet.core.view.MainRepositoryFormView.getRepositoryBrowser(MainRepositoryFormView.java:383)
at com.ibm.workplace.wcm.app.ui.portlet.core.view.MainRepositoryFormView.getRepositoryBrowserTable(MainRepositoryFormView.java:435)
at com.ibm.workplace.wcm.app.ui.portlet.basic.PageManager.getRepositoryTable(PageManager.java:468)

WRepositoryBrowser is the class that renders the main view of the authoring portlet. Looks like it requires some extra packages to work if you haven’t installed xorg with your Redhat Server. A quick search of pbone.net reveals I need two additional packages: libXmu-1.0.2-5.i386.rpm and libXtst-1.0.1-3.1.i386.rpm .  I always install compat-libstdc++-296, compat-libstdc++-33 and libXp on Redhat 5 machines as well. (I think if you don’t have  libXp you get a pretty similar error). I hadn’t seen this specific one before, I think it’s because I used the ‘skipx’ directive in the kickstart file for the machine. Long story short, install those packages on your headless redhat machine.

I think this problem isn’t limited to Portal either. When I was trying to install IBM Http Server on the same machine, I kept getting the same error when the Install Shield installer would load (in -console mode, no less), so I guess it would be good to install these packages whenever you’re going to use Java Apps and use the skipx parameter.

Posted in howto | Tagged , , , | Leave a comment