【问题标题】:Unable to access Ambari无法访问安巴里
【发布时间】:2018-02-25 07:14:13
【问题描述】:

我使用的是 HDP 2.6,但无法访问 Ambari。当我尝试检查状态或启动 Ambari 时出现以下错误。 错误说某些文件夹需要数据权限,但我不明白是哪一个。

/var/log 中的文件夹权限

[root@sandbox log]# ls -ltr ambari*
ambari-metrics-monitor:
total 4
-rw-r--r-- 1 ams hadoop 4019 May  5  2017 ambari-metrics-monitor.out

ambari-metrics-grafana:
total 8
-rw-r--r-- 1 ams hadoop 7674 May  5  2017 grafana.out

ambari-metrics-collector:
total 40
-rw-r--r-- 1 ams hadoop    0 May  5  2017 hbase-ams-master-sandbox.hortonworks.com.out.1
-rw-r--r-- 1 ams hadoop 3765 May  5  2017 collector-gc.log-201705051255
-rw-r--r-- 1 ams hadoop    0 May  5  2017 hbase-ams-master-sandbox.hortonworks.com.out
-rw-r--r-- 1 ams hadoop 6611 May  5  2017 gc.log-201705051255
-rw-r--r-- 1 ams hadoop    0 May  5  2017 ambari-metrics-collector.out
-rw-r--r-- 1 ams hadoop  678 May  5  2017 ambari-metrics-collector-startup.out
-rw-r--r-- 1 ams hadoop 3511 May  5  2017 collector-gc.log-201705051301
-rw-r--r-- 1 ams hadoop 6170 May  5  2017 gc.log-201705051301
-rw-r--r-- 1 ams hadoop 9840 May  5  2017 SecurityAuth.audit

ambari-infra-solr-client:
total 0

ambari-infra-solr:
total 0

ambari-server:
total 5764
-rw-r--r-- 1 root root       0 Sep 14 10:05 ambari-alerts.log
-rw-r--r-- 1 root root       0 Sep 14 10:05 ambari-config-changes.log
drwxr-xr-x 1 root root    4096 Sep 14 10:07 slider-view
drwxr-xr-x 1 root root    4096 Sep 14 10:07 storm-view
drwxr-xr-x 1 root root    4096 Sep 14 10:07 hive20-view
drwxr-xr-x 1 root root    4096 Sep 14 10:07 pig-view
drwxr-xr-x 1 root root    4096 Sep 14 10:07 capshed-view
drwxr-xr-x 1 root root    4096 Sep 14 10:07 hive-next-view
drwxr-xr-x 1 root root    4096 Sep 14 10:07 wfmanager-view
drwxr-xr-x 1 root root    4096 Sep 14 10:07 huetoambarimigration-view
drwxr-xr-x 1 root root    4096 Sep 14 10:07 files-view
drwxr-xr-x 1 root root    4096 Sep 14 10:08 tez-view
-rw-r--r-- 1 root root   12860 Feb 22 06:27 ambari-audit.log
-rw-r--r-- 1 root root  109945 Feb 22 10:26 ambari-server-command.log
-rw-r--r-- 1 root root     147 Feb 22 10:26 ambari-server.out
-rw-r--r-- 1 root root   44002 Feb 22 10:26 ambari-server-check-database.log
-rw-r--r-- 1 root root  140376 Feb 22 10:27 ambari-eclipselink.log
-rw-r--r-- 1 root root 5523003 Feb 22 10:32 ambari-server.log

ambari-agent:
total 48764
-rw-r--r-- 1 root root 9999919 Sep 19 10:57 ambari-agent.log.4
-rw-r--r-- 1 root root 9999950 Jan 20 19:23 ambari-agent.log.3
-rw-r--r-- 1 root root 9999934 Jan 30 20:23 ambari-agent.log.2
-rw-r--r-- 1 root root 9999883 Jan 31 16:23 ambari-agent.log.1
-rw-r--r-- 1 root root       0 Feb 25 06:51 ambari-agent.out
-rw-r--r-- 1 root root 9901190 Feb 25 07:05 ambari-agent.log

谁能帮忙?

[root@sandbox ~]# service ambari-server status
Using python  /usr/bin/python
Ambari-server status
Traceback (most recent call last):
  File "/usr/sbin/ambari-server.py", line 36, in <module>
    from ambari_server.dbConfiguration import DATABASE_NAMES, LINUX_DBMS_KEYS_LIST
  File "/usr/lib/python2.6/site-packages/ambari_server/dbConfiguration.py", line 28, in <module>
    from ambari_server.serverConfiguration import decrypt_password_for_alias, get_ambari_properties, get_is_secure, \
  File "/usr/lib/python2.6/site-packages/ambari_server/serverConfiguration.py", line 587, in <module>
    configDefaults = ServerConfigDefaults()
  File "/usr/lib/python2.6/site-packages/ambari_server/serverConfiguration.py", line 500, in __init__
    super(ServerConfigDefaultsLinux, self).__init__()
  File "/usr/lib/python2.6/site-packages/ambari_server/serverConfiguration.py", line 384, in __init__
    self.check_if_directories_writable([self.OUT_DIR, self.PID_DIR])
  File "/usr/lib/python2.6/site-packages/ambari_server/serverConfiguration.py", line 436, in check_if_directories_writable
    raise FatalException(-1, "Unable to access {0} directory. Confirm the directory is created and is writable by Ambari Server user account '{1}'".format(directory, getpass.getuser()))
ambari_commons.exceptions.FatalException: "Fatal exception: Unable to access  directory. Confirm the directory is created and is writable by Ambari Server user account 'root', exit code -1"

我还检查了 ambari-agent.log,我看到如下所示的 INFO

INFO 2018-02-25 05:16:55,358 main.py:436 - Connecting to Ambari server at https://sandbox.hortonworks.com:8440 (172.17.0.2)
INFO 2018-02-25 05:16:55,358 NetUtil.py:67 - Connecting to https://sandbox.hortonworks.com:8440/ca
WARNING 2018-02-25 05:16:55,360 NetUtil.py:98 - Failed to connect to https://sandbox.hortonworks.com:8440/ca due to [Errno 111] Connection refused 

【问题讨论】:

    标签: python ambari


    【解决方案1】:

    1) 您需要检查/etc/ambari-server/conf/log4j.properties 属性ambari.log.dir 并验证它的值。默认值可以在这里找到:log4j.properties。此处使用的目录需要存在

    2) 检查/etc/ambari-server/conf/ambari.properties,查找属性pid.dir。验证它指向的目录和目录是否存在

    【讨论】:

      猜你喜欢
      • 2020-09-22
      • 1970-01-01
      • 2019-07-04
      • 2021-10-03
      • 2021-12-18
      • 2021-11-02
      • 2020-09-11
      • 2020-05-21
      • 1970-01-01
      相关资源
      最近更新 更多