This is an old revision of the document!
HANA Proxy
Table of Contents
The HANA Proxy is needed if you want the app to make direct database connections to HANA. For example, if you use HANA on-premises or in a private cloud and you want the app to connect to the Management Database that you created on the HANA server.
The Proxy is a very small Java program with an accompanying systemd service unit to allow for easy installation as a service on a GNU/Linux distribution. Typically it is installed on the same server as HANA.
Download & Install
Open a console to the HANA server and log in as the root
user. (If you cannot log in as root directly, you can use the commands su -
or sudo -i
to switch to the root user before entering the commands below.)
Then download and unpack the hanaproxy tarball within the /root
directory, create a symlink to the unpacked version, and install the systemd service:
v=1.6.0 cd /root wget https://docs.cobisoft.de/wiki/_media/cobi.wms/hanaproxy-$v.tar tar -xf hanaproxy-$v.tar ln -s hanaproxy-$v hanaproxy systemctl enable /root/hanaproxy/hanaproxy.service
After that, you should be able to start it and check its status to make sure it's running:
systemctl start hanaproxy systemctl status hanaproxy
The status
command should say active (running)
in green text.
Control / Monitor
You can start/stop/restart the service or check its current status with systemctl
:
systemctl start hanaproxy systemctl stop hanaproxy systemctl restart hanaproxy systemctl status hanaproxy
Refer to the documentation of systemd/systemctl for more details.
Update
To update, unpack the newest version, update the symlink, and restart the proxy.
v=1.6.0 cd /root wget https://docs.cobisoft.de/wiki/_media/cobi.wms/hanaproxy-$v.tar tar -xf hanaproxy-$v.tar rm hanaproxy ln -s hanaproxy-$v hanaproxy systemctl daemon-reload systemctl restart hanaproxy
Troubleshoot
If you suspect that HANA Proxy may not be working properly even though it is running, you can test a few things.
First of all see if it's reachable from another machine. Let's say the IP Address of the HANA server is 192.168.16.30
. The port used by HANA Proxy is 30075
. Using Nmap, we can try:
nmap 192.168.16.30 -p 30075
On MS Windows you could also use Test-NetConnection
aka tnc
instead of Nmap:
tnc 192.168.16.30 -Port 30075
If the port doesn't seem open, a firewall could be blocking the connection.
Once you've made sure that the port itself is reachable, you can test if HANA Proxy can execute queries. This can be done with a netcat
utility. If you have Nmap installed, you should have the ncat
command which can do this, otherwise if you're on a GNU/Linux distro you should also have a simple nc
tool that is capable enough.
First copy the following HANA Proxy command into a text file, let's say hptest.json
, with the correct password in place of “secret”:
{ "host": "localhost" , "port": "30015" , "user": "SYSTEM" , "password": "secret" , "schema": "SBOCOMMON" , "query": "select * from srgc" }
(The host can be “localhost” when the HANA Proxy is running on the same server as the HANA database. Port 30015
is default for HANA. The SYSTEM
user should have permissions to query any database.)
Now you can send the command to HANA Proxy with the following command:
ncat 192.168.16.30 30075 < hptest.json
The results of the query, or at least an error message, should be returned in JSON format.