Tuesday, April 26, 2016

Kudos Boards - error message "Unable to retrieve Members"

After installing Kudos Boards, I had this error message:

I went over all the config parameters, and encountered that I had the wrong path to the "sbt.properties" file.

So if you get this error, check the path and correct it if it´s wrong.

The documentation says that the file should be on the path:

But my data directory lies directly on "/opt/IBM/data" so I had to correct the environment variable to:

Monday, April 11, 2016

Renaming an IBM Connections hostname. Redirecting IHS/Apache

Ok, I´ve done some renaming of IBM Connections servers lately.

Basically the renaming consists of
  • Changing the Lotus-ConnectionsConfig.xml file.
  • Changing the LtpaToken Domain name
  • Changing the SSL cert in iKeyman
  • Changing IBM HTTP Server config, (ssl config and hostname changes)
  • Running wsadmin commands to change url that´s stored in various conten, like Blogs and StatusUpdates (See "update" at the end of this blogentry).
 What I want to focus on here, are the Apache Redirect rules which I like to implement, in order for easing the single users day.

If users already have bookmarked IBM Connections stuff in their local browser, and access this bookmark a lot. They would be upset that suddenly, one day, the bookmark does not work. The users don´t normally read the Admin emails about major system changes, so this is a way of simplifying things for them. (and you, hehe)

So. When you have done all the renaming steps that are required, and you have a working system up and running, on the new host names, then this is the httpd.conf redirection I use.

Redirect rules in Apache:
I have not tested this in IHS before, but I guess it should work there as well. I did this one in Apache the last time, and this is the config this blog entry is based on.

The way I do this, is that I create two new VirtualHosts in addition to the two that was already in the httpd.conf config file. (one for port 80 and one for 443, basic stuff)
The VirtualHost names has the same names as the ones that already exists, namely "*:80" and "*.443".
To make sure that Apache don´t create error messages about "this VirtualHost already exists" and so on, the following 2 lines also has to exist in the httpd.conf:
NameVirtualHost *:80
NameVirtualHost *:443
Just put the two lines somewhere above all of your VirtualHost config, but not inside your VirtualHost config.

And then, lets say the old hostname was "CNXOLD.item.no" and the new hostname is "CNXNEW.item.no"
I added this brand new VirtualHost config in the httpd.conf file:

<VirtualHost *:80>
    ServerName CNXOLD.item.no
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

<VirtualHost *:443>
    ServerName CNXOLD.item.no
    UseCanonicalName On
    RewriteEngine on
    RewriteRule   ^/$  /homepage  [NE,R]

    RewriteRule ^/blogs/(.*) https://CNXNEW.item.no/blogs/$1 [R,L]
    RewriteRule ^/activities/(.*) https://CNXNEW.item.no/activities/$1 [R,L]
    RewriteRule ^/communities/(.*) https://CNXNEW.item.no/communities/$1 [R,L]
    RewriteRule ^/dogear/(.*) https://CNXNEW.item.no/dogear/$1 [R,L]
    RewriteRule ^/files/(.*) https://CNXNEW.item.no/files/$1 [R,L]
    RewriteRule ^/forums/(.*) https://CNXNEW.item.no/forums/$1 [R,L]
    RewriteRule ^/homepage/(.*) https://CNXNEW.item.no/homepage/$1 [R,L]
    RewriteRule ^/mobile/(.*) https://CNXNEW.item.no/mobile/$1 [R,L]
    RewriteRule ^/profiles/(.*) https://CNXNEW.item.no/profiles/$1 [R,L]
    RewriteRule ^/wikis/(.*) https://CNXNEW.item.no/wikis/$1 [R,L]

    Plus some basic SSL stuff here :-)


So, in this way, browser requests towards "cnxnew.item.no" behaves normally, because you already have the VirtualHost config in place for this. This above mentioned addittional VirtualHost config, will redirect any user over to the new server, and also maintaining the url entirely. The old bookmark "https://cnxold.item.no/profiles/blablabla" will redirect the user to the url "https//cnxnew.item.no/profiles/blablabla".

The fun part was the added surprise of also learning that the Mobile iOS App also handeled the redirection automatically. The Config of the app towards the old server will automatically store the new hostname.

Sadly, the Desktop Plugin did not. So this one has to be manually fixed regarding the hostname.

By request, here´s the wsadmin commands:
I mentioned the wsadmin commands for changing urls in Blog-entries and status-updates.
Here´s the link for this:
Blogs: https://www.ibm.com/support/knowledgecenter/SSYGQH_5.0.0/admin/admin/t_admin_blogs_replace_urls.dita

Status Updates: As of right now, there´s no wsadmin command for changing url´s that´s been pasted into status updates. If this is important to change, you need to go directly into the database and change there.
I got this confirmed by Christoph Stoettner today, as I asked him about it.
Since status updates has a short lifespan (by default 45 days), both he and I tend to just ignore changing the url´s that exists inside of status-updates and just do the ones for Blogs.