Wednesday, 25 November 2015

Hmmm, USB and  Mac Mini - Not BFFs

I had a wee problem connecting a StarTech USB enclosure ( containing a 512 GB SSD drive ) to my Mac Mini this evening.


The drive never showed up in Finder, in Terminal ( under /Volumes ) or in Disk Utility.

Eventually, the enclosed would throw up a connection error.

In the logs ( sudo dmesg ) I saw: -

...
1642046.822691 EzLockDown@14900000: AppleUSBDevice::waitForInterfacesGated: timeout waiting for _interfacesMatched
1642046.822777 EzLockDown@14900000: AppleUSBDevice::waitForInterfacesGated: timeout waiting for _interfacesMatched
vmioplug: Warning: com_vmware_kext_UsbPortArbiter_14_1_4[fffffffffc5c018f]::updateDeviceByPort(14900000) resetDevice() failed: e00002bc
USBMSC Identifier (non-unique): 0000000000014905 0x4c5 0x2028 0x1, 3
1642116.059756 EzLockDown@14900000: AppleUSBDevice::waitForInterfacesGated: timeout waiting for _interfacesMatched
1642116.060507 EzLockDown@14900000: AppleUSBDevice::waitForInterfacesGated: timeout waiting for _interfacesMatched
vmioplug: Warning: com_vmware_kext_UsbPortArbiter_14_1_4[fffffffffc5c018f]::updateDeviceByPort(14900000) resetDevice() failed: e00002bc
…

I tried various things, including suspending a running VM and shutting down VMware Fusion 8, but to no avail.

In the end, I moved the drive from one USB port to another.


( the arrow indicates the from, the connected USB cable indicates the to )

Strange but true ;-)

IBM AIX Support Center Tools

I saw this earlier: -

AIX Support Center Tools provides information about widely used data gathering tools and recommendation tools that are used by AIX system administrators in conjunction with the IBM support center team. The gathering tools help reduce the amount of time spent during initial problem determination. The recommendation tools help provide health check reports or cross-product compatibility information.

Data gathering tools

zsnap

The zsnap utility delivers all the benefits of the standard snap command and captures additional debugging data in an easily understood format. IBM's world-class AIX support centers have teamed up to deliver a more fully integrated tool for data gathering, one that has already been proven to reduce the time needed to resolve customer problems. IBM recommends that you install zsnap before you call IBM technical support.

devscan

The devscan tool facilitates the debugging of storage problems by rapidly gathering a great deal of information about the SAN. It then displays the information in an easy-to-understand manner. You can run devscan from any AIX host, including VIO clients, or from a VIOS.

perfpmr

The perfpmr tool is used extensively by the AIX technical support centers. This package contains a set of tools and instructions for collecting the data needed to analyze performance problems. IBM may ask you to download and use this tool.

pdump

The pdump script extracts information from the running process using kdb command and other AIX tools.

snap

The snap command is included with the operating system. Snap captures system configuration information for AIX and PowerHA. Product technical support centers regularly request snap output to identify and resolve problems. Snap output can be delivered to IBM in portable archive exchange format (pax).

Tuesday, 24 November 2015

Ask the Experts Replay: Understanding HA Manager, WLM, and ORB in WebSphere Application Server

The High Availability Manager (HA), Work Load Management (WLM), and Object Request Broker (ORB) component provide several core features in WebSphere Application Server. This session is open to discuss the concepts, issues, and best practices of each component.

Saturday, 21 November 2015

Bash - Using Variables in Sed

Set a variable

export NAME=DAVID

Validate the variable

echo $NAME

DAVID

Initialise a file

echo "DAVE" > foobar.txt

Validate the file contents

cat foobar.txt

DAVE

Replace the contents of the file with the contents of the variable

sed -i'' "s/DAVE/$NAME/g" foobar.txt

Validate the file contents

cat foobar.txt

DAVID

This works with Bash 4.1.2(1)-release on RHEL 6.6.

Wednesday, 18 November 2015

IBM ODM Rules 8.7 - Can you say "Doh" ?

I saw this exception today: -

The initialization of the model failed.
A resource provider error occurred during the loading.
Failed to load the repository.
null

ilog.rules.res.console.IlrConsoleException: The initialization of the model failed.
at ilog.rules.res.console.util.IlrModelManager.createRepository(IlrModelManager.java:546)
at ilog.rules.res.console.util.IlrModelManager.init(IlrModelManager.java:181)
at ilog.rules.res.console.util.IlrConsoleInitializer.consoleInitialized(IlrConsoleInitializer.java:86)
at ilog.rules.res.console.jsf.IlrRequestFilter.updateState(IlrRequestFilter.java:413)
at ilog.rules.res.console.jsf.IlrRequestFilter.doFilter(IlrRequestFilter.java:234)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:919)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: ilog.rules.res.model.IlrResourceRuntimeException: A resource provider error occurred during the loading.
at ilog.rules.res.model.internal.IlrRepositoryFactoryImpl.loadRepository(IlrRepositoryFactoryImpl.java:179)
at ilog.rules.res.model.mbean.IlrJMXRepositoryFactoryImpl.createRepository(IlrJMXRepositoryFactoryImpl.java:58)
at ilog.rules.res.console.util.IlrModelManager.createRepository(IlrModelManager.java:544)
... 25 more
Caused by: ilog.rules.res.persistence.IlrDAOException: Failed to load the repository.
at ilog.rules.res.persistence.impl.IlrDAOLocalization.newIlrDAOException(IlrDAOLocalization.java:35)
at ilog.rules.res.persistence.impl.jdbc.IlrGenericRepositoryDAO.load(IlrGenericRepositoryDAO.java:127)
at ilog.rules.res.model.internal.IlrRepositoryFactoryImpl.loadRepository(IlrRepositoryFactoryImpl.java:177)
... 27 more
Caused by: java.lang.NullPointerException
at ilog.rules.res.persistence.impl.jdbc.helper.IlrRulesetsTable.load(IlrRulesetsTable.java:50)
at ilog.rules.res.persistence.impl.jdbc.IlrGenericRepositoryDAO.load(IlrGenericRepositoryDAO.java:115)
... 28 more


