New post

Find

Article
· Mar 26 5m read

Instalar WebTerminal en IRIS 2024.3

Las versiones recientes de IRIS contienen varios cambios que afectan a la instalación y condiguración de la herramienta OpenSource WebTerminal.

En este articulo, vamos a ver los pasos de instalación, y aprender a buscar y resolver los errores del WebGateway paso a paso.
Esta guía de instalación se ha realizado con la versiones siguientes, las más recientes soportadas a fecha de marzo de 2025:

  • Windows 2022 on Internet Information Server (IIS)
  • IRIS 2024.3 
  • Package Manager 0.9.2
  • WebTerminal 4.9.6

IRIS2024.3 es la primera versión de IRIS que no incluye un Servidor Web como parte de la instalación (con la excepción de las versiones "Community" de capacidades más limitadas, que siguen incluyendo un Servidor Web Apache para simplificar el "on-boarding"). En consecuencia, es importante instalar y configurar rimero el Servidor Web IIS antes de proceder a la instalación de IRIS. De esta manera, el instalador de IRIS detecta la presencia del IIS, y propose instalar/configurar un WebGateway que redirige las peticiones Web desde IIS a IRIS. Es posible realizar los pasos en orden inverso (instalar IRIS, despues instalar IIS), pero este requiere la instalación y configuración manual del componente Webgateway de InterSystems.

 

Guia Rapida para los impacientes

Algunos no querreis leer el articulo entero, resumo aqui los elementos principales de esta guía:

  • Instalar IIS primero
    • Añadir protocolo WebSockets
  • Instalar IRIS
    • con la opción de modificar la configuración de IIS
  • Instalar el ZPM en IRIS con
    • s version="latest" s r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/"_version_"/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
  • Configurar el ZPM para que acceda a los package del community
    • zpm "enable -community"
  • Instalar WebTerminal en el namespace USER
    • zpm "install webterminal"
  • Añadir el privilegio Publico de "READ" sobre el recurso %DB_USER 
  • en IIS:
    • Añadir las aplicaciones /terminal y /terminalsocket a IIS. Redigirlas para usar el module CSPms del Webgateway, sin verificar si el archivo existe.
  • Connectar con   

Y Ahora, pasamos a la guía completa con más detalles...

 

Instalación y configuración de IIS

 Un requerimiento del WebTerminal es el uso de WebSockets, protocolo que no esta habilitado por defecto en IIS.

 

El Windows Server Manager permite añadir "Roles de Servidor", e instalar IIS:

Se escoge IIS:

 

Y en las opciones siguientes, se despliega "Aplication Development" para escoger la opción de "WebSockets":

 

Instalación de IRIS

Se instala IRIS 2024.3. Como ya esta instalado IIS, en un paso del Wizard de instalación, se pregunta si se quiere configurar IIS. Este paso instala y configura el InterSystems WebGateway como Modulo de IIS:

 

Instalación del Package Manager IPM

El codigo y la documentación de InterSystems Package Manager (IPM anteriormente ZPM)  esta en

https://github.com/intersystems/ipm

Para la instalación, se puede usar el comando descrito en el README.MD de github

s version="latest" s r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ISC.FeatureTracker.SSL.Config" d r.Get("/packages/zpm/"_version_"/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")

Y Despues, usar el siguiente comando para permitir el acceso al los Packages de la communidad y habilitar el Package Manager en todos los namespaces

zpm "enable -community"

 

Instalación del WebTerminal

 

zpm "install webterminal"

En este paso, se puede validar que el aceso al WebTerminal todavia no esta operacional, ya que IIS + el Webgateway no redirigen la URL /terminal/ a la instancia de IRIS

http://127.0.0.1/terminal/

Abrimos la aplicación de configuración de IIS, para añadir las 2 aplicaciones Web Siguientes

Aplicación
/terminal
/terminalsocket

/terminal y /terminalsockets:

 

A Continuación se debe definir el handler Mapping para esta aplicación, de manera que todas la peticiones estén gestionadas por el WebGateway:

 

Además, en el "Request Restrictions", es importante permitir las llamadas sin validar que exista un fichero correspondiente. Esto se hace sacando el "check" al "Invoke handler only if request is mapped to:".

 

