Wednesday, 26 August 2020

Sametime 11 with MongoDB chat history query samples

Sometimes I meet end users who complain about missing/lost information in Sametime chat history. If you use Sametime with MongoDB you can run some useful queries to check/find data. I used the next queries in my test environment. Please consider character sets (iso-XXXX). To run these queries you do not need Sametime server. You need MongoDB only. MongoDB server/service must run. All components run on one Linux machine in my test environment and I did everything on that Linux machine.

*Considerations:

- You can use Mongo client and server on different machine. That case you have to add server connection parameters to the command on your client machine.

- There is no strict security in my test environment. In your environment, you may need username and password. Please remember MongoDB installation (Sametime user and password).

This query creates a json file and export all chats.

/usr/bin/mongoexport --db chatlogging --collection CONVOMAP --out /opt/mongobackup/chatlogging_CONVOMAP_26_August.json

You can create a CSV file, too to use it in MS Excel, Notepad++, etc. CSV export always requires --fields option! In this query I selected uid,name,with,msg fields.

/usr/bin/mongoexport --db chatlogging --collection CONVOMAP --fields uid,name,with,msg --type csv --out /opt/mongobackup/chatlogging_CONVOMAP_26_August.csv

To collect information for a specific user, you can create filters. In this query I am the chat initiator.

/usr/bin/mongoexport --db chatlogging --collection CONVOMAP --query "{ 'name' : 'CN=Andras Gabor Horvath/O=andrasst'}"

In this query I was invited to chat:

/usr/bin/mongoexport --db chatlogging --collection CONVOMAP --query "{ 'with' : 'CN=Andras Gabor Horvath/O=andrasst'}"

In this query I invited Daniel Szalai to chat with me:

 /usr/bin/mongoexport --db chatlogging --collection CONVOMAP --query "{ 'name' : 'CN=Andras Gabor Horvath/O=andrasst' , 'with' : 'CN=Daniel Szalai/O=andrasst' }"

*Comments: 

you can use name or uid. Some cases uid is better.

if you have character conversion issues (you can not read content) you can use character conversion tools. Examples:

file --mime-encoding chatlogging_CONVOMAP_26_August.csv 

iconv -f utf-8 -t iso-8859-1 chatlogging_CONVOMAP_26_August.csv > chatlogging_CONVOMAP_26_August_ISO_8859-1.csv

 OR

iconv -f utf-8 -t iso-8859-2 chatlogging_CONVOMAP_26_August.csv > chatlogging_CONVOMAP_26_August_ISO_8859-2.csv

Thursday, 2 July 2020

HCL Sametime 11 including Mongo DB

The main goal of this document is to show HCL Sametime 11 installation on RHEL7 for test purposes, including MONGO DB installation and Linux configuration.

Operating system: redhat-release-server-7.7-10.el7.x86_64

Kernel: 3.10.0-1062.el7.x86_64

CPU: 4 Core

Memory: 6 Gbyte

Disc: 35 Gbyte

Host: st11.andras.demo

IP: 192.168.0.168

User: root

Important: If you see this “” (one long), please replace it with “--" (two short)

Preparations

Internet access is required. Without it you must download and copy all required packages manually.

RHEL7 Keymap

Because I use Hungarian keyboard, I change keymap to Hungarian. *Comment: You can list available keymaps: localectl list-keymaps

localectl set-keymap hu

RHEL7 Firewall

Required ports to setup and access HCL Domino server:

·         80        HTTP

·         443     HTTPS

·         1352   HCL Notes client

·         8585   HCL Domino Server Remote Setup

On my RHEL7 server 80,443 and 1352 port are part of basic settings. I add 8585.

vim /etc/services

Check and modify as required

http                 80/tcp             #WorldWideWeb HTTP

http                 80/udp            #HyperTextTransferProtocol

https               443/tcp           #WorldWideWeb HTTPS over TLS/SSL

https               443/udp         #HyperTextTransferProtocol over TLS/SSL

lotusnote       1352/tcp         #Lotus Notes or HCL Notes

lotusnote       1352/udp       #Lotus Notes or HCL Notes

lotusnote       8585/tcp         #Lotus Domino or HCL Domino Remote Setup

