Debugging directory server issues with DTrace

Today while installing Sun’s directory server, I kept getting the error “No components have been selected for installation in the selected directory” after selecting numerous components for installation:

Directory Server components showing a checked box will be installed.

 [X]  1   Sun Java(TM) System Directory Suite    0 bytes
 [X]  2     Sun Java(TM) System Directory Server    0 bytes
 [ ]  3     Sun Java(TM) System Directory Console Support    0 bytes
 [ ]  4   Sun Java(TM) System Administration Services    0 bytes
 [ ]  5     Sun Java(TM) System Administration Server    0 bytes
 [ ]  6     Sun Java(TM) System Administration Console    0 bytes
 [ ]  7   Sun Java(TM) System Server Console    0 bytes
 [ ]  8     Sun Java(TM) System Server Console Core    0 bytes
 [ ]  9     Java Runtime Environment    0 bytes
 [ ]  10  Sun Java(TM) System Server Basic Libraries    0 bytes

   To check a particular component, enter its number, or 0 when you are
   finished [0] {"<" goes back, "!" exits}: 0

No components have been selected for installation in the selected directory.

Since I had previously installed the directory server on the machine, I started to wonder if the directory server had placed a package repository somewhere on the file system. To see if this was the case, I fired up opensnoop from the DTraceToolkit:

$ opensnoop

  UID    PID COMM          FD PATH
                 < ..... >
    0    657 java          16 /var/sadm/install/productregistry.access
    0    657 java          16 /var/sadm/install/productregistry.access.lock
    0    657 java          16 /var/sadm/install/productregistry.access
    0    657 java          18 /var/sadm/install/productregistry.access.tmp
    0    657 java          16 /var/sadm/install/productregistry.access
    0    657 java          16 /var/sadm/install/productregistry.access.lock

Sure enough, there is a product registry file in /var/sadm/install. Once I removed it with rm:

$ rm -f /var/sadm/install/productregistry

The installation went off without a hitch. DTrace truly does bring a lot to the table, and I feel like a fish out of water when debugging difficult issues on Solaris 9, AIX and Linux hosts.

3 Comments

cos  on January 18th, 2007

While DTrace is indeed a wonderful thing, for a problem like that (“what files is a process opening?”) you could’ve easily solved it with strace or truss in other Unixes / older Solarises.

matty  on January 18th, 2007

Hi Cos,

Truss and strace would have definitely been able to solve this problem (I should have mentioned that this isn’t a difficult problem to solve, and any of the system call tracers would have worked).Since I use DTrace and the DTraceToolkit to solve most of my problems, I often don’t take truss or strace into account anymore (I have been debugging Linux issues using the lx-syscall provider and Linux branded zones).

Thanks for the comment,
- Ryan

falko  on March 11th, 2011

Removing productregistry saved my day – thanks a lot!

- Falko

Leave a Comment