Reputation: 2134
We are following this tutorial to be able to use the Data Platform IRIS:
https://github.com/es-comunidad-intersystems/webinar-gestion-apis
We have found an issue, because of it looks like the IRIS version which is being requested in the tutorial, is not longer being available at the download page.
We have downloaded the closest version which is:
InterSystems IRIS
2019.4
Then we have tried to follow the steps:
docker load -i iris-2019.4.0.383.0-docker.tar.gz
It outputs:
Loaded image: intersystems/iris:2019.4.0.383.0
Then we have downloaded the webinar code:
git clone https://github.com/es-comunidad-intersystems/webinar-gestion-apis.git
After that we tried to build the Docker image as follows:
docker build . --tag webinar-gestion-apis:stable --no-cache
And we have seen the output:
Sending build context to Docker daemon 754.2kB
Step 1/9 : FROM intersystems/iris:2019.3.0.302.0
pull access denied for intersystems/iris, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
So then, we have thought that this issue is related to the Dockerfile, because of it had the following command:
# building from the InterSystems IRIS
FROM intersystems/iris:2019.3.0.302.0
To adjust it to get the verion we have download, we have written:
# building from the InterSystems IRIS
FROM intersystems/iris:2019.4.0.383.0
So after it, we wrote:
docker build . --tag webinar-gestion-apis:stable --no-cache
And it installed the image correctly:
Being the output:
Sending build context to Docker daemon 758.8kB
Step 1/9 : FROM intersystems/iris:2019.4.0.383.0
---> 46e2532c2583
Step 2/9 : USER root
---> Running in 3de765837aa5
Removing intermediate container 3de765837aa5
---> 35a7d04b1f5a
Step 3/9 : RUN mkdir -p /opt/webinar/install
---> Running in 1b1690dff84f
Removing intermediate container 1b1690dff84f
---> 64d42f352bb9
Step 4/9 : COPY install /opt/webinar/install
---> 2710ae3d8265
Step 5/9 : RUN mkdir -p /opt/webinar/src
---> Running in 12ccd30d880b
Removing intermediate container 12ccd30d880b
---> c2e5d7dff819
Step 6/9 : COPY src /opt/webinar/src/
---> 943d888243a9
Step 7/9 : RUN chown -R ${ISC_PACKAGE_MGRUSER}:${ISC_PACKAGE_IRISGROUP} /opt/webinar
---> Running in 57a5b34bbf70
Removing intermediate container 57a5b34bbf70
---> a8629b4948a0
Step 8/9 : USER irisowner
---> Running in 93d6814d7452
Removing intermediate container 93d6814d7452
---> 4e9faf862ebe
Step 9/9 : RUN iris start iris && printf 'zn "USER" \n do $system.OBJ.Load("/opt/webinar/src/Webinar/Installer.cls","c")\n do ##class(Webinar.Installer).Run()\n zn "%%SYS"\n do ##class(SYS.Container).QuiesceForBundling()\n h\n' | irissession IRIS && iris stop iris quietly
---> Running in 2e28a60b29b4
Using 'iris.cpf' configuration file
This copy of InterSystems IRIS has been licensed for use exclusively by:
Local license key file not found.
Copyright (c) 1986-2019 by InterSystems Corporation
Any other use is a violation of your license agreement
1 alert(s) during startup. See messages.log for details.
Starting IRIS
Node: 2e28a60b29b4, Instance: IRIS
USER>
USER>
Load started on 06/13/2020 08:18:52
Loading file /opt/webinar/src/Webinar/Installer.cls as udl
Compiling class Webinar.Installer
Compiling routine Webinar.Installer.1
Load finished successfully.
USER>
START INSTALLER
2020-06-13 08:18:58 0 Webinar.Installer: Installation starting at 2020-06-13 08:18:58, LogLevel=0
2020-06-13 08:18:58 0 : Creating namespace WEBINAR
Load of directory started on 06/13/2020 08:19:08
Loading file /opt/webinar/src/Webinar/Installer.cls as udl
Loading file /opt/webinar/src/Webinar/API/Leaderboard/v1/impl.cls as udl
Loading file /opt/webinar/src/Webinar/API/Leaderboard/v1/spec.cls as udl
Loading file /opt/webinar/src/Webinar/Data/Player.cls as udl
Loading file /opt/webinar/src/Webinar/Data/Team.cls as udl
Compilation started on 06/13/2020 08:19:08 with qualifiers 'cuk'
Compiling 5 classes, using 2 worker jobs
Compiling class Webinar.API.Leaderboard.v1.impl
Compiling class Webinar.API.Leaderboard.v1.spec
Compiling class Webinar.Data.Player
Compiling class Webinar.Installer
Compiling class Webinar.Data.Team
Compiling table Webinar_Data.Player
Compiling table Webinar_Data.Team
Compiling routine Webinar.API.Leaderboard.v1.impl.1
Compiling routine Webinar.Data.Team.1
Compiling routine Webinar.Installer.1
Compiling routine Webinar.Data.Player.1
Compiling class Webinar.API.Leaderboard.v1.impl
Compiling class Webinar.API.Leaderboard.v1.disp
Compiling routine Webinar.API.Leaderboard.v1.impl.1
Compiling routine Webinar.API.Leaderboard.v1.disp.1
Compilation finished successfully in 0.470s.
Load finished successfully.
Load started on 06/13/2020 08:19:09
Loading file /opt/webinar/install/WebTerminal-v4.9.0.xml as xml
Imported class: WebTerminal.Analytics
Imported class: WebTerminal.Autocomplete
Imported class: WebTerminal.Common
Imported class: WebTerminal.Core
Imported class: WebTerminal.Engine
Imported class: WebTerminal.ErrorDecomposer
Imported class: WebTerminal.Handlers
Imported class: WebTerminal.Installer
Imported class: WebTerminal.Router
Imported class: WebTerminal.StaticContent
Imported class: WebTerminal.Trace
Imported class: WebTerminal.Updater
Compiling 12 classes, using 2 worker jobs
Compiling class WebTerminal.Analytics
Compiling class WebTerminal.ErrorDecomposer
Compiling class WebTerminal.Common
Compiling class WebTerminal.StaticContent
Compiling class WebTerminal.Handlers
Compiling class WebTerminal.Updater
Compiling class WebTerminal.Autocomplete
Compiling class WebTerminal.Core
Compiling class WebTerminal.Trace
Compiling class WebTerminal.Router
Compiling class WebTerminal.Engine
Compiling routine WebTerminal.Analytics.1
Compiling routine WebTerminal.ErrorDecomposer.1
Compiling routine WebTerminal.Common.1
Compiling routine WebTerminal.StaticContent.1
Compiling routine WebTerminal.Updater.1
Compiling routine WebTerminal.Handlers.1
Compiling routine WebTerminal.Core.1
Compiling routine WebTerminal.Router.1
Compiling routine WebTerminal.Trace.1
Compiling routine WebTerminal.Autocomplete.1
Compiling routine WebTerminal.Engine.1
Compiling class WebTerminal.Installer
Compiling routine WebTerminal.Installer.1
Installing WebTerminal application to WEBINAR
Creating WEB application "/terminal"...
WEB application "/terminal" is created.
Assigning role %DB_IRISSYS to a web application; resulting roles: :%DB_IRISSYS:%DB_USER
Creating WEB application "/terminalsocket"...
WEB application "/terminalsocket" is created.
%All namespace is created.
Mapping %WebTerminal package into all namespaces: %All
WebTerminal package successfully mapped into all namespaces.
Load finished successfully.
2020-06-13 08:19:09 0 Webinar.Installer: Installation succeeded at 2020-06-13 08:19:09
2020-06-13 08:19:09 0 %Installer: Elapsed time 11.29037s
INSTALLER SUCCESS
USER>
%SYS>
%SYS>
Removing intermediate container 2e28a60b29b4
---> e23ab1a58cd2
Successfully built e23ab1a58cd2
Successfully tagged webinar-gestion-apis:stable
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
Now is the difficulty, when we try to run the container it says "unhealthy"
docker-compose up -d
The outputs is:
Starting iris-2019.4 ... done
Being the docker-compose.yml (we have kept the original git hub repo file, just changing the container-name from iris-2019.3 to iris-2019.4)
version: '3.2'
services:
iris:
image: webinar-gestion-apis:stable
container_name: iris-2019.4
ports:
- "51773:51773"
- "52773:52773"
volumes:
- ./config/iris.key:/usr/irissys/mgr/iris.key
- ./shared:/shared
When we try to use:
docker-compose ps
We observe:
Name Command State Ports
----------------------------------------------------------------------------------------------
iris-2019.4 /iris-main Up (unhealthy) 0.0.0.0:51773->51773/tcp, 0.0.0.0:52773->52773/tcp
And if we try to debug it and see the logs, we have:
docker inspect --format "{{json .State.Health }}" iris-2019.4
And it shows:
{"Status":"unhealthy","FailingStreak":4,"Log":[{"Start":"2020-06-13T08:30:56.232804406Z","End":"2020-06-13T08:30:56.328718067Z","ExitCode":1,"Output":""},{"Start":"2020-06-13T08:31:56.332937629Z","End":"2020-06-13T08:31:56.427169416Z","ExitCode":1,"Output":""},{"Start":"2020-06-13T08:32:56.43026636Z","End":"2020-06-13T08:32:56.5141952Z","ExitCode":1,"Output":""},{"Start":"2020-06-13T08:33:56.520060854Z","End":"2020-06-13T08:33:56.605017629Z","ExitCode":1,"Output":""}]}
Being the result that we can not connect to:
http://localhost:52773/csp/sys/UtilHome.csp
How could we debug a Docker container which status in unhealthy?
Upvotes: 2
Views: 832
Reputation: 41
I've got several 'unhealthy' and 'warn' container startups, some of them without access to the management portal, the solution was to enter in the container via command line by clicking the console button (first one) command line icon
And then write
bash
cat /usr/irissys/mgr/messages.log
This will show the startup log where you will hopefully able to see the error
Upvotes: 0
Reputation: 11
Maybe a little late but probably that error you were having was caused because of IAM version + license file you were using.
You can try a newer version which runs on IRIS 2021 and IAM 2.3.3: https://openexchange.intersystems.com/package/workshop-rest-iam
Upvotes: 1