Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-3689 Upgrade Mpack services stack to Bigtop 3.2
  3. BIGTOP-3788

Fix Ambari-HDFS components fail to start when kerberos enabled

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Resolved
    • None
    • 3.2.0
    • None
    • None
    • bigtop-3.2.0-snapshot

      hdfs-3.3.4

    Description

      It failed to start Datanode and Namenode when enable kerberos.

      Failed to start DataNode

      Traceback (most recent call last):
        File "/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/HDFS/package/scripts/datanode.py", line 172, in <module>
          DataNode().execute()
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 355, in execute
          self.execute_prefix_function(self.command_name, 'post', env)
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 386, in execute_prefix_function
          method(env)
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 428, in post_start
          raise Fail("Pid file {0} doesn't exist after starting of the component.".format(pid_file))
      resource_management.core.exceptions.Fail: Pid file /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid doesn't exist after starting of the component.
      

      Failed to start Namenode

      Traceback (most recent call last):
        File "/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/HDFS/package/scripts/namenode.py", line 410, in <module>
          NameNode().execute()
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute
          method(env)
        File "/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/HDFS/package/scripts/namenode.py", line 141, in start
          upgrade_suspended=params.upgrade_suspended, env=env)
        File "/usr/lib/ambari-agent/lib/ambari_commons/os_family_impl.py", line 89, in thunk
          return fn(*args, **kwargs)
        File "/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/HDFS/package/scripts/hdfs_namenode.py", line 239, in namenode
          create_hdfs_directories(name_service)
        File "/var/lib/ambari-agent/cache/stacks/BGTP/1.0/services/HDFS/package/scripts/hdfs_namenode.py", line 309, in create_hdfs_directories
          nameservices=name_services,
        File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
          self.env.run()
        File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
          self.run_action(resource, action)
        File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
          provider_action()
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 677, in action_create_on_execute
          self.action_delayed("create")
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 674, in action_delayed
          self.get_hdfs_resource_executor().action_delayed(action_name, self)
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 373, in action_delayed
          self.action_delayed_for_nameservice(None, action_name, main_resource)
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 395, in action_delayed_for_nameservice
          self._assert_valid()
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 334, in _assert_valid
          self.target_status = self._get_file_status(target)
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 497, in _get_file_status
          list_status = self.util.run_command(target, 'GETFILESTATUS', method='GET', ignore_status_codes=['404'], assertable_result=False)
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 214, in run_command
          return self._run_command(*args, **kwargs)
        File "/usr/lib/ambari-agent/lib/resource_management/libraries/providers/hdfs_resource.py", line 295, in _run_command
          raise WebHDFSCallException(err_msg, result_dict)
      resource_management.libraries.providers.hdfs_resource.WebHDFSCallException: Execution of 'curl -sS -L -w '%{http_code}' -X GET -d '' -H 'Content-Length: 0' --negotiate -u : 'http://ambari-agent-01:50070/webhdfs/v1/tmp?op=GETFILESTATUS'' returned status_code=403. 
      {
        "RemoteException": {
          "exception": "SecurityException", 
          "javaClassName": "java.lang.SecurityException", 
          "message": "Failed to obtain user group information: java.io.IOException: Security enabled but user not authenticated by filter"
        }
      }
      

      Attachments

        Activity

          People

            houyu Yu Hou
            houyu Yu Hou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 40m
                2h 40m