Direct Transaction Engine Connection

SSH Tunneling is supported with the direct property. By default, direct is set to false. When set to true, the property indicates the Connection will be made directly to a TE (instead of to a broker). This enables a connection string to be set up in a third party tool, for example, DBVisualizer, on a tunnel you have set up to a specific TE.

The syntax for setting up a JDBC connection to an SSH tunnel is:

jdbc:com.nuodb://te-host1:te-port1/database?params&direct=true

To find the TE's host and port, use the show domain summary command in NuoDB Manager.

$ nuodbmgr --broker host --password domainPassword
NuoDB host version: 2.6: Professional Edition
nuodb [domain] > show domain summary
 
Hosts:
[broker] * ip-172-31-40-24/107.23.52.10:48004 (us-east-1)
 
Database: test, template [Single Host] MET, processes [1 TE, 1 SM], ACTIVE
[SM] ip-172-31-40-24/107.23.52.10:48006 (us-east-1) [ pid = 32594 ] [ nodeId = 1 ] RUNNING
[TE] ip-172-31-40-24/107.23.52.10:48007 (us-east-1) [ pid = 32611 ] [ nodeId = 2 ] RUNNING

The JDBC URL can then be constructed using the TE's port.

jdbc:com.nuodb://107.23.52.10:48007/test?schema=test&direct=true

Multiple TEs can be specified in the JDBC URL as follows:

jdbc:com.nuodb://te-host1:te-port1,te-host2:te-port2,...,te-hostN:te-portN/database?params&direct=true

Tunnel Options

The ssh command allows you to establish a tunnel into a remote machine and to execute commands on that remote machine.

Direct localhost Tunnel

In this example, a direct tunnel is established between a local machine (localhost) and a target Amazon EC2 NuoDB TE instance, going from port 48005 on localhost to an open port, 48010, of the EC2 host (54.204.215.251) as user ec2-user.

$ ssh -L 48005:localhost:48010 ec2-user@54.204.215.251

Using a Jump Server

In this example, an Amazon EC2 instance acts as the jump server (Host A), ec2-54-224-133-82.compute-1.amazonaws.com, with user ec2-user. The jump server opens an SSH connection to a known host, 54.204.215.251 (Host B), that has an open port on 48010 and creates a port locally on port 48005.

# ssh -L 48005:<Host B>:48010 ec2-user@<Host A>
 
$ ssh -L 48005:54.204.215.251:48010 ec2-user@ec2-54-224-133-82.compute-1.amazonaws.com