Skip to Content
Author's profile photo Andreas Schoesser

XS Advanced Administration: Login

Hi everyone,

in the last post of this series, we covered how to install the xs command-line interface (xs cli) in order to administrate SAP HANA XS Advanced. This time we’re going to describe how to get started and how to log in.

Hope you’ll enjoy!

Getting Help

The xs command-line interface (cli) provides a comprehensive help for each command. To get an overview of all available commands issue the following command:

$ xs help -a

To get detailed help for a specific command use the following command:

$ xs help <command>

In order to find out the current version of XS advanced, use:

$ xs version

Also, there’s a comprehensive reference of all available xs cli commands in the SAP HANA Developer Guide.

Login

During login, the xs cli will connect to the so called API URL provided by the XS Controller. That means the API URL must be known and distributed to all users of the xs cli. Note, that the API URL varies from system to system as it is highly dependent on the default domain and the routing mode that was chosen during installation of XS advanced.  In order to find out the API URL for a particular SAP HANA system, login at the system as sidadm and run the following command:

$ xs-admin-login --api
https://api.example.org:8080

This command returns the API URL which you can now use to login by means of the xs cli:

$ xs login -a https://api.example.org:8080

API_URL: https://api.example.org:8080

If not specified on the command-line, the xs cli will prompt for the username and the password interactively. For example, in order to login as user XSA_ADMIN, which is the default admin user created during installation:

USERNAME> XSA_ADMIN
PASSWORD> *********
Authenticating...
ORG: myorg

It automatically targets the default organization that was created during installation. At first login, it interactively asks for the space you want to target. Therefore, choose the space you would like to explore:

Existing spaces:
0.      PROD
1.      SAP
SPACE> 0
SPACE: PROD

After successful login, it displays a summary of the login:

API endpoint:   https://api.example.org:8080 (API version: 1)
User:           XSA_ADMIN
Org:            myorg
Space:          PROD

After login, you can start to explore the XS advanced platform and like getting a system overview or navigate through organizations and spaces, which will be covered by one of the following blog posts.

Trust Certificates

If used remotely, the xs cli needs a trust certificate to establish a secure connection. This public trust certificate is stored on the SAP HANA system at the following location:

/hana/shared/<SID>/xs/controller_data/controller/ssl-pub/default.root.crt.pem

This file can be distributed to the clients and consumed via the --cacert option:

$ xs login -a https://api.example.org:8080 --cacert <PATH>

where PATH points to the location of the file default.root.crt.pemon the client side.

Alternatively, in case you fully trust the network connection to the server, you can skip SSL validation, although this is not recommended for productive use:

$ xs login -a https://api.example.org:8080 --skip-ssl-validation

Note: This step can be omitted if a certificate signed by a well-known CA is used for the XS advanced default domain. We’ll cover this topic in one of the upcoming blog posts.

Local Login

There is a convenient way to login at XS advanced if you are already logged in as sidadm at the SAP HANA system:

$ xs-admin-login

This command will automatically set up the xs cli and log in as XSA_ADMIN after prompting the password.

Wrap-up

That’s it for this time. Next time, we’ll have a look at how to get an XS advanced system overview using the cli.

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Thomas Burkhard
      Thomas Burkhard

      Hello,

      I installed Hana Express on Ubuntu 18.04LTS. Everything is working fine so far, I can reach the xs engine in the web browser, it's up and running. WHen I try to execute the command "xs login" in the shell I get a python error:

      Fatal Python error: Py_Initialize: Unable to get the locale enconding

      File "/usr/sap/HXE/HDB90/exe/Python/lib/python2.7/encodings/__init__py", line 123

      raise CodecRegistryError,\

      Syntax Error: invalid syntax

      ...

      There is a "^" under the comma in the line with the syntax error.

      I searched the web, most articles say that is has to do with the PYTHONPATH variable, but it contains the correct path.

      Could you please give advice?

      I need this to install the dwf package.

      Thanks in advance for your help!

      Best regards,

      Thomas

       

       

      Author's profile photo Thorsten Niehues
      Thorsten Niehues

      Where did you execute

      xs login

      There are two options:

      1. install the client tools on the local machine - after that xs login should work
      2. execute xs login on the server - it should work using the hxeadm user - if the xsa is installed !!

      for more / detailed information follow these discussions

      https://answers.sap.com/questions/13216882/xs-login-on-ubuntu-returns-error.html

      https://serverfault.com/questions/1048306/sap-hana-on-ubuntu-xs-login-results-in-python-error