Question
Steve Pisani · Feb 10

Interoperability debugging, Containers and the Foreground Window

Hi,

Is it possible to use the IRIS' Interoperability's Foreground Window option for Business Operations when IRIS is running in a docker container ? 

Thanks - 

Steve

Product version: IRIS 2021.2
0
0 288
Discussion (11)3
Log in or sign up to continue

I have not played with the Foreground feature before, but, I tried to do it right now, and it looks like, you can just publish port 63300 when you run the container, so, your host's telnet client will be able to connect to the Foreground port. 

If you wish, you can change the port number, by setting it directly to the global

Set tPortRangeStart=$G(^Ens.Config("FGTelnetRange","start"),63300)
Set tPortRangeEnd=$G(^Ens.Config("FGTelnetRange","end"),63499)

Hi Dmitry

Thanks for this.  I must be missing something from your post as I cannot get this to work.

In my IRIS Instance, in the interoperability configured namespace I have configured this:

set ^Ens.Config("FGTelnetRange","start")=63300
set ^Ens.Config("FGTelnetRange","end")=63499

In my docker-compose configuration I have exposed port 63300 as:   

...
- hostname: localhost
- ports:
    23:63300

and my docker host, (running the same operating system as my customer, which is, Windows),  is not running any other instance of IRIS or has open port 23.

Attempting to start a foreground window for a business operation, fires up IRIS telnet as expected, which, I'm guessing tries to establish a connect to IRIS in the container visible as port 23 as far as the host is concerned.  IRIS terminal , however, for me returns an error saying "TCP Connect() failed... No connection could be made because the target machine actively refused it."

From my host, firing up IRIS Terminal independently, and trying to make a connection to localhost:23 returns: 
<Session disconnected>

What seems to be happening (based on using other telnet clients too), is that the connection is made and then closed by IRIS.

Is this what you did ?

thanks - 

Steve

I working on macOS, and with docker. When I activate foreground, browser tries to execute telnet with this port. Did you try to expose port to the same one on the host, 63300:63300?

Ah - ok that worked.

so..

- make sure IRIS TELNET Terminal (running on the Docker host) can resolve the HOSTNAME this container is running as (this was my actual issue !)
- in Container configure port range to use using Ens.Config if you want and if you do, expose ports in compose.yaml

thanks !
 

Thanks Eduard,  - I did come across that article before posting my question here - but I was hoping to find something that was less of a workaround/risk and more officially supported. 

@Dmitry Maslennikov approach - if I can get it to work, would be preferred as I could bake this into an image via configuration, and, it would require nothing other than just clicking the box in the UI.

Steve

Does foreground mode work only for windows with cterm/iristerm client or can any telnet client connect?

I've tested with a simple telnet client installed inside the container, and it works well.

activate Foreground in Production, and in the terminal, use the command

telnet localhost 63300

Fascinating. Maybe we can pack a separate container with a telnet client and a web page connected to it to debug business hosts in a browser.

that did not work for me, if my telnet client is running on the docker host for some reason.

Just an update that I got this to work with the help of this article and Steve by setting the port ranges as outlined before:

Set tPortRangeStart=$G(^Ens.Config("FGTelnetRange","start"),63300)

Set tPortRangeEnd=$G(^Ens.Config("FGTelnetRange","end"),63499)

and then in the docker-compose file map them as follows:

    ports:

    - "8091:1972"

    - "8092:52773"

    - "63300:63300"

    - "63301:63301"