Friday, 28 February 2014

Hmmm, Mac OS X, one problem fixed, another one pops up ?

So, a few days ago, I posted this: -


about a problem that I was seeing with kernel_task taking >80% CPU on my Mac, whilst running OS X 10.9.1.

For me, quitting iTunes appeared to resolve the problem.

Then, earlier this week, Apple released OS X 10.9.2 to resolve a problem with the so-called Goto Fail bug.

This was also supposed to resolve the problem with kernel_task, and, I must admit, I've not seen that since.

However, I have seen a few issues with the Mac failing to properly resume from suspend ( in other words, wake up when I open the lid ).

Well, the Mac Crash Reporter did pop up earlier today, with this: -

Date/Time:       2014-02-28 06:18:01 +0000
OS Version:      10.9.2 (Build 13C64)
Architecture:    x86_64
Report Version:  18

Event:           Sleep Wake Failure
Steps:           0

Hardware model:  MacBookPro10,1
Active cpus:     8

================================================================
Code: 0x13006c00�                                                                                  
Model: MacBookPro10,1, BootROM MBP101.00EE.B02, 4 processors, Intel Core i7, 2.3 GHz, 16 GB, SMC 2.3f36
Graphics: Intel HD Graphics 4000, Intel HD Graphics 4000, Built-In, 1024 MB
Graphics: NVIDIA GeForce GT 650M, NVIDIA GeForce GT 650M, PCIe, 1024 MB
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x80AD, 0x484D5434314753364D465238432D50422020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xEF), Broadcom BCM43xx 1.0 (5.106.98.100.22)
Bluetooth: Version 4.2.3f10 13477, 3 services, 15 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM256E, 251 GB
USB Device: Hub
USB Device: FaceTime HD Camera (Built-in)
USB Device: Hub
USB Device: Hub
USB Device: Apple Internal Keyboard / Trackpad
USB Device: BRCM20702 Hub
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 23.4


This came up after I'd had to power on the Mac, as it was failing to awaken ( I didn't try and kiss it; perhaps I should've done so ?? )

I've sent the report off to Apple, let's see what happens :-)

IBM PureApplication System - IBM Connections in The Cloud

So I'm busy learning IPAS this week, getting to grips with the tools necessary to build private/hybrid clouds and also enable Developer Operations (DevOps), providing automation at all levels, from infrastructure build and operations through to development artefact automated deployment through environments.

One thing that I've seen that brings my old ( IBM Software Services for Collaboration ) and new ( IBM Software Services for WebSphere ) worlds together is this: -


IBM Connections Hypervisor Edition 4.0 supports deployment of IBM Connections 4.0 virtual images into virtualized environments. 

• Includes IBM Connections 4.0 and the Red Hat Enterprise Linux Server operating system as a system pattern for use with IBM PureApplication System
• Can be distributed to easily deploy and manage social business solutions in a private cloud
• Helps reduce installation and configuration time to rapidly deploy social business solutions

Using IBM Connections Hypervisor Edition 4 enables better utilization of hardware and faster response to demands for newly deployed systems. This can help to reduce both hardware and software operation costs, and maintenance costs. By deploying virtual images, businesses can also ensure that systems are built with a known, stable, and tested configuration, reducing the potential for errors and ensuring rapid deployment of a working system, whether for development, test, or production. 


Shiny :-)

It's also worth noting this as well: -


IBM Web Experience Patterns for WebSphere Portal Server provides preinstalled, preconfigured images of IBM WebSphere Portal Server V8.0.0.1 to automate provisioning of web experience solutions in a private cloud. 
                                                                                                                                                  
• Optimized to run on top of a hypervisor, including the ones in the PureApplication System to drive better utilization of hardware and faster response to demands for web experience systems, reducing deployment time from months or weeks to minutes.
• Includes new WebSphere Portal and Web Content Manager patterns and script packages based on expert practices, including single server and multiserver clustered deployments that can further automate setup of simple to complex web experience deployments.
                                                                                                          
• New social software  patterns automate integration and provisioning of WebSphere Portal with IBM Connections Files and Profiles.
• Enables rapid setup and use of fixpacks and solution updates to Web Experience Patterns for WebSphere Portal solutions.
• IBM Web Experience Patterns for WebSphere Portal Server Hypervisor Edition is charged using a Processor Value Unit metric


Another in the list of things I did not know - IBM Installation Manager has a console mode :-)

