Your Espresso Logic server runs (typically) in the public cloud (e.g. Amazon).Your database very often runs in a private network, behind a heavily fortified firewall.
You can set this up in just a few minutes, once you have the required information.
This can be the database server itself, or it can be some other computer, including your own desktop or laptop. Any machine that can connect to your database should do.
In general, it's preferable to use a server-type machine, since you typically don't want to kill the connection when you go home with your laptop. But for temporary connections and experimentation, a desktop or laptop machine will do fine.
A Unix, Linux or Mac is usually preferable, but a Windows machine can also be used with a bit of extra work.
This assumes, of course, that your firewall allows you to do this. Port 22, which is used by ssh, is often constrained.
You will need the following information:
Open a command line and try to run
Execute the following command:
This command will not return, and the tunnel will be open as long as that command is running. If you want to run the tunnel in the background, you can add the -f option. You can also run this as a service -- ask your Unix administrator for details, as this is rather OS-specific.
PuTTY is a free package (we recommend you download and run the installer). Putty is free, and is adequate for casual testing.
For serious use, we recommend BitVise SSH client, which is fairly inexpensive. We have found BitVise to be more reliable and easier to use.
If you use Putty, you'll need to convert the private key using puttygen:
Important: in the next step, make sure you refer to the converted key file (with the .ppk extension), and not the one you got from Espresso (with the .pem extension).
Once you have the converted key, you can run the following command (plink.exe is in the same directory as PuTTY):
If successful, the output should simply be:
Note that this command will not return: as long as it is running, you will have a tunnel open between your Espresso server and your database. You can hit Ctrl-C to stop it and terminate the tunnel.
If you want this tunnel to run on a permanent basis, you can look at various solutions (such as Microsoft's srvany or Iain Patterson's excellent NSSM) to run this command automatically as a service.
BitVise can use the key file as is, there is no need to convert it.
After starting the BitVise client, you'll need to enter your server name in the "Host" field. "Username" should be "tunnel", and port should be 22. You can then click on Host key manager to import the key file.
Once that is set up, you can then select the S2C tab and create an entry with the following values:
The Listen interface should be the IP address of your Espresso server, which is implied in its name.
The Listen Port should 23432
The Destination Host should be the name or IP address of your database server.
The Destination Port should be the port number for your database.
Click the Login button, and your tunnel should be up.
Once the tunnel is established, you should be able to specify your database URL in the Logic Designer as:
Please note: for SQL Server, you may need to follow these additional instructions.
Use a valid user name and password for your database.
Please note: you must use the address 127.0.0.1 in the JDBC URL. This is a special address referring to your Espresso Logic server.
Test your database in the Logic Designer to make sure everything is working properly. High latency is possible if your database is far from your Espresso server.
Remember that your Espresso Logic server will only be able to talk to your database as long as you keep that tunnel open!