Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4028

When the path to sentry-site.xml contains spaces, impalad and catalogd start up failed

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Impala 2.5.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Frontend
    • Labels:
      None

      Description

      When the path to sentry-site.xml contains spaces, impalad and catalogd start up failed.
      The error information is as follows:
      2016-08-26 12:22:45,454373 ERROR impala: java.lang.RuntimeException: Sentry configuration file does not exist: /home/mr/impala/conf/sentry-site.xml
      at com.cloudera.impala.authorization.SentryConfig.loadConfig(SentryConfig.java:51)
      at com.cloudera.impala.authorization.AuthorizationConfig.validateConfig(AuthorizationConfig.java:81)
      at com.cloudera.impala.service.JniFrontend.<init>(JniFrontend.java:122)
      2016-08-26 12:22:45,454373 ERROR impala: java.lang.RuntimeException: Sentry configuration file does not exist: /home/mr/impala/conf/sentry-site.xml
      at com.cloudera.impala.authorization.SentryConfig.loadConfig(SentryConfig.java:51)
      at com.cloudera.impala.authorization.AuthorizationConfig.validateConfig(AuthorizationConfig.java:81)
      at com.cloudera.impala.service.JniFrontend.<init>(JniFrontend.java:122)

      After checking the configuration of impalad and catalogd, found the reason is that the absolute path to the sentry-site.xml which set in sentry_config contains spaces.

      The solution is to remove the spaces from the path to the sentry-site.xml when impalad and catalogd reading configuration in process of startup.

        Activity

        Hide
        jbapple Jim Apple added a comment -

        Thank you, David. We would love it if you submitted your patch to Impala by our code review tool, Gerrit.

        https://cwiki.apache.org/confluence/display/IMPALA/Using+Gerrit+to+submit+and+review+patches

        This is how we commit all patches to Impala.

        Show
        jbapple Jim Apple added a comment - Thank you, David. We would love it if you submitted your patch to Impala by our code review tool, Gerrit. https://cwiki.apache.org/confluence/display/IMPALA/Using+Gerrit+to+submit+and+review+patches This is how we commit all patches to Impala.
        Hide
        davidxdh Donghui Xu added a comment -

        Thanks. I will try to submit this patch.

        Show
        davidxdh Donghui Xu added a comment - Thanks. I will try to submit this patch.
        Hide
        davidxdh Donghui Xu added a comment -

        I have pushed a commit to https://gerrit.cloudera.org/#/c/4309/, thanks for doing review.

        Show
        davidxdh Donghui Xu added a comment - I have pushed a commit to https://gerrit.cloudera.org/#/c/4309/ , thanks for doing review.
        Hide
        tarmstrong Tim Armstrong added a comment -

        Change subject: IMPALA-4028: Improve message for improper Sentry config to make extra spaces visible.
        ......................................................................

        IMPALA-4028: Improve message for improper Sentry config to make extra spaces visible.

        When the Sentry config file contained extra spaces it used to be difficult to
        determine what went wrong because the offending path was not quoted making the
        spaces hard to see. As a result, Impala startup failed.

        This patch quotes the bad file path in the error message to make the extra spaces
        visible.

        Change-Id: I3a76b9e4236caa3f2088fba8a9cf0236fced2634
        Reviewed-on: http://gerrit.cloudera.org:8080/4309
        Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
        Tested-by: Internal Jenkins

        M fe/src/main/java/com/cloudera/impala/authorization/SentryConfig.java
        M fe/src/test/java/com/cloudera/impala/analysis/AuthorizationTest.java
        2 files changed, 4 insertions, 3 deletions

        Show
        tarmstrong Tim Armstrong added a comment - Change subject: IMPALA-4028 : Improve message for improper Sentry config to make extra spaces visible. ...................................................................... IMPALA-4028 : Improve message for improper Sentry config to make extra spaces visible. When the Sentry config file contained extra spaces it used to be difficult to determine what went wrong because the offending path was not quoted making the spaces hard to see. As a result, Impala startup failed. This patch quotes the bad file path in the error message to make the extra spaces visible. Change-Id: I3a76b9e4236caa3f2088fba8a9cf0236fced2634 Reviewed-on: http://gerrit.cloudera.org:8080/4309 Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com> Tested-by: Internal Jenkins — M fe/src/main/java/com/cloudera/impala/authorization/SentryConfig.java M fe/src/test/java/com/cloudera/impala/analysis/AuthorizationTest.java 2 files changed, 4 insertions , 3 deletions

          People

          • Assignee:
            davidxdh Donghui Xu
            Reporter:
            davidxdh Donghui Xu
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development