lotusnote       8585/udp       #Lotus Domino or HCL Domino Remote Setup

 

Save and close file

Because I added only 8585, I need only these commands below:

firewall-cmd –zone=public –add-port=8585/tcp –permanent

firewall-cmd –zone=public –add-port=8585/udp –permanent

firewall-cmd --reload

 

RHEL7 hosts file

Because I do not use DHCP/DNS servers I add fully qualified host name and IP to hosts file. *Comment: I must add fully qualified host name and IP to host file on my test client, too.

vim /etc/hosts

192.168.0.168           st11.andras.demo    st11

*Comment: If you use DNS/DHCP you do not need this configuration.

*Comment: Change it as you want. This is a demo environment.

Save and close. Test it with ping.

ping st11.andras.demo

*Comment: Do not continue if it does not work with the fully qualified host name and correct IP address!

RHEL7 limits

HCL Domino server requires changes in limits.conf to run properly. Because I use root and notes11 users I will change it for everyone.

vim /etc/security/limits.conf

*           hard    nofile  65535

*           soft      nofile  65535

 

Save and close the file.

I create folder for installation and other packages.

mkdir -p /opt/install

 

RHEL7 .bash_profile

I change history settings. It is very useful for learning but it is not mandatory.

cd $HOME

vim ./.bash_profile

HISTFILESIZE=10000

HISTSIZE=1000

HISTCONTROL=ignorespace:ignoredumps

export HISTFILESIZE

export HISTSIZE

export HISTCONTROL

 

Save and close the file.

Mongo DB

> cd /etc/yum.repos.d

vim mongodb-org-3.6.repo

[mongodb-org-3.6]

name=MongoDB Repository

baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/x86_64/

gpgcheck=1

enabled=1

gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc

 

Save and close file.

 

yum repolist enabled

yum -y install mongodb-org

ls -hal /var/log/mongodb

ls -hal /var/lib/mongo

 

RHEL7 aliases

I create some useful aliases, but they are not mandatory.

cd $HOME

vim ./.bash_profile

alias mongostart=’service mongod start’

alias mongostop=’service mongod stop’

alias mongostatus=’systemctl status mongod’

Save and close the file.

source ./.bash_profile

 

The environment is ready to install HCL Sametime 11 Community server.

 


 

HCL Sametime 11 Community Server installation

Installing Domino on Linux

https://help.hcltechsw.com/sametime/11.0.0/admin/installing_domino_linux.html

 

Configuring Domino for Sametime

https://help.hcltechsw.com/sametime/11.0.0/admin/configuring_domino_for_sametime.html

 

Installing Sametime Community on Linux

https://help.hcltechsw.com/sametime/11.0.0/admin/installing_sametime_community_linux.html

 

Configuring Sametime Community Chat Logging with MongoDB

https://help.hcltechsw.com/sametime/11.0.0/admin/configuring_chat_logging_mongodb.html

 

Manage library issue

 

On Domino server console, you see staddin error message, complaining about libgsk8iccs_64.so.

ldd /opt/hcl/domino/notes/latest/linux/libstchatloggingmongodb.so

You can see some “not found” messages in the list. For example:

libwinux.so => not found

Create link for all missing files as the example here:

ln -s /opt/hcl/domino/notes/latest/linux/libwinux.so /usr/lib64/libwinux.so

 

Stop Domino server

Run check again:

ldd /opt/hcl/domino/notes/latest/linux/libstchatloggingmongodb.so

All files must be available. Don’t start Domino server if you have “not found” entry in the result!


 

Useful links

 

https://help.hcltechsw.com/sametime/11.0.0/admin/installing_domino_linux.html

https://help.hcltechsw.com/sametime/11.0.0/admin/configuring_domino_for_sametime.html

https://help.hcltechsw.com/sametime/11.0.0/admin/installing_sametime_community_linux.html

https://help.hcltechsw.com/sametime/11.0.0/admin/configuring_chat_logging_mongodb.html

https://www.mindwatering.com/SupportRef.nsf/All/8c2e814de98ab6f2852584dd007475da

https://blog.darrenduke.net/darren/ddbz.nsf

