Tuesday, 18 May 2010

Strangeness with the addNode script during a Lotus Connections implementation

During a troublesome installation of Lotus Connections 2.5 on a Linux server, I hit the following exception, shown up in /tmp/lcinstalllog.txt: -

(May 18, 2010 3:37:06 PM), MultiPlatform.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [exec] The java class is not found:   
(May 18, 2010 3:37:06 PM), MultiPlatform.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdOut:      [exec] /opt/IBM/WebSphere/AppServer/bin/addNode.sh: line 119: -Xbootclasspath/p:: No such file or directory
(May 18, 2010 3:37:06 PM), MultiPlatform.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdErr: 
(May 18, 2010 3:37:06 PM), MultiPlatform.install, com.ibm.wps.install.ExternalCommandAction$OutputWatcher, msg2, StdErr: BUILD FAILED

which seemed strange.

However, I had edited addNode.sh as recommended, in order to increase the minimum and maximum heap sizes, by adding the following line: -

  -Xms256m -Xmx1024m \ 

to the script, as follows: -

...
"$JAVA_HOME"/bin/java \
  -Xms256m -Xmx1024m \ 
  -Xbootclasspath/p:"$WAS_BOOTCLASSPATH" \
  $EXTRA_X_ARGS \
  $WAS_DEBUG \
  $CONSOLE_ENCODING \
  $javaOption \
  "$CLIENTSAS" \

...

Now I can't see anything wrong with that, but it obviously caused some problems.

I tried running dos2unix against the file, but to no avail - I didn't really expect that to work, given that I'd used vi to edit it in the first place.

In the end, I removed the line, and re-added it in again. This time it looked like this: -

  -Xms256m -Xmx1024m \

as follows: -

...
"$JAVA_HOME"/bin/java \
  -Xms256m -Xmx1024m \
  -Xbootclasspath/p:"$WAS_BOOTCLASSPATH" \
  $EXTRA_X_ARGS \
  $WAS_DEBUG \
  $CONSOLE_ENCODING \
  $javaOption \
  "$CLIENTSAS" \
...

Interestingly, this time around, when I ran the diff command against the two versions of the file, there was definitely something different: -

117c117
<   -Xms256m -Xmx1024m \ 
---
>   -Xms256m -Xmx1024m \

but I'm blowed if I can see what ...

Weird science ..... but without Kelly LeBrock or a bra on my head ...

1 comment:

Dave Hay said...

My Lotus colleague, AxelS, pointed out where I was going wrong - I had inadvertently added a space character to the line: -

-Xms256m -Xmx1024m \

when I *PASTED* it from a PDF document into VI in a SSH session via the Terminal application on my Mac :-)

Therefore the line looked like this: -

-Xms256m -Xmx1024m \

rather than this: -

-Xms256m -Xmx1024m \

Moral of the story - DON'T PASTE from documents into scripts EVER EVER EVER