cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot connect to SAP HANA2 Express using JDBC: error -813

Former Member
0 Kudos

I have SAP HANA2 Express (db+apps) VirtualBox i running on my Mac OSX (ElCapitan).
I connect to it from Eclipse (running on the MacOS) without any problem. I have also run the PAL examples, using an R server running on the Mac and having SAP HANA connecting to the R server for the computation, and everything works as per tutorials.


However, when I try to connect from within Eclipse using JDBC (the example code provided in tutorials) I always get the error message -813.

I do not think is a JDBC connection string problem, since I have already tried using IP number, and also with the nslookup is all resolved. On the server all processes apparently are working fine.

nmap -p0-65535 hxehost

shows that the expected port 39015 is not open

The same result is obtained when checking from the hxehost using netstat
I've found that the following parameter was set to false

Configuration>sql_client_network_io enabled = false

Even after changing that to "true" I get the same problem.
I've thought that it could be a memory problem, therefore I then tried to remove un-needed load by

xs app stop ....

Even after stopping all apps ... enough free men ... JDBC fails.

Accepted Solutions (1)

Accepted Solutions (1)

former_member451829
Discoverer

Hi! There

Luca, you're absolutely right. The target port is - 39013 (SQL access port)

There is need also to correct peace of code provided in tutorial.

Instead of "jdbc:sap://hxehost:39015/?databaseName=HXE", "SYSTEM", "<userpass>");

need to be "jdbc:sap://hxehost:39013/HXE", "SYSTEM", "<userpass>");

And that's working well!

Regards,
-ILYA-

shivamshukla12
Contributor
0 Kudos

Hi ,

this solved my problem , Able to connect on port 39013.

Thanks,

Shivam

Answers (5)

Answers (5)

former_member207654
Participant
0 Kudos

You cannot change the port for the SystemDB. My suggestion would be enable the tenant database that is disabled by default, and use that. The moment you do that, an indexserver process will start up, and it will listen on port 39015. The issue here is with the BO client, which is not expecting anything to run in a multi-tenant system without a tenant.

The default setup is good for getting going with HANA, and the first tutorials on the HANA express page work well with it, but, there are use cases which requires the first tenant. Using PAL, for example, is another one.

This HANA academy video will guide you through the process (albeit for a different purpose)

former_member451829
Discoverer
0 Kudos

Is there any solution to change the port?

former_member451829
Discoverer
0 Kudos

The last problem is that when I try to create an OLAP connection in SAP BO IDT tool the problem you noticed appears again! And NO chance to change the port to 39013 (No such options)


"ErrorCode: -813 Message: SAP DBTech JDBC: Cannot connect to jdbc:sap://hxehost:39015 [Cannot connect to host hxehost:39015 [Connection refused: connect (port 39015 to address ::ffff:10.0.35.30)], -813.]"

maxnuf
Explorer
0 Kudos

Hi Luca,

HANA2 Express is configured as multitentant database. In that configuration the SYSTEM database listens to 5NN13 port for standard database access.

See https://wiki.scn.sap.com/wiki/display/TCPIP/SAP+HANA+Platform for an overview of all the ports used by HANA.

When in HANA Studio (Eclipse), you can also right-click your connection. Select properties -> Hosts used to connect. It will also show you the port used by Eclipse.

Former Member
0 Kudos

I solved the problem, using a different port.

I found the right port looking at the debugging log in Eclipse (after having enabled full tracing).

There I've seen that it is port 39013 and not 39015 to be used for jdbc connection.

And that worked well.