2 Replies Latest reply on Feb 14, 2020 10:51 AM by Kunal Panigrahi

    TrueSight Vulnerability Mgmt Installation ElasticSearch Error

    Raul Calderon de la Barca
      Share This:

      Hello,

       

      i'm trying to install TSVM 3.1 in a CentOs server.

       

      To install Elasticsearch I have this error:

       

      do you want to proceed with the entered information? ([y]es/[n]o)y

      Specified inputs are saved in the /opt/bmc/truesight/inputs_file.yml file.

      [INFO] Installing component 'es' , path: /opt/bmc/truesight/elasticsearch/infra-ext/es

      [INFO] Executing install Steps for category: infra-ext component: es

      [ERROR] Error: Command '['sh', '/opt/bmc/truesight/elasticsearch/infra-ext/es//DCAIndexService/bin/elasticsearch-users', 'useradd', 'admin', '-p', 'elasticadmin', '-r', 'superuser']' returned non-zero exit status 1

      [ERROR] which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

      warning: Falling back to java on path. This behavior is deprecated. Specify JAVA_HOME

      could not find java; set JAVA_HOME

       

       

      [ERROR] Installation of component 'es' failed. Error occurred while enabling Elasticsearch authentication.

      [INFO] Few components installation failed. Check the SM tool logs for more information.

      [INFO] Executing post-installation...

      [INFO] Copying TrueSight StackManager binaries from '/opt/tsvmInstall/truesight-sm' to '/opt/bmc/truesight'

      [INFO] Registering TrueSight Vulnerability Management as system service

      [INFO] Successfully registered TrueSight Vulnerability Management as system service

      [INFO] Performing post-installation checks...

      [INFO] --------------------------------------------------

      [INFO] Execution completed in 56.09 secs

      [INFO] --------------------------------------------------

       

       

      If I test the status of the elastichsearch it seems up:

       

      [root@localhost truesight-sm]# python truesight-sm.py status --deployment elasticsearch

      /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.8) or chardet (2.2.1) doesn't match a supported version!

        RequestsDependencyWarning)

      [INFO] **************************************************

      [INFO] TrueSight Stack Manager V3.1.00.1565

      [INFO] **************************************************

      [INFO] Initialization completed.

      [INFO] Execution started

      [INFO] Getting status of components for deployment 'elasticsearch': all

      [INFO] Install All products from the inventory file

      [INFO] Status:

      Component  Version    Status

      ---------  -------    ------

      es         6.8.0.103  DCA Index Service Daemon is running.

       

       

       

       

      [INFO] --------------------------------------------------

      [INFO] Execution completed in 54.58 ms

      [INFO] --------------------------------------------------

       

      I don't know if elasticsearch will work correcly with this error.

      Could you help me with this please?

       

       

      Thank you.

        • 1. Re: TrueSight Vulnerability Mgmt Installation ElasticSearch Error
          Kunal Panigrahi

          Hi Raul,

           

          We have a knowledge base article published on BMC Support site about this issue.

           

          ################

          Article # 000174183

          Title: TrueSight Vulnerability Management - ElasticSearch Install throws error message "Error: Command '['sh', '/opt/bmc/truesight/elasticsearch/infra-ext/es//DCAIndexService/bin/elasticsearch-users', 'useradd', 'admin', '-p', 'elasticadmin', '-r', 'superuser']"

           

          Question:

          Why ElasticSearch installation/upgrade throws below error:

          [ERROR] Error: Command '['sh', '/opt/bmc/truesight/elasticsearch/infra-ext/es//DCAIndexService/bin/elasticsearch-users', 'useradd', 'admin', '-p', 'elasticadmin', '-r', 'superuser']' returned non-zero exit status 1

          [ERROR] which: no java in (/opt/rh/python27/root/usr/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)

           

          Solution:

          This issue is hit because the installer is unable to set the JAVA_HOME and PATH variable to the java that is shipped with the installer. To fix this issue follow the below steps:
          1. Uninstall elastic search which got installed with this error.
          python truesight-sm.py uninstall --deployment elasticsearch --force
          Delete any hidden and residual files from the installation home directory.
          2. Set umask to 0022
          3. Chmod -R 755 <truesight-sm folder>
          4. Set JAVA_HOME and PATH variable:

          export JAVA_HOME=<truesight-sm_path>/java
          export PATH=<truesight-sm_path>/java/bin:$PATH

          5. Re-install ElasticSearch.

           

          If you hit this issue during an elasticsearch upgrade, then you will have to follow an additional step after upgrading application and starting it:

          docker exec -it truesight-app-vulnerability-management-portal /bin/bash
          /opt/jre/bin/java -jar /opt/bmc/truesight/vulnerability-management/app/utilities/rest-api-invoker/rest-api-invoker-0.0.1.jar localhost 443 false true


          We have a defect to mark the ES install/upgrade failure instead of success if this issue is hit.

          ################

           

          Since yours is a fresh install attempt, and if you have already attempted to install application then I would recommend you to uninstall application, ElasticSearch and then install ES after following the steps above and then application.

           

          Hope this resolves your issue.

           

          ~Kunal

          • 2. Re: TrueSight Vulnerability Mgmt Installation ElasticSearch Error
            Kunal Panigrahi

            Raul Calderon de la Barca Did this resolve your issue?

             

            If not - please open a support ticket and we can fix it over webex/screenshare.

             

            ~Kunal