Yes, that's right, if you really need to do stuff with IM and don't (yet) have a response file, this is a good way to get into IIM without needing a GUI.

For me, this is useful because my VM is on an IBM PureApplication System (IPAS) half-way across the world, and I'm on a slow ADSL connection.

This is how you start it: -

$ /opt/IBM/BPM/InstallationManager/eclipse/tools/imcl -consoleMode

and this is what you see: -

=====> IBM Installation Manager

Select:
     1. Install - Install software packages
     2. Update - Find and install updates and fixes to installed software packages
     3. Modify - Change installed software packages
     4. Roll Back - Revert to an earlier version of installed software packages
     5. Uninstall - Remove installed software packages

Other Options:
     L. View Logs
     S. View Installation History
     V. View Installed Packages
        ------------------------
     P. Preferences
        ------------------------
     A. About IBM Installation Manager
        ------------------------
     X. Exit Installation Manager

——> 


I specifically wanted to see which repositories IIM "knew" about, so I jumped into Preferences ( with a P, Bob ): -

=====> IBM Installation Manager> Preferences

Select:
     1. Repositories
     2. Appearance
     3. Files for Rollback
     4. SSL/TLS
     5. HTTP/FTP Proxy
     6. Passport Advantage
     7. Updates

     R. Return to Main Menu
-----> [1] 


I chose option 1 to access Repositories, and this is what I get: -

=====> IBM Installation Manager> Preferences> Repositories

Repositories:
     1. [X] /opt/IBM/BPM/imageCreation/extract/repository/repos_64bit

Other Options:
     D. Add Repository

     S. [X] Search service repositories during installation and updates

     R. Restore Defaults
     A. Apply Changes and Return to Preferences Menu
     P. Temporarily Keep Changes and Return to Preferences Menu


which gives me the answer I wanted: -

/opt/IBM/BPM/imageCreation/extract/repository/repos_64bit

Nice :-)

It's also worth noting that I can use this to record response files: -

$ /opt/IBM/BPM/InstallationManager/eclipse/tools/imcl -consoleMode -record /tmp/foo.rsp

I did not actually install anything, but here's my response file: -

$ ls -al /tmp/foo.rsp 

-rw-r--r-- 1 root root 1543 Feb 28 10:03 /tmp/foo.rsp

$ cat /tmp/foo.rsp 

<?xml version="1.0" encoding="UTF-8"?>
<agent-input>
<preference name='com.ibm.cic.common.core.preferences.eclipseCache' value='/opt/IBM/BPM/BPM_Shared'/>
<preference name='com.ibm.cic.common.core.preferences.connectTimeout' value='30'/>
<preference name='com.ibm.cic.common.core.preferences.readTimeout' value='45'/>
<preference name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount' value='0'/>
<preference name='offering.service.repositories.areUsed' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication' value='false'/>
<preference name='http.ntlm.auth.kind' value='NTLM'/>
<preference name='http.ntlm.auth.enableIntegrated.win32' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.keepFetchedFiles' value='false'/>
<preference name='PassportAdvantageIsEnabled' value='false'/>
<preference name='com.ibm.cic.common.core.preferences.searchForUpdates' value='true'/>
<preference name='com.ibm.cic.common.core.preferences.import.enabled' value='true'/>
<preference name='com.ibm.cic.agent.ui.displayInternalVersion' value='false'/>
<preference name='com.ibm.cic.common.sharedUI.showErrorLog' value='true'/>
<preference name='com.ibm.cic.common.sharedUI.showWarningLog' value='true'/>
<preference name='com.ibm.cic.common.sharedUI.showNoteLog' value='true'/>
</agent-input>






Using Oracle Database File System for disaster recovery on IBM Business Process Manager

This is interesting: -

Because business process management plays a very important role in an enterprise architecture, it's critical to make sure that BPM is an integral part of any enterprise disaster recovery plan. This article introduces a disaster recovery strategy for customers who are using Oracle® Data Guard for disaster recovery on existing systems and want to extend it to include IBM® Business Process Manager.


Note that this is NOT something I've tried, and I am not 1000% sure how it is supported by IBM. If in doubt, check …..

WebSphere Application Server: Storing transaction and compensation logs in a relational database for high availability

This has come up in discussions a number of times recently, including in the context of building out IBM Business Process Manager (BPM 8.5 on the cloud using IBM PureApplication System (IPAS).

One of my colleagues has used this approach at a number of clients.

It's something I've yet to configure, but it looks fairly straight forward :-)