...
[18/11/15 15:26:45:078 GMT] 000000a7 sql           W   An error occurred when executing the SQL query.
                                 com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2INST1.RULEAPPS, DRIVER=3.68.61
...
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-204;42704;DB2INST1.RULEAPPS, DRIVER=3.68.61
...
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-204;42704;DB2INST1.RULEAPPS, DRIVER=3.68.61
...
[18/11/15 15:26:45:094 GMT] 000000a7 sql           W   An error occurred when executing the SQL query.
                                 com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2INST1.RULESETS, DRIVER=3.68.61

...
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-204;42704;DB2INST1.RULESETS, DRIVER=3.68.61
...

I realised that I was missing a table or two ( RULEAPPS and RULESETS to name but two ), but I was 100% sure I'd created everything.

I checked my notes: -

db2 connect to RESDB
db2 create bufferpool BP32K size 8000 automatic pagesize 32K
db2 -tvf C:\IBM\ODM87\executionserver\databases\trace_db2.sql
db2 -tvf C:\IBM\ODM87\executionserver\databases\repository_db2.sql
db2 -tvf C:\IBM\ODM87\executionserver\databases\xomrepository_db2.sql
db2 -tvf C:\IBM\ODM87\executionserver\databases\decisionrunner_db2.sql


( For the record, I'm installing ODM Rules 8.7.0.0 on Windows Server 2008 R2 )

Can you see what I did wrong ?

Yes, when I connected to DB2, I did not specify a user - on the Windows platform, the command will use the ID that's currently logged in - Administrator in my case - which means that all objects are created with the schema of ADMINISTRATOR rather than, as required, DB2INST1.

Once I realised what I'd done wrong, I dropped the DB: -

db2 drop db RESDB

and recreated everything BUT with the correct schema: -

db2 connect to RESDB user DB2INST1
db2 create bufferpool BP32K size 8000 automatic pagesize 32K
db2 -tvf C:\IBM\ODM87\executionserver\databases\trace_db2.sql
db2 -tvf C:\IBM\ODM87\executionserver\databases\repository_db2.sql
db2 -tvf C:\IBM\ODM87\executionserver\databases\xomrepository_db2.sql
db2 -tvf C:\IBM\ODM87\executionserver\databases\decisionrunner_db2.sql

I'm sure I could have also used this: -

db2 set current schema DB2INST1

but that's not important right now.


Tuesday, 17 November 2015

Windows Server 2008 and Data Execution Prevention

I was trying to install a SQL Server component onto a Windows Server 2008 R2 VM, for self-enablement, but kept hitting blockers, most of which were due to missing dependencies, including the Microsoft .NET Framework.

I finally obtained an up-do-date version of the latter here: -


specifically NDP452-KB2901907-x86-x64-AllOS-ENU.exe.

Having downloaded this, when I attempted to install, Windows kept throwing up exceptions similar to: -

dotNetFx40_Full_x86_x64 setup has encountered a problem and needs to close. We are sorry for the inconvenience.

with detailed traces such as: -

Problem signature:
  Problem Event Name: APPCRASH
  Application Name: NDP452-KB2901907-x86-x64-AllOS-ENU.exe
  Application Version: 4.5.51209.34209
  Application Timestamp: 52bb74a6
  Fault Module Name: StackHash_0a9e
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp: 00000000
  Exception Code: c0000008
  Exception Offset: 7695c0ea
  OS Version: 6.1.7600.2.0.0.274.10
  Locale ID: 2057
  Additional Information 1: 0a9e
  Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
  Additional Information 3: 0a9e
  Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt


Problem signature:
  Problem Event Name: VSSetup
  Problem Signature 01: Microsoft .NET Framework 4 Setup
  Problem Signature 02: 4.0.30319
  Problem Signature 03: 10.0.30319.1
  Problem Signature 04: 1
  Problem Signature 05: unknown
  Problem Signature 06: None_UI_Interactive_Crash
  Problem Signature 07: 0xc0000005
  Problem Signature 08: 0
  Problem Signature 09: unknown
  OS Version: 6.1.7600.2.0.0.274.10
  Locale ID: 2057

Read our privacy statement online:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:
  C:\Windows\system32\en-US\erofflps.txt

From reading, it appeared that Data Execution Prevention (DEP) was getting in the way.

I read various posts online, and finally found this: -


which described how to disable DEP at boot-time: -


Once I did this, and rebooted, the .NET Framework installed without problems, which is nice.

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...