Troubleshooting IBM HTTP Server startup

Problems to start the IBM® HTTP Server during deployment of a IBM MobileFirst™ Platform Server on a WebSphere® Application Server Liberty profile farm might be caused by an exception in the runtime library.

About this task

When you set up IBM MobileFirst Platform Foundation on a WebSphere Application Server Liberty profile farm, you are instructed to start the IBM HTTP Server by running the following command:
/opt/HTTPServer/bin/httpd -d /opt/HTTPServer -k start -f /opt/HTTPServer/conf/httpd.conf
If the attempt fails with the following message, the problem might be caused by an attempt to start IBM HTTP Server outside a WebSphere Application Server environment in which certain libraries cannot be found.
/opt/HTTPServer/bin/httpd: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory
If a similar message is displayed, you can make the required libraries available as follows.

Procedure

  1. Check the IBM HTTP Server libraries:
    ldd /opt/HTTPServer/bin/httpd
    The output shows that libexpat.so.0 cannot be found:
    linux-vdso.so.1 => (0x00007fff8c9d3000)
    libm.so.6 => /lib64/libm.so.6 (0x00000039fb000000)
    libaprutil-1.so.0 => /usr/lib64/libaprutil-1.so.0 (0x00007fc371a7d000)
    librt.so.1 => /lib64/librt.so.1 (0x00000039fac00000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003a07c00000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00000039fa800000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00000039fa000000)
    libexpat.so.0 => not found
    libapr-1.so.0 => /usr/lib64/libapr-1.so.0 (0x00007fc37184f000)
    libc.so.6 => /lib64/libc.so.6 (0x00000039fa400000)
    libuuid.so.1 => /lib64/libuuid.so.1 (0x0000003a04c00000)
    libexpat.so.1 => /lib64/libexpat.so.1 (0x00000039ff400000)
    libdb-4.7.so => /lib64/libdb-4.7.so (0x00000039fd800000)
    /lib64/ld-linux-x86-64.so.2 (0x00000039f9c00000)
    libfreebl3.so => /lib64/libfreebl3.so (0x0000003a08000000)
  2. Find the library on the file system.
    ls -l `locate libexpat.so.0`
  3. Check /etc/ld.so.conf.
    cat /etc/ld.so.conf
    The output shows that it includes all conf files under /etc/ld.so.conf.d/.
    include ld.so.conf.d/*.conf
  4. Add the IBM HTTP Server library to the configuration.
    1. cd /etc/ld.so.conf.d/
    2. Add the http library to the system configuration. The location of the IBM HTTP Server lib is shown in Step 1.
      echo /opt/HTTPServer/lib > httpd-lib.conf
    3. Remove the ldd cache.
      rm /etc/ld.so.cache
    4. Reload the ldd configuration.
      /sbin/ldconfig
  5. Check the IBM HTTP Server libraries again:
    ldd /opt/HTTPServer/bin/httpd
    The output shows that libexpat.so.0 is available:
    linux-vdso.so.1 => (0x00007fffd594a000)
    libm.so.6 => /lib64/libm.so.6 (0x00000039fb000000)
    libaprutil-1.so.0 => /opt/HTTPServer/lib/libaprutil-1.so.0 (0x00007f20474bf000)
    librt.so.1 => /lib64/librt.so.1 (0x00000039fac00000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x0000003a07c00000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00000039fa800000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00000039fa000000)
    libexpat.so.0 => /opt/HTTPServer/lib/libexpat.so.0 (0x00007f204739c000)
    libapr-1.so.0 => /opt/HTTPServer/lib/libapr-1.so.0 (0x00007f2047271000)
    libc.so.6 => /lib64/libc.so.6 (0x00000039fa400000)
    /lib64/ld-linux-x86-64.so.2 (0x00000039f9c00000)
    libfreebl3.so => /lib64/libfreebl3.so (0x0000003a08000000)
  6. Start the IBM HTTP Server.