Skip to content

Installing SAP HANA, express edition with Docker fails: general error: Database could not be started #4654

@sven-petersen

Description

@sven-petersen

Tutorial URL: https://developers.sap.com/tutorials/hxe-ua-install-using-docker.html

Please specify the step you are referring to: Step 8

I am facing the following error (full log output below)

Creating tenant database ...
2: general error: Database could not be started;start databaseServer for database=3 on : ubuntuvm:39040 failed SQLSTATE: HY000

I do see the issue on CentOS 7 as well as Ubuntu 18.04. The Linux system is running in a VM on a Mac using VMWare Fusion.

I have created the users hxeadm and the group sapsys on the (Ubuntu) VM like so:

sudo useradd hxeadm -u 12000
sudo groupadd sapsys -u 79
sudo usermod -a -G sapsys hxeadm

I have used to user ids as they were used in the tutorial (is this step actually missing from the tutorial? Because it seems the user must be created on the Host in order for the docker container to function).

and created the directory which is mounted into the docker container like so

sudo mkdir -p /data/hxe
sudo chown hxeadm:sapsys -R /data/hxe
sudo chmod -R 777 /data/hxe

(I know, 777 is a bad thing but this is just for local testing and makes things sometimes a little bit easier) Additionally I have modified the sysctl.conf as described in step 5 by appending the stated config to the otherwise empty file.

Full log output:

sudo docker run \
> -h d059251ubuntuvm \
> -p 39013:39013 \
> -p 39017:39017 \
> -p 39041-39045:39041-39045 \
> -p 1128-1129:1128-1129 \
> -p 59013-59014:59013-59014 \
> -v /data/hxe:/hana/mounts \
> --ulimit nofile=1048576:1048576 \
> --sysctl kernel.shmmax=1073741824 \
> --sysctl net.ipv4.ip_local_port_range='40000 60999' \
> --sysctl kernel.shmmni=524288 \
> --sysctl kernel.shmall=8388608 \
> --name hxe \
> store/saplabs/hanaexpress:2.00.040.00.20190729.1 \
> --passwords-url https://pastebin.com/raw/TZeLKtkc \
> --agree-to-sap-license
======== Starting HANA container run script ========
Started at: Tue Feb 18 08:01:38 UTC 2020
Script parameters: --passwords-url https://pastebin.com/raw/jrh9cyRC --agree-to-sap-license
HANA version: 2.00.040.00.1553674765
Linux kernel version: 4.15
New host: 'ubuntuvm'
Setting HANAs host name to 'ubuntuvm' ...
Checking allowed mountpoints ...
Checking system requirements ...
Checking /proc/sys prerequisites and limits...


SAP HANA Lifecycle Management - HdbContainer 2.4.59
***************************************************


Checking container...
Checking system requirements...
Checking linux settings...
SAP HANA instance executed.
Log file written to '/var/tmp/HdbContainer_check_container_2020-02-18_08.01.38.log' on host 'ubuntuvm'.
Log files copied to '/hana/mounts/trace/ubuntuvm' on host 'ubuntuvm'.
Check succeeded: /proc/sys prerequisites and limits
Checking syscalls ...
	WARNING: Operation not permitted: move_pages
	WARNING: Operation not permitted: mbind
Check failed: syscalls
Please add permissions for the named operations by whitelisting them in a seccomp profile.
You can get a matching profile by calling 'docker run --rm <hana_image> --print seccomp.json > seccomp.json' and apply it to the container start via 'docker run --security-opt seccomp=seccomp.json ...'.
Checking mount consistency ...
Checking content structure version ...
Checking version compatibility ...
Start type: initial
Entering pre start phase ...
Downloading password file from https://pastebin.com/raw/jrh9cyRC (parameters: --max-time 30 --insecure) ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    94    0    94    0     0    286      0 --:--:-- --:--:-- --:--:--   286
Creating consistency check files ...
Extracting initial content to /hana/shared/HXE/HDB90/ubuntuvm
/hana/shared/HXE/HDB90/localhost/sapprofile.ini
/hana/shared/HXE/HDB90/localhost/lock/
/hana/shared/HXE/HDB90/localhost/work/
/hana/shared/HXE/HDB90/localhost/log/
/hana/shared/HXE/HDB90/localhost/log/logmon/
/hana/shared/HXE/HDB90/localhost/log/grmg/
/hana/shared/HXE/HDB90/localhost/log/sapccm4x/
/hana/shared/HXE/HDB90/localhost/log/sapccm4x/sapstartsrv_ccms.log
tar: Removing leading `/' from member names
/hana/shared/HXE/HDB90/localhost/tmp/
tar: Removing leading `/' from hard link targets
/hana/shared/HXE/HDB90/localhost/tmp/RSUtil/
/hana/shared/HXE/HDB90/localhost/log/sapccm4x/sapstartsrv_ccms.log
Processing hooks in folder /hana/hooks/pre_start ...
Hook candidates:
	/hana/hooks/pre_start/010_license_agreement
	/hana/hooks/pre_start/010_license_agreement.json (ignored, not an executable regular file)
	/hana/hooks/pre_start/110_clean_hdbdaemon_status
	/hana/hooks/pre_start/120_clean_pid_files
	/hana/hooks/pre_start/130_update_clean_wdisp
	/hana/hooks/pre_start/310_init_ssfs
	/hana/hooks/pre_start/320_config_cert
	/hana/hooks/pre_start/330_custom_afls
