Wednesday, 22 December 2010

IBM HTTP Server - Error "undefined symbol: apr_sockaddr_port_get" seen when starting IHS on Linux

Having installed IBM HTTP Server 7.0.0.11 and the corresponding version of the WebSphere Plugin, I started seeing the following: -

httpd: Syntax error on line 918 of /opt/IBM/HTTPServer/conf/httpd.conf: Cannot load /opt/IBM/HTTPServer/Plugins/bin/mod_was_ap20_http.so into server: /opt/IBM/HTTPServer/Plugins/bin/mod_was_ap20_http.so: undefined symbol: apr_sockaddr_port_get

when I tried to start the web server using the command: -

/opt/IBM/HTTPServer/bin/apachectl start

I had the following lines in my httpd.conf: -

LoadModule was_ap20_module /opt/IBM/HTTPServer/Plugins/bin/mod_was_ap20_http.so
WebSpherePluginConfig /opt/IBM/HTTPServer/Plugins/config/IHS7/plugin-cfg.xml

LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
<IfModule mod_ibm_ssl.c>
        Listen 0.0.0.0:443
        <VirtualHost *:443>
                ServerName connections.lcboot.issl
                DocumentRoot /opt/IBM/HTTPServer/htdocs/en_US
                SSLEnable
        </VirtualHost>
</IfModule>
SSLDisable
Keyfile "/opt/IBM/HTTPServer/Plugins/config/IHS7/plugin-key.kdb"
SSLStashFile "/opt/IBM/HTTPServer/Plugins/config/IHS7/plugin-key.sth"

After a bit of a Googling, I found this forum post  which mentioned: -

did you check that the path is correct. Is the mod_was_ap20_http.so file found at /opt/ibmIHS/HTTPServer/Plugins/bin?

Also since you are using IHS v7, are you also using v7 of WAS and the Plugin? Or are you using v6 or v6.1 etc?

If you are using WAS and Plugin v7..then you should be using mod_was_ap22_http.so instead of ap20.

I checked, and I had both versions of the module: -

-rwxr-xr-x 1 root root 480735 Dec 22 08:05 /opt/IBM/HTTPServer/Plugins/bin/mod_was_ap22_http.so
-rwxr-xr-x 1 root root 480738 Dec 22 08:05 /opt/IBM/HTTPServer/Plugins/bin/mod_was_ap20_http.so

so I amended my httpd.conf as follows: -

LoadModule was_ap22_module /opt/IBM/HTTPServer/Plugins/bin/mod_was_ap22_http.so
WebSpherePluginConfig /opt/IBM/HTTPServer/Plugins/config/IHS7/plugin-cfg.xml

LoadModule ibm_ssl_module modules/mod_ibm_ssl.so
<IfModule mod_ibm_ssl.c>
        Listen 0.0.0.0:443
        <VirtualHost *:443>
                ServerName connections.lcboot.issl
                DocumentRoot /opt/IBM/HTTPServer/htdocs/en_US
                SSLEnable
        </VirtualHost>
</IfModule>
SSLDisable
Keyfile "/opt/IBM/HTTPServer/Plugins/config/IHS7/plugin-key.kdb"
SSLStashFile "/opt/IBM/HTTPServer/Plugins/config/IHS7/plugin-key.sth"

and I can now start IHS without any problems.

Another day, another lesson learnt.

I *love* my job :-)

2 comments:

Ratsock said...

Thanks a bunch! I was having this exact problem and wasn't able to find a solution till I came across your post.

foulsoft said...

Yes, thanks a lot !!!!