You can, optionally, choose to store your WebSphere Application Server transaction and compensation logs in a relational database rather than as operating system files. This feature provides high availability (HA) support without having to use a shared file system.

The WebSphere Application Server transaction service writes information to a transaction log for every global transaction that involves two or more resources, or that is distributed across multiple servers. These transactions are started or stopped either by applications or by the container in which they are deployed. The transaction service maintains transaction logs to ensure the integrity of transactions. Information is written to the transaction logs in the prepare phase of a distributed transaction, so that if a Websphere Application Server with active transactions restarts after a failure, the transaction service is able to use the logs to replay any in-doubt transactions. The transaction service therefore enables the overall system to be brought back to a consistent state.

In previous releases of WebSphere Application Server, the transaction logs were stored as operating system files. In WebSphere Application Server Version 8.5.5, this remains the default configuration but you can, optionally, choose to store the transaction logs in a relational database. This configuration option is aimed at customers working in a high availability (HA) environment. In previous releases of WebSphere Application Server, HA transaction support required the use of a shared file system to host the transaction logs, such as an NFSv4-mounted network attached storage (NAS) or a storage area network (SAN). This new feature allows customers, particularly those with an investment in HA database technology, to use their HA database as a shared repository for the transaction logs, as an alternative to using a shared file system.

In WebSphere Application Server Version 8.5.5, you can use a similar facility, also aimed at customers working in a HA environment, to store the compensation recovery logs in a relational database. The WebSphere Application Server compensation service allows applications on disparate systems to coordinate activities that are more loosely coupled than atomic transactions. It stores information, in its own dedicated recovery logs, that is necessary to perform compensation after a system failure.

Thursday, 27 February 2014

Executing external Python/Jython scripts from within WebSphere Application Server's wsadmin tool

One of my ISSW UK colleagues had asked how to invoke an externally located Python/Jython script from inside the wsadmin tool.

This is different from the normal method of starting wsadmin and directing it to load a file at startup e.g.

$ ./wsadmin.sh -lang jython -c 'AdminApp.list()'

This is subtly different - one is already in wsadmin and wants to go fetch / execute an external script.

Well, thanks to the IBM Connections 2.5 documentation (!), here it is: -

wsadmin>execfile("<$WAS_HOME>/profiles/<DMGR>/config/bin_lc_admin/blogsAdmin.py")

My colleague also pointed out that one can execute OS commands from within a Python shell e.g.

$ python

Python 2.6.6 (r266:84292, May 27 2013, 05:35:12) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import os
>>> os.system("/bin/ls")
ConfigBPM.err   ConfigNetworkPort.err  ConfigPWD_USER.err  License.err
ConfigBPM.out   ConfigNetworkPort.out  ConfigPWD_USER.out  License.out
ConfigLocale.err  ConfigNTP.err  ConfigSSH.err      _nowait
ConfigLocale.out  ConfigNTP.out  ConfigSSH.out      ovf-env.ar
ConfigNET.1.err   ConfigPWD_ROOT.err  ConfigVNC.err      ovf-env.done
ConfigNET.1.out   ConfigPWD_ROOT.out  ConfigVNC.out


So, putting it all together, here's me executing an external Jython script from within wsadmin, where said Jython script gets a directory listing: -

$ /opt/IBM/BPM/v85/profiles/BPMPCDmgrNode/bin/wsadmin.sh -lang jython -user wasadmin -password password

WASX7209I: Connected to process "dmgr" on node BPMPCDmgrNode using SOAP connector;  The type of process is: DeploymentManager
WASX7031I: For help, enter: "print Help.help()"

wsadmin>execfile('/tmp/foobar.py')
Hello World!
Here comes the directory listing
Desktop
Documents
Downloads
Music
Pictures
Public
Templates
Videos
workspace


and here's the Python script: -

$ cat /tmp/foobar.py 
import sys;
import os;

print "Hello World!"

print "Here comes the directory listing"

os.system("/bin/ls")

Monty Jython's Scripting Circus

I found this from a former ISSW UK colleague, Andrew Simms, whilst lurking around the web looking for some Jython resources: -


Andrew presented it to the WebSphere User Group back in 2007.

As a Brit and a Python fan, I heartily approve of the humour used therein :-)

Note to self - Firefox and local connections

 Whilst trying to hit my NAS from Firefox on my Mac, I kept seeing errors such as:- Unable to connect Firefox can’t establish a connection t...