Written by

Question Igor Pak · Mar 7

EnsLib.JavaGateway.Service to remote JavaGateway

Hello, dear colleagues.

I need to connect to a remote JavaGateway from an Ensemble service.

I am trying to use the EnsLib.JavaGateway.Service with a remote host where the JVM is running.

I can successfully ping the remote Java Gateway from EnsLib.JavaGateway.Service, and Ensemble reports that the service status is OK.

There are no network issues, and all necessary ports are accessible.

My requests work without any problems when I specify localhost in EnsLib.JavaGateway.Service. However, when I specify a remote JVM, I get the following error:

#5023: Error Java-gateway: Connection cannot be established

Do you have any experience running the JVM for EnsLib.JavaGateway.Service on a remote host?

I am also attaching a diagram for better understanding of what I am trying to achieve.

Below is the getLogFile log from intersystems-gateway-3.1.0.jar:

 >> PING

Sent: (18:26:01:582) [Job number = -1] [ThreadID = 67]

  0000:  00  00  00  00  00  00  00  00  00  00  00  00  59  51      ............YQ

 << PING

Received: (18:26:01:582) [Job number = -1] [ThreadID = 67]

  0000:  00  00  00  00  00  00  00  00  00  00  00  00  59  34      ............Y4

 >> DISCONNECT

Sent: (18:26:01:582) [Job number = -1] [ThreadID = 67]

  0000:  00  00  00  00  00  00  00  00  00  00  00  00  59  34      ............Y4

 << DISCONNECT

Received: (18:26:11:585) [Job number = -1] [ThreadID = 68]

  0000:  00  00  00  00  00  00  00  00  00  00  00  00  59  51      ............YQ

The versions I am using:

java -version

openjdk version "1.8.0_442"

OpenJDK Runtime Environment (build 1.8.0_442-b06)

OpenJDK 64-Bit Server VM (build 25.442-b06, mixed mode)

The command I use to start JavaGateway on the remote host:

java -classpath /opt/intersystems-gateway-3.1.0.jar:/opt/intersystems-jdbc-3.1.0.jar com.intersystems.gateway.JavaGateway 55560 "/tmp/jdbc.log" "" 0.0.0.0

Product version: IRIS 2020.1

Comments

Scott Roth · Mar 7

I thought the EnsLib.JavaGateway.Service is its own JVM. I have many different JavaGateway Services build 1 for each database I connect to so I can make MS SQL Query/Stored procedure calls. 

But you want to make sure the %JDBC Server is running at the Server Level as well.

0