Hook /hana/hooks/pre_start/010_license_agreement requires parameters: AGREE_TO_SAP_LICENSE
Executing hook /hana/hooks/pre_start/010_license_agreement ...
	License agreement check succeeded (AGREE_TO_SAP_LICENSE=true)
Finished execution of hook /hana/hooks/pre_start/010_license_agreement (exit code 0)
Executing hook /hana/hooks/pre_start/110_clean_hdbdaemon_status ...
Finished execution of hook /hana/hooks/pre_start/110_clean_hdbdaemon_status (exit code 0)
Executing hook /hana/hooks/pre_start/120_clean_pid_files ...
	Removing PID files in /usr/sap/HXE/HDB90/ubuntuvm/lock
Finished execution of hook /hana/hooks/pre_start/120_clean_pid_files (exit code 0)
Executing hook /hana/hooks/pre_start/130_update_clean_wdisp ...
Finished execution of hook /hana/hooks/pre_start/130_update_clean_wdisp (exit code 0)
Executing hook /hana/hooks/pre_start/310_init_ssfs ...
	Creating system PKI master key ...
	Record Statistics
	=============================================
	Encrypted and readable                : 0
	Encrypted and not readable            : 0
	Plaintext                             : 0
	Removed by compacting                 : 0
	Creating system PKI SSFS ...
	Generating system PKI CA ...
	Creating openssl.cnf file for CA ...
	Creating self signed certificate for CA ...
	Generating a 4096 bit RSA private key
	....++
	.............................................................................................................................................................................++
	writing new private key to '/tmp/tmp.Qg1OONR3xB/key.pem'
	-----
	Exporting PEM to P12 ...
	Importing P12 into PSE ...
	Found key 'INDEX=0,SIG=YES,ENC=NO,MD5-FINGERPRINT=F3EA 746F 6571 3AAF C584 FA9B 4F9B 3ED0,KEYID=526D48A0E14421D59C5B7E07C1425C651FE330FF'

	!!! WARNING: For security reasons it is recommended to use a PIN/passphrase
	!!! WARNING: which is at least 8 characters long and contains characters in
	!!! WARNING: upper and lower case, numbers and non-alphanumeric symbols.

	PSE "/tmp/tmp.Qg1OONR3xB/ca.pse" was written

	Generating system PKI CA done
	Adding system PKI CA to system PKI SSFS ...
	Creating pin for sap_system_pki_instance.pse
	Storing pin for sap_system_pki_instance.pse in secure file store
	Generating sap_system_pki_instance.pse ...
	Creating openssl.cnf file for server certificate ...
	Creating server certificate ...
	Generating a 4096 bit RSA private key
	.........................................................++
	............................................................................................................................................................++
	writing new private key to '/tmp/tmp.Qg1OONR3xB/key2.pem'
	-----
	Signing server certificate ...
	Building complete chain ...
	Exporting PEM to P12 ...
	Importing P12 into PSE ...
	Found key 'INDEX=0,SIG=YES,ENC=YES,MD5-FINGERPRINT=2B23 5874 BDE9 27CB E343 48F6 76A6 7A08,KEYID=3D0622F79785EFFE1115BBF2B51FD2FFAF66EB88'

	!!! WARNING: For security reasons it is recommended to use a PIN/passphrase
	!!! WARNING: which is at least 8 characters long and contains characters in
	!!! WARNING: upper and lower case, numbers and non-alphanumeric symbols.

	PSE "/usr/sap/HXE/HDB90/ubuntuvm/sec/sap_system_pki_instance.pse" was written

	Generating sap_system_pki_instance.pse done
	Delete tmp files ...
	Creating instance SSFS master key ...
	Record Statistics
	=============================================
	Encrypted and readable                : 0
	Encrypted and not readable            : 0
	Plaintext                             : 0
	Removed by compacting                 : 0
	Creating instance SSFS ...
	nameserver ubuntuvm:39001 not responding.
	done.
