sap-tutorials / Tutorials

Tutorials on sap.com
https://developers.sap.com/tutorial-navigator.html
Creative Commons Attribution 4.0 International
727 stars 774 forks source link

Installing SAP HANA, express edition with Docker #2228

Closed tschm closed 6 years ago

tschm commented 6 years ago

I struggle to access my docker container. Did you forget to include -p "39015:39015" for the docker run command. I am using

nmap -p 39015 quantsrv

where quantsrv is the local server running the docker container.

thomas@thomas-All-Series:~/Downloads$ **nmap -p 39015 quantsrv**

Starting Nmap 7.01 ( https://nmap.org ) at 2018-02-13 10:39 CET
Nmap scan report for quantsrv (192.168.100.15)
Host is up (0.00054s latency).
rDNS record for 192.168.100.15: quantsrv.lobnek.com
PORT      STATE  SERVICE
**39015/tcp closed unknown**

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds
thomas@thomas-All-Series:~/Downloads$ **nmap -p 39013 quantsrv**

Starting Nmap 7.01 ( https://nmap.org ) at 2018-02-13 10:39 CET
Nmap scan report for quantsrv (192.168.100.15)
Host is up (0.00044s latency).
rDNS record for 192.168.100.15: quantsrv.lobnek.local
PORT      STATE SERVICE
**39013/tcp open  unknown**

Nmap done: 1 IP address (1 host up) scanned in 0.03 seconds
thomas@thomas-All-Series:~/Downloads$ **nmap -p 39017 quantsrv**

Starting Nmap 7.01 ( https://nmap.org ) at 2018-02-13 10:39 CET
Nmap scan report for quantsrv (192.168.100.15)
Host is up (0.00050s latency).
rDNS record for 192.168.100.15: quantsrv.lobnek.com
PORT      STATE SERVICE
**39017/tcp open  unknown**

I try to connect from Python using

from hdbcli import dbapi

conn = dbapi.connect(
    address="192.168.100.15",
    port=39013,
    user="SYSTEM",
    password="HXEHana1"
)

print(conn)

With port 39013 I get hdbcli.dbapi.Error: (1033, 'error while parsing protocol: invalid action type')

With porst 39015 I get hdbcli.dbapi.Error: (-10709, "Connection failed (RTE:[89006] System call 'connect' failed, rc=111:Connection refused (192.168.100.15:39015))")

aplata-sap commented 6 years ago

Hi there,

Try connecting using port 39017. We're updating the tutorials to reflect this.

tschm commented 6 years ago

Ok, I managed to connect on port 39017. Many thanks. BTW: I do not use the Docker Enterprise Edition. I did it with Docker CE and Ubuntu 16.04. Also it is not required to do an explicit docker pull. Docker run will pull the image if not found locally.

thecodester commented 6 years ago

@aplata-sap Please close the issue when the tutorial has been updated. And thanks for responding so quickly.

tschm commented 6 years ago

Before you close it. I have managed to connect via port 39017 using your Python tools. The HANA Studio doesn't give me the chance to change the port. It's only asking for an instance (I state it's 90). I fail to connect to the database there. Can you please clarify?

Lsubatin commented 6 years ago

Hi, please refer to the following tutorial, step 7B: https://www.sap.com/developer/how-tos/2016/09/hxe-howto-eclipse.html

tschm commented 6 years ago

Ah got it. Many thanks @Lsubatin and @aplata-sap. Am I the only user who finds the SAP documentation a bit convoluted? You may want to mention for the brave docker guinea pigs that you have to apply special caution for eclipse on the docker page :-)

Lsubatin commented 6 years ago

This tutorial is getting its due updates and feedback like yours help a lot. Out of curiosity and because I may be able to point you to other resources, what are planning building?

tschm commented 6 years ago

At this stage I am in for intellectual curiosity and general software developer masochism. I am always interested in storing large amounts of time series data and trying to predict the unpredictable. I am in particular interested in your analytics platform. I also think Hana opens the door for some beautiful vertical integration but I think I prefer running a few independent containers. Hana could become one of them...

Lsubatin commented 6 years ago

LOL I will add " sw developer masochism" to my list of motivations.

Hopefully I can make up for the time you've spent on less interesting masochism. You will need to use the tenant database because the SYSTEMDB one is mostly for administration and does not have all SQL capabilities. Your Docker image already contains a tenant which is called HXE and you can use that one. The port for that tenant on Docker is 39041, btw.

Connected from HANA Studio to the SYSTEMDB as the user SYSTEM, use this SQL statement to activate the scriptserver (the guy that processes the predictive stuff, among others):

ALTER DATABASE HXE ADD 'scriptserver';

@adadouche may have a reference to provide.

adadouche commented 6 years ago

Hi @Lsubatin & @tschm ,

You can check a blog series I'm working on named Project: Machine Learning in a Box.

In your case we can rename it Project: Machine Learning in a Container.

I just released week 4 where I discuss how to connect to your HXE instance using your tool of choice (Eclipse, HDBSQL, JDBC or ODBC based tools).

Next I' planning for the import data piece with some available datasets.

Then we will start playing with a few algorithms.

JCurrie27 commented 6 years ago

Closing this issue.

cocopapagal commented 5 years ago

You will need to use the tenant database because the SYSTEMDB one is mostly for administration and does not have all SQL capabilities.

Hi Lucia, can you please put more light on this: **_

SYSTEMDB *** does not have all SQL capabilities.

_**

Nareshvarmaku commented 5 years ago

Please help me with creating a docker image for sap hana with imported data into it.

JCurrie27 commented 5 years ago

Hello Nareshvarmaku: I recommend you take advantage of our SAP HANA express edition Community Support. Reach out to the Community with details on the problems you're experiencing, and other users and internal experts will offer suggestions based on their Docker image experiences. To ask a question, go here and ensure you add the SAP HANA, express edition tag. Kind regards, JCurrie27