https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&ved=2ahUKEwi_k8T6-rDqAhVMecAKHYbKDI4QFjABegQIAhAB&url=https%3A%2F%2Fhclpnpsupport.hcltech.com%2Fsys_attachment.do%3Fsys_id%3D87d6ab301b62c41c83cb86e9cd4bcbc9&usg=AOvVaw0TuaOQC24NzoG747LF7qwE


 


HCL Domino 11 on Docker

The main goal of this document is to show HCL Domino 11 installation on Docker for test purposes, including Docker installation and Linux configuration.
Operating system: redhat-release-server-7.7-10.el7.x86_64
Kernel: 3.10.0-1062.el7.x86_64
CPU: 2 Core
Memory: 4 Gbyte
Disc: 20 Gbyte
Host: d11docker.andras.demo
IP: 192.168.0.126
User: root
Important: If you see this “” (one long), please replace it with “--" (two short)

Preparations

Internet access is required. Without it you have to download and copy all required packages manually.

RHEL7 Keymap

Because I use Hungarian keyboard, I change keymap to Hungarian. *Comment: You can list available keymaps: localectl list-keymaps
localectl set-keymap hu

RHEL7 Firewall

Required ports to setup and access HCL Domino server:
·         80        HTTP
·         443     HTTPS
·         1352   HCL Notes client
·         8585   HCL Domino Server Remote Setup         *This is the only way at the moment to setup Domino server on Docker.
On my RHEL7 server 80, 443 and 1352 port are part of basic settings. I add 8585.
vim /etc/services
Check and modify as required
http                 80/tcp             #WorldWideWeb HTTP
http                 80/udp            #HyperTextTransferProtocol
https               443/tcp           #WorldWideWeb HTTPS over TLS/SSL
https               443/udp         #HyperTextTransferProtocol over TLS/SSL
lotusnote       1352/tcp         #Lotus Notes or HCL Notes
lotusnote       1352/udp       #Lotus Notes or HCL Notes
lotusnote       8585/tcp         #Lotus Domino or HCL Domino Remote Setup
lotusnote       8585/udp       #Lotus Domino or HCL Domino Remote Setup

Save and close file
Because I added only 8585, I need only these commands below:
firewall-cmd –zone=public –add-port=8585/tcp –permanent
firewall-cmd –zone=public –add-port=8585/udp –permanent
firewall-cmd --reload

RHEL7 hosts file

Because I do not use DHCP/DNS servers I add fully qualified host name and IP to hosts file. *Comment: I must add fully qualified host name and IP to host file on my test client, too.
vim /etc/hosts
192.168.0.126           d11docker.andras.demo     d11docker
*Comment: If you use DNS/DHCP you do not need this configuration.
*Comment: Change it as you want. This is a demo environment.
Save and close. Test it with ping.
ping d11docker.andras.demo
*Comment: Do not continue if it does not work with the fully qualified host name and correct IP address!

RHEL7 limits

HCL Domino server requires changes in limits.conf to run properly. Because I use root user I will change it for root.
vim /etc/security/limits.conf
root     hard    nofile  65535
root     soft      nofile  65535

Save and close the file.
I create folder for installation and other packages.
mkdir -p /opt/install

RHEL7 .bash_profile

I change history settings. It is very useful for learning but it is not mandatory.
cd $HOME
vim ./.bash_profile
HISTFILESIZE=10000
HISTSIZE=1000
HISTCONTROL=ignorespace:ignoredumps
export HISTFILESIZE
export HISTSIZE
export HISTCONTROL

Save and close the file.

Docker repo

yum clean all
yum repolist enabled

Required container package

cd /opt/install
yum -y install container-selinux-2.119.1-1c57a6f9.el7.noarch.rpm

RHEL7 aliases

I create some useful aliases, but they are not mandatory.
cd $HOME
vim ./.bash_profile
alias dockerstart=’systemctl start docker’
alias dockerstop=’systemctl stop docker’
alias dockerstatus=’systemctl status docker’
Save and close the file.
source ./.bash_profile

Docker installation

yum -y install docker-ce docker-ce-cli containerd.io
For the first time use
systemctl start docker
systemctl status docker
systemctl stop docker
In the future you can use aliases.
Do not continue if Docker is not Active!
“Active: active (running) since …….”
docker info    *Comment: Docker must run. ‘docker info’ command gives you information about running Docker environment.

