Skip to Content
Technical Articles
Author's profile photo Ali Chalhoub

How to change SAP HANA Cockpit url from physical hostname to a DNS alias name

Sometimes administrator needs to change the intial domain name of the SAP HANA cockpit from the physical machine host name to a DNS alias name. Doing that changes require few configurations. In this blog, I will show the steps that are needed to change the URL of SAP HANA cockpit form a physical host name to a DNS alias.

To change the hostname to a DNS alias, do the following:


  1. Login to Linux terminal where the SAP HANA cockpit is installed
  2. Issue this command:
    su - h4cadm

    Note: Assuming the SID for SAP HANA Cockpit is H4C

  3. Issue this command:
  4. The path should be something like that: /usr/sap/<SID>/SYS/global/hdb/custom/config or whatever your default path is for the SAP HANA cockpit
  5. Make backup copy of the xscontroller.ini before doing the edit of the xscontroller.ini
  6. Edit xscontroller.ini file to upate the default domain name:
    vi xscontroller.ini
  7. Change the default_domain = <YOUR-NEW-DOMAIN>
  8. Do not change anything else, the api_url will be updated automatically after doing the changes a restart is required
  9. Restart SAP HANA cockpit by issuing:
    HDB restart
  10. This will take sometimes because the system has to update the URLs with the new domain name
  11. Check to see if SAP HANA cockpit restarted successfully by issuing this command:
    sapcontrol -nr 96 -function GetProcessList

    Note: 96 is the default instance number

  12. Once the status shows all “GREEN”, test your cockpit new URL
  13. New SAP HANA Cockpit URL: https://<FQDN>:3<INTANCEID>30


Be Aware:

  1. SAP HANA Cockpit uses ports other than 3xx30 and 3xx32. For example, the cockpit web ui and admin ui use ports such 51xxxx. This means, you need to make sure the firewall is not blocking these ports
  2. Another thing we need to be aware of is once the URL is changed, now when we login back into XSA from the command line, we need to set the XSA API to the new one and to do that, issue these commands:
    1. su - h4cadm
    2. xs-admin-login
    3. Provide the cockpit admin password
    4. Check to see all the apps are loaded
      xs a
    5. Once you see number “1/1” under column instances, that means the apps are loaded
    6. Logout
    7. Log back in as
      xs l
  3. Now you should have the new API set with the new domain


Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Björn Herold
      Björn Herold

      Hi, thanks for the documentation. Below point 11 it should be "sapcontrol" instead of "sapcontroller". Best regards, Björn

      Author's profile photo Ali Chalhoub
      Ali Chalhoub
      Blog Post Author

      Thank you for your feedback. I have fixed it.

      Author's profile photo Horst Grüninger
      Horst Grüninger

      Hi, the parameter "default_name" is not documented, do you mean "default_domain" instead?

      Author's profile photo Ali Chalhoub
      Ali Chalhoub
      Blog Post Author

      Thank you for your feedback. I have fixed it.

      Author's profile photo Syed Ali
      Syed Ali

      Exactly what I needed and worked as mentioned....thank you!

      Author's profile photo Yvonne Haase
      Yvonne Haase

      How does it work if no DNS is in use and pure ip addreses are used?


      I get the error "The redirect_uri has an invalid domain" when connection with ip adress51028 to the cockpit-admin-web-app and try to logon with user COCKPIT- ADMIN. Login screen appears and can be filled in.

      Afterthat I get error "The subdomain does not map to a valid identity zone."


      Author's profile photo Ali Chalhoub
      Ali Chalhoub
      Blog Post Author

      You should not be using IP address. You need to be using a hostname or a DNS alias.

      Author's profile photo Yvonne Haase
      Yvonne Haase

      Finally, I solved this issue with an entry in /etc/hosts.

      For the upcoming "Internal server error" SAP note 2535229 - "Internal Server Error in HANA Cockpit 2.0" could provide the solution.