Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-2491

Incorrect syntax for setting options in the database configuration script (db_setup.py)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 2.0.0
    • Component/s: admin
    • Labels:

      Description

      During the installation of the ranger, an error occurred about the incorrect syntax for setting options for the postgres database:

      2019-06-27 11:40:19,818 [JISQL] /usr/java/default/bin/java -cp /usr/share/java/postgresql.jar:/hdd/data01/ranger/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver postgresql -cstring jdbc:postgresql://kz-dmpignt13/ranger -u rangerdba -p '********' -noheader -trim -c \; -query "set option public.reserved_keywords='LIMIT';"
      SQLException : SQL state: 42601 org.postgresql.util.PSQLException: ERROR: syntax error at or near "public"
      {{ Position: 13 ErrorCode: 0}}

      According to official documentation, the word option is not needed.

      https://www.postgresql.org/docs/current/sql-set.html

      In this case statement:

      set option public.reserved_keywords='LIMIT';

      The statement should be:

      set public.reserved_keywords='LIMIT';

      I manually deleted the option word in the script, after which the installation was successful. Please check the database configuration script.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pradeep Pradeep Agrawal
                Reporter:
                xiaset Aset Madraimov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: