Skip to Content

After spending time getting the HANA Express XSA docker image to run and seeing others with the same issues I was encountering, I thought I’d summarise the steps I followed to get it to work.

I currently have the HXE XSA docker image running with the following architecture:

 

I use ESXi 6.5 to run all my images etc. so Fedora Server with Docker runs on top of this. I’ve mentioned versions as I tried various OS and Docker versions and had different issues.

For the most part you can follow this tutorial to complete the prerequisites, pull the image and start the container. There are a few things that I needed to add though to get this working, I’ll outline these below.

  1. After installing the OS I used dnf upgrade to fetch all updates for Fedora Server.
  2. The tutorial suggests using Fedora Server 25 which, if you select it, comes with docker version 1.12.2. Docker run was never successful with this version, so I used https://docs.docker.com/install/linux/docker-ce/fedora/ to install docker ce and Fedora 28 is now supported.
  3. Step two in the tutorial explains an important step, increasing the default dm.basesize for new containers. By default docker container sizes are 10GB, this will increase the default container size to 50GB. This step caused me a couple of isses as I couldnt get this change to stick. Instead I used the daemon.json file created in /etc/docker/ to increase the Base Device Size. The daemon.json file should have the following line
    {"storage-opt":["dm.basesize=50G"]}
  4. If you have trouble getting the password file to be read successfully from step 9 in the tutorial, consider hosting a json password file securely and then pass the https URL of the file in docker run like this: –passwords-url https://<myhostedjsonfile>
  5. My final docker run had a few additions like: -h hxehost \ Docker run looked like this:
    sudo docker run -p 39013:39013 -p 39015:39015 -p 39041-39045:39041-39045 -p 1128-1129:1128-1129 -p 59013-59014:59013-59014 -p 39030-39033:39030-39033 -p 51000-51060:51000-51060 -p 53075:53075 \
    -h hxehost \
    --ulimit nofile=1048576:1048576 \
    --sysctl kernel.shmmax=1073741824 \
    --sysctl net.ipv4.ip_local_port_range='60000 65535' \
    --sysctl kernel.shmmni=524288 \
    --sysctl kernel.shmall=8388608 \
    --name express_edition \
    store/saplabs/hanaexpressxsa:2.00.030.00.20180403.2 \
    --agree-to-sap-license \
    --passwords-url https://<HostedJSONFile>​
  6. The final error I was getting at docker run was: FAIL: process hdbxscontroller HDB XS Controller not running| Could not startup the controller components: /hana/shared/HXE/xs/app_working/stager. FAILED to start: Could not startup the controller components: /hana/shared/HXE/xs/app_working/stager. This error was fixed by Luca Casavola at the end of the thread I opened here. Essentially, follow the tutorial linked above as well as the notes above and after you use docker run, if the container start fails, open another terminal window and log into the container: sudo docker exec -it express_edition bash cd to the following location /hana/shared/HXE/xs/app_working/stager. You’ll see a number of files in it, I used rm -rf /hana/shared/HXE/xs/app_working/stager/* to remove all the contents of the folder. Stop the container using sudo docker stop express_edition then start with sudo docker start express_edition If you monitor the container now with sudo docker ps -a you’ll notice that it shouldnt exit as it used to and the state will remain healthy.
  7. Give the container some time to fully start up and then you should be able to follow steps 10 onwards from the tutorial. You can use https://hxehost:39030 to access XSA services. Remember to map your hosts file on your local machine correctly to hxehost.
  8. These steps summarise the discusion in this thread and should provide you with a working version of HXE XSA in Docker.
To report this post you need to login first.

7 Comments

You must be Logged on to comment or reply to a post.

  1. Witalij Rudnicki

    Hi Phillip. Thank for this summary, and especially for 6. Adrian Plata, can you please have a look at this in the HXE image, so that there is no need for this parallel step to manually delete a directory?

    For 4, it might be a problem reading a file as I see you do not map container mount to your local directory. In my case it was /data/hxe_pwd.json file which I could read using options

    -v /data:/hana/mounts \
    --passwords-url file:///hana/mounts/hxe_pwd.json

    And one more question: what is your host system, where you have ESXi running?

    Regards.

    (0) 
    1. Phillip Parkinson Post author

      Hi Witalij,

      Thanks for the tip, correct I don’t map container mount to the local directory.

      ESXi runs on a Dell PowerEdge R610.

      Regards

      Phill

       

      (0) 
        1. Phillip Parkinson Post author

          Running ESXi 6.5 as bare metal so Fedora Server 28 runs as a VM on top of ESXi and then Docker, HXE container etc. I added a quick diagram above, needed an excuse to draw something 🙂

          (1) 
  2. Georg Schukat

    Thanks for collecting the troubleshooting steps to get a HXE XSA running in a container.

    Your step 6 helped me to get it going.

    Environment:

    • Dell Precision 5520 32GB.
    • SUSE Tumbleweed (not in the list of tested environments according to the tutorial).
    • Docker CE 17.09
    • /var/lib/docker on an ext4 /.

    to ease the repair according to step 6 I had appended the ` –dont-exit-on-error ` parameter to the `sudo docker run …` container build script.

     

    In the tutorial you reference a step to prepare the directory where the container keeps its persistent storage is missing. Following the bare HXE server tutorial https://www.sap.com/uk/developer/tutorials/hxe-ua-install-using-docker.html Step 6 (Optional) for that step works here too.

    As the HXE docker container will be accessed by me only locally from the docker host I added a simple

    127.0.0.2  hxehost.localdomain  hxehost

    entry to my /etc/hosts file to make sure hxehost can be resolved any time.

     

    The bare server tutorial exposes port 39017 by `-p 39017:39017` too. The + XSA tutorial 39015. I do remember under certain other setup / circumstances 39017 was needed. Will see.

    (0) 
  3. Georg Schukat

     

    I hope you do not mind me extending your collection by a workaround solution I had found for a problem which might stop someone from continuing to run the HXE or HXE+XSA container.

    Problem: after a (hard) shutdown/stop the container might fail to start again.

    sudo docker start <hxe_conainer>

    sudo docker ps -a

     

    CONTAINER ID IMAGE                                               COMMAND                CREATED         STATUS
    55c95dec12fc store/saplabs/hanaexpressxsa:2.00.030.00.20180403.2 "/run_hana --agree..." 35 hours ago Up About a minute (unhealthy)

    within the container the hdbdaemon will fail to start.

    Solution a .pid file leftover has to be removed.  Details see issue:

    https://github.com/SAPDocuments/Tutorials/issues/2279

    (0) 

Leave a Reply