Con estos cambios realizados, el IIS ya reenvia las peticiones http://localhost/terminal/ al WebGateway, y la configuración por defecto del Web Gateway redirige estas peticiones a IRIS. 

Se puede validar este paso haciendo una traza de las peticiones del Web gateway mediante la pagina de configuración disponible en http://localhost/csp/bin/system/Module.cxw 

En el menu "View HTTP Trace" s puede ver la petición y la respuesta de IRIS (un Error 401).

 

En IRIS, se puede investigar la causa del error 401, con las paginas del Audit, que informan de la naturaleza del error interno:

 

Menu de Portal de Gestión "Administration" / "Security" / "Auditing" / "Configure System Events".

  • Para ello, hace falta añadir el "System Event" de "Protect" a la lista de Eventos a registar, y cambiar su estado a "Yes":

 

Desde el Log de Audit, haciendo una búsqueda sobre los últimos errores, podemos ver 2 errores vinculados con la peticion a /terminal/:

Y los detalles del Error Protect:

 

La Aplicacion WebTerminal ha sido instalada en el namespace "USER", cuya base de datos esta protegida por el recurso "%DB_USER". El CSP Gateway, cuando establece la conexión e intenta acceder a la aplicación REST /terminal en este namespace, necesita permisos de lectura para responder a las peticiones HTTP Options (preflight requests para CORS).
La solución es dar el permiso publico de Lectura sobre el recurso %DB_USER:

Se hace con el menu "System" /" Security" / "Resources", seleccionando %DB_USER, y añadiendo "Read" como permiso publico.

 

Y finalmente, se puede volver a hacer la prueba y acceder al terminal, introduciendo usuario y password:

http://localhost/terminal/
Discussion (0)1
Log in or sign up to continue
Question
· Mar 26

"Bad value for type long" on select from PostgreSQL via EnsLib.SQL.OutboundAdapter

Here is my code:

Method getStocks(pRequest As Stock.Message.Req, Output pResponse As Ens.StreamContainer) As %Status
{
     s tSC = pRequest.NewResponse(.pResponse)
     q:$$$ISERR(tSC) tSC

     #dim pRS As EnsLib.SQL.GatewayResultSet

     s tSC = ..Adapter.ExecuteQuery(.pRS, "select jsonb_agg(s) #>> '{}' FROM prod.stocks s where s.""Warehouse"" = ?", pRequest.Warehouse)
     q:$$$ISERR(tSC) tSC

     s pResponse = ##class(Ens.StreamContainer).%New()
     s pResponse.Stream = ##class(%GlobalCharacterStream).%New()

     i pRS.Next() {
          d pResponse.Stream.CopyFrom(pRS.GetDataStream(1))
     else {
          s tSC = $$$ERROR($$$GeneralError"ResultSet is empty")
     }

     q tSC
}

I created BO with EnsLib.SQL.OutboundAdapter, created DSN and seated it in operation settings. I am using a postgresql-42.7.4 JDBC driver. When I ran it, I got an empty record set error in trace and next record in Java Gateway log:

Sent: (10:12:08:696) [Job number = -1] [ThreadID = 10]
  0000:  4A  13  7E  00  00  00  00  00  00  00  00  00  59  4D      J.~.........YM
  000E:  00  00  00  43  13  7E  00  02  52  00  65  00  6D  00      ...C.~..R.e.m.
  001C:  6F  00  74  00  65  00  20  00  4A  00  44  00  42  00      o.t.e. .J.D.B.
  002A:  43  00  20  00  65  00  72  00  72  00  6F  00  72  00      C. .e.r.r.o.r.
  0038:  3A  00  20  00  42  00  61  00  64  00  20  00  76  00      :. .B.a.d. .v.
  0046:  61  00  6C  00  75  00  65  00  20  00  66  00  6F  00      a.l.u.e. .f.o.
  0054:  72  00  20  00  74  00  79  00  70  00  65  00  20  00      r. .t.y.p.e. .
  0062:  6C  00  6F  00  6E  00  67  00  20  00  3A  00  20  00      l.o.n.g. .:. .

[Update 1] The problem is: Why does Java Gateway try to read a text (varchar) type field as a long type?

[Update 2] The reason is not in a big text value of the selected field. I tried to limit records for json and got the same error

3 Comments
Discussion (3)2
Log in or sign up to continue
Article
· Mar 26 7m read

Génération des spécifications OpenAPI

Introduction

Une API REST (Representational State Transfer) est une interface qui permet de faire communiquer différentes applications entre elles via le protocole HTTP, en utilisant des opérations standard telles que GET, POST, PUT, et DELETE. Les API REST sont largement utilisées dans le développement de logiciels pour exposer des services accessibles par d'autres applications, permettant ainsi l'intégration entre différents systèmes.

2 Comments
Discussion (2)1
Log in or sign up to continue
Article
· Mar 25 2m read

Workaround for scikit-learn 1.6.0 Incompatibility in IRIS 2024.3 AutoML

Introduction

In InterSystems IRIS 2024.3 and subsequent IRIS versions, the AutoML component is now delivered as a separate Python package that is installed after installation. Unfortunately, some recent versions of Python packages that AutoML relies on have introduced incompatibilities, and can cause failures when training models (TRAIN MODEL statement). If you see an error mentioning "TypeError" and the keyword argument "fit_params" or "sklearn_tags", read on for a quick fix.

Root Cause

  • scikit-learn updated to version 1.6.0, deprecating fit_params.
  • scikeras is no longer updating the "wrappers" for Tensorflow.
  • Installing these packages in IRIS 2024.3 without pinned dependencies leads to training errors.

Symptoms

You may encounter:

<TypeError>: got an unexpected keyword argument 'fit_params'

or

[%msg: <ERROR #5002: ObjectScript error: <PYTHON EXCEPTION> *<class 'AttributeError'>: 'super' object has no attribute '__sklearn_tags__' [^%ML.AutoML.Provider.1:%SYS]>]

during the model training phase.

 

Workaround: 

1. Uninstall Existing Packages (if needed)

pip uninstall scikit-learn xgboost keras ...

 

2. Install via Snapshot

pip install --index-url https://registry.intersystems.com/pypi/simple \
  --no-cache-dir \
  --target /path/to/iris/python \
  -r /path/to/requirementsSnapshot.txt

 3Verify

• Run your smoke tests to confirm no fit_params errors.

• Ensure scikit-learn is pinned at <1.6.0.

Note: The exact means by which you can obtain or access requirementsSnapshot.txt are still under discussion. For now, please contact your InterSystems representative or consult the official documentation channels for the most up-to-date link or distribution process.

Alternative: Pin scikit-learn <1.6.0

If you prefer not to use the snapshot file, you can manually pin the version:

pip install scikit-learn<1.6.0 xgboost keras ...

This will work around the issue until XGBoost and Keras officially update their packages.

Next Steps

  • InterSystems has implemented changes to the AutoML code to solve the issue in future releases -- this is mostly an issue for older containers such as 2024.3, the first release to use the post-installation procedure to install IntegratedML.
  • InterSystems is issuing a customer alert for the IRIS 2024.3 ml containers (containers.intersystems.com/intersystems/iris-ml:2024.3), that references this article.
  • If you have questions or run into issues, feel free to comment below or reach out to your InterSystems support contact.

Additional Resources:

Discussion (0)2
Log in or sign up to continue
Announcement
· Mar 25

Open Call for User Insights Interviews

Are you a developer, data engineer, integration engineer, or data scientist who works hands-on with InterSystems products? 

We are conducting 30-45 minute interviews to understand your experience — how you started with InterSystems products, where you find helpful code samples, and how we can improve our products to better support your journey. 

If you’re interested, fill out a quick survey to share your contact info and experience.

If you're selected, we will schedule a session at your convenience between April 2 and May 8 for an interview based on the information you provide.

🎁 As a thank-you, interview participants will receive 10,000 Global Masters points!

Your feedback will directly help us improve your experience using InterSystems products and services.

Kindly note that the spots are limited. 

Discussion (0)1
Log in or sign up to continue