Finished execution of hook /hana/hooks/pre_start/310_init_ssfs (exit code 0)
Executing hook /hana/hooks/pre_start/320_config_cert ...
	Checking for sapsrv.pse ...
	Checking for SAPSSLA.pse ...
	Checking for SAPSSLC.pse ...
	Checking for SAPSSLS.pse ...
	Checking for sap_system_pki_instance.pse ...
	Checking for sapsrv_tenant.pse ...
	generating certificate sapsrv.pse...
	creating openssl.cnf file
	creating self signed certificate with openssl
	Generating a 4096 bit RSA private key
	..........................................................................................................................................++
	...............++
	writing new private key to '/usr/sap/HXE/home/key.pem'
	-----
	export PEM to P12 with openssl
	import P12 into PSE
	Found key 'INDEX=0,SIG=NO,ENC=YES,MD5-FINGERPRINT=33A7 73E7 2949 14CD CB92 ADBE 2AF7 43A2,KEYID=0E6AF5DC41FC077C6816DA4CD338381F084D15A5'

	!!! WARNING: For security reasons it is recommended to use a PIN/passphrase
	!!! WARNING: which is at least 8 characters long and contains characters in
	!!! WARNING: upper and lower case, numbers and non-alphanumeric symbols.

	PSE "/usr/sap/HXE/HDB90/ubuntuvm/sec/sapsrv.pse" was written

	delete tmp files
	generating certificate sapsrv.pse done
Finished execution of hook /hana/hooks/pre_start/320_config_cert (exit code 0)
Executing hook /hana/hooks/pre_start/330_custom_afls ...
	No custom AFLs found
Finished execution of hook /hana/hooks/pre_start/330_custom_afls (exit code 0)
Finished execution of hooks in folder /hana/hooks/pre_start
Initializing persistence for first start of HANA (system db) ...


SAP HANA Lifecycle Management - HdbContainer 2.4.59
***************************************************


Start reading from input channel...
... Done.
Initializing persistence...
Installing initial topology
  hdbnsutil: creating persistence ...
  hdbnsutil: writing initial topology...
  hdbnsutil: writing initial license: status check = 1
SAP HANA instance executed.
Log file written to '/var/tmp/HdbContainer_init_persistence_2020-02-18_08.02.22.log' on host 'ubuntuvm'.
Log files copied to '/hana/mounts/trace/ubuntuvm' on host 'ubuntuvm'.
Persistence initialized.
Finished pre start sequence
Starting up HANA ...
Waiting for HANA to finish start up ...
HANA is up
HDB info after HANA start
USER          PID     PPID  %CPU        VSZ        RSS COMMAND
hxeadm          1        0   0.2      21036       3920 /bin/bash /run_hana --passwords-url https://pastebin.com/raw/jrh9cyRC --agree-to-sap-license
hxeadm        864        1   0.6     360784      53452 hdbdaemon
hxeadm        870      864   100    2360232    1623508  \_ hdbnameserver
hxeadm       1223      864  13.8    1019768     284244  \_ hdbcompileserver
hxeadm       1224      864   5.3     454612     134756  \_ hdbpreprocessor
hxeadm       1273      864  69.7    1179476     359648  \_ hdbwebdispatcher
hxeadm        983        1   0.0     612872      48984 hdbrsutil  --start --port 39001 --volume 1 --volumesuffix mnt00001/hdb00001 --identifier 1582012977
hxeadm       1347        1   0.0      20124       3116 /bin/sh /usr/sap/HXE/HDB90/HDB info
hxeadm       1378     1347   0.0      43532       3312  \_ ps fx -U hxeadm -o user:8,pid:8,ppid:8,pcpu:5,vsz:10,rss:10,args
Entering post start phase ...
Creating tenant database ...
* 2: general error: Database could not be started;start databaseServer for database=3 on : ubuntuvm:39040 failed SQLSTATE: HY000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions