Skip to main content
Previous section

Managing External Python Servers

An External Python Server is a Python process that uses the InterSystems gateway connection protocol to communicate with a monitor process running in InterSystems IRIS (see “Introduction to Gateway Connections” for details). This chapter provides a detailed description of how to control gateway connections and create named External Python Server definitions.

Controlling Gateway Connections

The Management Portal provides a page that displays the current status of all defined external servers. It allows you to start or stop external servers, and to control and monitor gateway connections. To open the this page, go to System Administration > Configuration > Connectivity > Object Gateways.

The example shown in the following illustration displays information and controls for a previously created External Python Server definition named PyGate:

generated description: smp gatelist

The PyGate External Python Server definition is a named collection of configuration settings used to construct the Python command that will start an External Python Server process (see “Configuring External Python Servers” for information on how the PyGate definition was created).

The display line for PyGate provides the following information:

  • PyGate is the unique name for this collection of configuration settings. A named configuration cannot be used to start more than one external server instance at a time.

  • Type indicates that this definition is for external servers running under Python.

  • Server is the IP address or name used to connect to the host machine running Python. This example uses the local host address, indicating that Python and the external server run on the same machine as InterSystems IRIS.

  • Port is the unique port number used whenever InterSystems IRIS establishes a gateway connection to the PyGate external server. No two gateway connections can use the same port simultaneously.

  • State indicates whether or not a PyGate External Python Server process is currently running.

This display also provides the following controls:

  • Activity is a link to a page that displays detailed information about all PyGate external server instances that have been started or stopped since InterSystems IRIS was started.

  • Start will instantiate a PyGate external server and display detailed startup information about the process. If the external server is already running, a Stop command will be displayed instead.

  • Edit opens a form that allows you to change any configuration option except the name PyGate.

  • Delete allows you to delete the PyGate external server definition.

“Object Gateways” and External Python Servers

The name “Object Gateway” is an older term used for external server definitions and gateway connections. Future releases of InterSystems IRIS will remove this Management Portal page and replace it with a completely new External Language Server interface.

Configuring External Python Servers

An External Python Server definition is a named collection of configuration settings stored in the InterSystems IRIS database. This information is used to construct the Python command line that starts an external server process, and is also used when InterSystems IRIS attempts to establish a gateway connection to that process. Each external server definition has a unique name, and a definition cannot be used for more than one external server at a time.

The following example creates an External Python Server definition named PyGate. To start, click the Create New Gateway button on the Object Gateways page (System Administration > Configuration > Connectivity > Object Gateways).

generated description: smp newbutton

This form is used to define External Language Servers for all languages (Java and .NET as well as Python). Click the Python radio button at the top of the form to display the fields intended specifically for Python external servers.

Creating an External Python Server definition
generated description: smp newgate
Settings used by all external servers
  • Object Gateway For [.NET|Java|Python] Required.

    Click Python to display the fields required for Python external servers.

  • Gateway Name Required.

    Unique name that you assign to this server definition. The name is used as the database identifier for the stored definition, and cannot be changed after the definition has been saved.

  • Server Name / IP Address

    IP address or name of the host machine where the external server will run. The default is "" (the local machine). Specify "" to listen on all IP addresses local to the machine (, VPN address, etc.).

  • Port Required.

    Unique TCP port number for communication between the external server and InterSystems IRIS. No two gateway connections can use the same port simultaneously.

  • Use PassPhrase

    If this property is checked, InterSystems IRIS will require a security passphrase to connect to the external server.

  • Log File

    Full pathname of the log file on the host machine. External server messages are logged for events such as opening and closing connections to the server, and for error conditions encountered when mapping Python classes to proxy classes. Due to performance considerations, this optional property should only be used for debugging.

Settings that apply only to Python external servers
  • Python Executable Path

    Fully qualified filename of the Python executable that will be used to run the external server. This setting is optional if there is a default Python interpreter that can be used without specifying its location.

  • Python Options

    Optional property that defines extra command line settings to be included when constructing the Python command that starts the external server.

Advanced Settings

The Advanced Settings section is relevant only when using gateways in Interoperability Productions (currently supported only for Java and .NET).

Click Save to store the external server definition in the database. The Gateway Name is the unique identifier for the definition, and cannot be changed after the definition has been saved.

An existing external server definition can be edited by clicking the edit link for that definition on the Object Gateway page. This form offers the same fields as the previous example except that Gateway Name cannot be changed.

Editing an existing External Python Server definition
generated description: smp edit