The environment is ready to install HCL Domino 11 for Docker.



HCL Domino 11 for Docker installation


Required package: Domino_1101_DockerImage.tgz
Create Docker volume for Domino 11      *Comment: This is a local data store only for test purposes.
docker volume create notesdata
docker volume list
docker volume list
docker volume inspect notesdata
*Comment: you can see the “Mountpoint” for this volume. This is independent from the Domino server container, so you can recreate, update, upgrade container anytime without loosing Domino data and configuration.
“Mountpoint”: “/var/lib/docker/volumes/notesdata/_data”
Create local Domino 11 image repository
docker load –input /opt/install/Domino_1101_DockerImage.tgz
Check image availability
docker image ls -a
My results
REPOSITORY: domino-docker
TAG: V1101_03212020prod
IMAGE ID: 2854f040d034
CREATED: 2 months ago
SIZE: 1.37 GB

Domino server setup

At the end of this process the container will be removed automatically. It is normal.
docker run --rm -e JAVA_OPTS=’-Xmx1500m -Xms1500m’ --name domino-docker -v notesdata:/local/notesdata --hostname d11docker.andras.demo -p 8585:8585 -p 1352:1352 -p 80:80 -p 443:443 domino-docker:V1101_03212020prod --setup
*Comments:
notesdata:/local/notesdata             *Do not change this
-p 8585:8585 -p 1352:1352 -p 80:80 -p 443:443            *end users connect to host operating system on the port on the left side and Docker connects them to Domino server on the ports on the right side. Standard ports for Domino server communication
domino-docker:V1101_03212020prod                 *You can check version with command docker image ls -a                You need TAG.
-e JAVA_OPTS=’-Xmx1500m -Xms1500m’        *If you forget this part, setup will fail at the beginning.

Now you need your test client with HCL Notes client including HCL Remote Server Setup. First of all, test connections to Domino server setup from your test client with telnet.
I use Windows 10 cmd
ping d11docker.andras.demo        *Comment: Do not continue if it does not work!
telnet -e Q d11docker.andras.demo 8585           *Comment: Do not continue if it does not work!
Start HCL Domino Remote Server Setup and configure your Domino server.

Run the first Domino server start command if everything was all right.
docker run -it --name domino-docker -v notesdata:/local/notesdata –hostname d11docker.andras.demo --cap-add=SYS_PTRACE -p 80:80 -p 443:443 -p 1352:1352 domino-docker:V1101_03212020prod
Now you must see Domino server console.
Open another terminal window
docker container list
You can see information about Domino 11 container. You can see that /local/start.sh inside the container starts Domino environment. If you want to see the content of /local/start.sh run command docker container exec -it cat /local/start.sh
Now you can stop Domino server on Domino Console: quit
To get CONTAINER ID run
Docker container ls -a
Save CONTAINER ID !!     My ID is “eef2ea62a40a”
You stop and start the container by command
Docker container stop eef2ea62a40a
Docker container start eef2ea62a40a      -           *Comment: This command starts the container including Domino server without Domino server console. Use Domino Administrator client to manage server.
Remember!
docker volume inspect notesdata
cd /var/lib/docker/volumes/notesdata/_data        *Comment: path is based on inspect result
You can see all databases, ids and ini files.


Useful links

I used these wikis, knowledge bases to build and configure this test environment.
Domino on Docker

Deploying a new Domino server on Docker

Docker installation for HCL Domino server on Linux

Docker general commands

Domino on Docker requirements

Deploying on Docker

Procedure


·         Loading the domino-docker tar archive file to Docker
The first step to deploy a new Domino server on Docker is loading the domino-docker tar archive file to Docker. This creates the image that's used to create containers.
·         Creating the volume to store the data directory
After you load the domino-docker tar archive to Docker, create a Docker volume. The Docker volume is a persistent location to hold the Domino data directory
·         Creating a temporary container for remote server setup
To deploy a new Domino server as a Docker container, first create a temporary container to complete remote Domino server setup.
·         Creating a container for Domino
After you have set up a new Domino server using a temporary container, create the container to run the Domino server.