Docker container error

Dear team,

I am trying to experiment the Docker container in our development environment. I have successfully build an image and running the container. When I access the CSP portal home page ( http://<host-ip>:57772/csp/sys/%25CSP.Portal.Home.zen?$NAMESPACE=%25SYS), I am getting the following error:

Caché Server Pages Version 2017.1.1.111.0.17521
 
Server Availability Error
Server is currently unavailable

 

I logged in to the running container (docker exec -it <container-id> sh), issued the command, 'ccontrol list' where the state says 'warn'.

Configuration 'CACHE'   (default)
        directory: /opt/healthshare/
        versionid: 2017.1.1.111.0.17521
        conf file: cache.cpf  (SuperServer port = 1972, WebServer = 57772)
        status:    running, since Mon Apr 22 12:02:09 2019
        state:     warn

After some time (around 30 minutes later), the state is changed to ok. But, still getting the same error when accessing the CSP portal home page.

I looked at the alerts.log under /opt/healthshare/mgr, which says the following error:

(376) 2 System appears to have failed over from node bbce08f01ef1

Any help would be greatly appreciated!

Here is the Dockerfile I am using:

FROM centos:latest

MAINTAINER devEnv

RUN yum -y update && \
    yum -y install which tar hostname net-tools wget java-1.8.0-openjdk &&\
    yum -y clean all

ENV TMP_INSTALL_DIR=/tmp
ENV LONG_FOLDER=HS-2017.1.1.111.0.17521-hscore15.03_hsaa15.03_hspi15.03_hsviewer15.03_linkage15.03-b8384-lnxrhx64

ENV ISC_PACKAGE_INSTANCENAME="CACHE" \
    ISC_PACKAGE_INSTALLDIR="/opt/healthshare/" \
    ISC_PACKAGE_UNICODE="Y" \
    ISC_PACKAGE_CLIENT_COMPONENTS="" \
    ISC_PACKAGE_INITIAL_SECURITY="Minimal" 

RUN mkdir -p ${TMP_INSTALL_DIR}
WORKDIR ${TMP_INSTALL_DIR}

COPY HS-Install .

WORKDIR ${TMP_INSTALL_DIR}/$LONG_FOLDER

RUN ./cinstall_silent && \
    ccontrol stop $ISC_PACKAGE_INSTANCENAME quietly && \
    rm -rf $TMP_INSTALL_DIR 
    
COPY HS-Install/cache.key $ISC_PACKAGE_INSTALLDIR/mgr/

COPY ccontrol-wrapper.sh /usr/bin/
RUN cd /usr/bin                     && \
    rm ccontrol                     && \
    mv ccontrol-wrapper.sh ccontrol && \
    chmod 555 ccontrol

WORKDIR ${ISC_PACKAGE_INSTALLDIR}

EXPOSE 57772 1972

WORKDIR /
ADD ccontainermain .
RUN chmod +x /ccontainermain

ENTRYPOINT ["/ccontainermain", "-i", "CACHE"]

 

building the image with:
docker build -t siva/devcache:1.0 --no-cache .

running it with:
docker run -d -p 57772:57772 -p 1972:1972 --privileged  siva/devcache:1.0 -shmem=7168


 

  • 0
  • 0
  • 78
  • 6
  • 2

Answers

Most of the reasons for getting such error is just missed license file or exceeded license limit.

Just check it, you can mount it during docker run or copy it inside the image during docker build.

I see that you use quite an old version, I would recommend considering usage latest version based on IRIS. Due to many limitations of using such an old version in Docker.

Thank you so much Dmitry for your quick response!

 Following is the logs I captured when building the docker image. It seems, it is complaining about "License missing or unreadable". 

....
Starting up HealthShare...
Once this completes, users may access HealthShare
Using 'cache.cpf' configuration file

This copy of Cache has been licensed for use exclusively by:
License missing or unreadable.
...
...
Installation completed successfully
 ---> f2c7971c5194
Removing intermediate container 38f300e31474
Step 13/21 : COPY HS-Install/cache.key $ISC_PACKAGE_INSTALLDIR/mgr/
 ---> 1aae89597d95
Removing intermediate container bb195b168e18
...
...

 Do I need to copy the cache.key file before the following command? 
  RUN ./cinstall_silent ....

It's not so much important to have key before install, much more important to have it when server is running.

But how you sure that your key is suitable for this platform. You can check it on running container, where you can enter inside, and go the csession. You can find some intersting methods for $SYSTEM.License in the documentation which can help you to check license file inside the container.

Thank Again Dmitry! 
I re-build the image after copying the cache.key to the install folder (where cinstall_silent resides). During the docker image build, it correctly print the Organization name as licensed.

Also, inside the running container, when I issued the "csession <instance-name>", nothing happened. The Alert log has the following entry.

04/23/19-12:51:47:259 (876) 3 Process 876 (JobType=Interactive job (programmer mode),Directory='/opt/healthshare/mgr/') caught signal 11. If core dumps are enabled, a core file will be created by process 877 in the location specified by the system configuration.

Anyway, I will try find if I can get the latest version of HS.
 

Siva,

This message is something you can safely ignore:

(376) 2 System appears to have failed over from node bbce08f01ef1

This message is printed because the hostname in your docker build environment is different from the hostname inside your container runtime, which causes the system to think this is a potential mirror-failover situation, and set a warning state.  You can suppress this message by killing the global ^SYS("NODE") during the docker build step.

I'm not sure what the problem is here, but one possibility is that Docker has changed storage drivers in the last year or two, and that the version of Cache you're using is only supported on the devicemapper storage driver.  You may wish to consider using a version of IRIS that supports overlay2, which is the default storage driver on almost all modern versions of Docker.

Thank you, Conor for your comment. Sure, I will try to find if I can get the latest version of HS.

Comments

What's the OS and docker version you are running this on? There are known issues with running docker on windows, as well as known problems with older versions of docker on redhat/centos.

Hi Fabian,

Thanks for asking! I should have mentioned it in my original question, but missed it.

Docker version 17.03.3-ce
Host OS: Redhat 3.10.0-957.el7.x86_64