Friday 25 January 2013

IBM Installation Manager - Permission to Launch

I had some fun and games with IBM Installation Manager 1.6.0 today ( on a 64-bit version of Red Hat Enterprise Linux 6.3, but that's not important right now ).

It all stemmed from when I ( stupidly ) tried to run IIM as root, having installed and configured it as a non-root user - wasadmin.

This is what I saw: -

ERROR: The Installation Manager cannot be started.The registry information does not exist or does not match with this executable.This may happen if you are trying to run Installation Manager installed by another user.

00:00.40 ERROR [main] com.ibm.cic.agent.internal.application.HeadlessApplication run
  The Installation Manager cannot be started.The registry information does not exist or does not match with this executable.This may happen if you are trying to run Installation Manager installed by another user.


However, when I then tried to run IIM as wasadmin: -

$ /opt/IBM/InstallationManager/eclipse/IBMIM -version -nosplash -silent

I got this: -

(IBMIM:18310): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(IBMIM:18310): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
(IBMIM:18310): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
(IBMIM:18310): GLib-GObject-WARNING **: value "TRUE" of type `gboolean' is invalid or out of range for property `visible' of type `gboolean'
(IBMIM:18310): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed
(IBMIM:18310): Gtk-WARNING **: Screen for GtkWindow not set; you must always set a screen for a GtkWindow before using the window
(IBMIM:18310): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_attributes: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_alignment: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion `PANGO_IS_LAYOUT (layout)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode: assertion `PANGO_IS_LAYOUT (layout)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed
(IBMIM:18310): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): Gtk-CRITICAL **: gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTINGS (settings)' failed
(IBMIM:18310): Gtk-WARNING **: Invalid icon size 6

(IBMIM:18310): Gtk-CRITICAL **: gtk_icon_theme_load_icon: assertion `GTK_IS_ICON_THEME (icon_theme)' failed
(IBMIM:18310): Gtk-WARNING **: Error loading theme icon 'gtk-dialog-error' for stock: 
(IBMIM:18310): Gtk-CRITICAL **: gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTINGS (settings)' failed
(IBMIM:18310): Gtk-WARNING **: gtkstyle.c:2318: invalid icon size '6'
(IBMIM:18310): Gtk-CRITICAL **: gtk_style_render_icon: assertion `pixbuf != NULL' failed
(IBMIM:18310): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(IBMIM:18310): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_get_attributes: assertion `PANGO_IS_LAYOUT (layout)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_alignment: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion `PANGO_IS_LAYOUT (layout)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode: assertion `PANGO_IS_LAYOUT (layout)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_wrap: assertion `PANGO_IS_LAYOUT (layout)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed
(IBMIM:18310): Gdk-CRITICAL **: gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed
(IBMIM:18310): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
(IBMIM:18310): Gdk-CRITICAL **: gdk_screen_get_width: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): Gdk-CRITICAL **: gdk_screen_get_width: assertion `GDK_IS_SCREEN (screen)' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed
(IBMIM:18310): Pango-CRITICAL **: pango_layout_get_line_count: assertion `layout != NULL' failed


I thought this might be a permissions issue as, having run IIM as root, I'd locked out certain crucial files, thus preventing wasadmin from accessing them.

I validated this as follows: -

$ /opt/IBM/InstallationManager/eclipse/tools/imcl -version -silent -nosplash

which returned: -

Invalid Configuration Location:
Locking is not possible in the directory "/opt/IBM/InstallationManager/eclipse/configuration/org.eclipse.osgi". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking passing "-Dosgi.locking=none" as a VM argument. 
/opt/IBM/InstallationManager/eclipse/configuration/org.eclipse.osgi/.manager/.fileTableLock (Permission denied)

When I checked that file: -

$ ls -al /opt/IBM/InstallationManager/eclipse/configuration/org.eclipse.osgi/.manager/.fileTableLock 

I saw this: -

-rw-r--r-- 1 root root 0 Jan 25 09:29 /opt/IBM/InstallationManager/eclipse/configuration/org.eclipse.osgi/.manager/.fileTableLock

The same was true of other files in the same location: -

ls -al /opt/IBM/InstallationManager/eclipse/configuration/org.eclipse.osgi

total 552
drwxr-xr-x 3 root     root        4096 Jan 25 09:29 .
drwxr-xr-x 6 wasadmin wasadmins   4096 Jan 25 10:02 ..
-rw-r--r-- 1 root     root      201051 Jan 25 09:29 .bundledata.1
-rw-r--r-- 1 root     root      263559 Jan 25 09:29 .lazy.1
drwxr-xr-x 2 root     root        4096 Jan 25 09:29 .manager
-rw-r--r-- 1 root     root       81835 Jan 25 09:29 .state.1


$ ls -al /opt/IBM/InstallationManager/eclipse/configuration/

total 60
drwxr-xr-x  6 wasadmin wasadmins 4096 Jan 25 10:02 .
drwxr-xr-x 11 wasadmin wasadmins 4096 Jan 25 10:02 ..
-rw-r--r--  1 wasadmin wasadmins 4445 Jan 25 09:51 1359107496589.log
-rw-r--r--  1 wasadmin wasadmins 4355 Jan 25 09:53 1359107593225.log
-rw-r--r--  1 wasadmin wasadmins 4355 Jan 25 09:57 1359107865410.log
-rw-r--r--  1 wasadmin wasadmins 4369 Jan 25 10:02 1359108164852.log
-rw-r--r--  1 wasadmin wasadmins  759 Jan 24 17:24 config.ini
drwxr-xr-x  3 root     root      4096 Jan 25 09:29 org.eclipse.core.runtime
drwxr-xr-x  3 root     root      4096 Jan 25 09:29 org.eclipse.equinox.app
drwxr-xr-x  3 root     root      4096 Jan 25 09:29 org.eclipse.osgi
drwxr-xr-x  2 wasadmin wasadmins 4096 Jan 25 09:29 org.eclipse.update


Once I changed the permissions: -

$ chown -R wasadmin:wasadmins /opt/IBM/InstallationManager/

all was well: -

/opt/IBM/InstallationManager/eclipse/tools/imcl -version -silent -nosplash

Installation Manager (installed)
Version: 1.6.0
Internal Version: 1.6.0.20120831_1216

$ /opt/IBM/InstallationManager/eclipse/IBMIM -version -nosplash -silent

Installation Manager (installed)
Version: 1.6.0
Internal Version: 1.6.0.20120831_1216

Shiny :-)

No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...