首页 > 其他分享 >hue无法启动,报错

hue无法启动,报错

时间:2024-05-20 21:45:25浏览次数:21  
标签:hue ambari lib 启动 py agent 报错 File line

stderr:
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stacks/HDP/3.1/services/HUE/package/scripts/hue_server.py", line 82, in <module>
HueServer().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/HDP/3.1/services/HUE/package/scripts/hue_server.py", line 34, in start
self.configure(env)
File "/var/lib/ambari-agent/cache/stacks/HDP/3.1/services/HUE/package/scripts/hue_server.py", line 29, in configure
setup_hue()
File "/var/lib/ambari-agent/cache/stacks/HDP/3.1/services/HUE/package/scripts/setup_hue.py", line 49, in setup_hue
add_hdfs_configuration(params.has_ranger_admin, params.security_enabled)
File "/var/lib/ambari-agent/cache/stacks/HDP/3.1/services/HUE/package/scripts/common.py", line 97, in add_hdfs_configuration
add_configurations(services_configurations)
File "/var/lib/ambari-agent/cache/stacks/HDP/3.1/services/HUE/package/scripts/common.py", line 159, in add_configurations
Execute(cmd)
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/core/providers/system.py", line 263, in action_run
returns=self.resource.returns)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
result = function(command, **kwargs)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call
raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of '/var/lib/ambari-agent/cache/stacks/HDP/3.1/services/HUE/package/files/configs.sh set bc-gcp-sg-ol-node01.c.proj-bc.internal hdp_prod hdfs-site 'dfs.namenode.acls.enabled' 'true'' returned 1. [ERROR] "hdfs-site" not found in server response.
[ERROR] Output of `curl -k -s -u admin:admin "http://bc-gcp-sg-ol-node01.c.proj-bc.internal:8080/api/v1/clusters/hdp_prod?fields=Clusters/desired_configs"` is:
[ERROR] <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404 Not Found</h2> <table> <tr><th>URI:</th><td>/api/v1/clusters/hdp_prod</td></tr> <tr><th>STATUS:</th><td>404</td></tr> <tr><th>MESSAGE:</th><td>Not Found</td></tr> <tr><th>SERVLET:</th><td>org.eclipse.jetty.servlet.ServletHandler$Default404Servlet-659a969b</td></tr> </table> <hr/><a href="https://eclipse.org/jetty">Powered by Jetty:// 9.4.53.v20231009</a><hr/> </body> </html>

 

 

解决方法

确认配置文件存在

确保 hdfs-site.xml 文件确实存在并在您的集群中被识别。可以通过以下步骤确认:

  1. 登录到 Ambari 控制台。
  2. 导航到 HDFS 服务的配置页面。
  3. 确认 hdfs-site 配置文件存在并包含所需配置项。

检查集群名称和 API 路径

确保使用的集群名称和 API 路径是正确的。可以通过以下步骤确认:

  1. 登录到 Ambari 控制台。
  2. 确认集群名称是否正确。
  3. 使用正确的集群名称和 API 路径。

示例解决步骤

  1. 检查 hdfs-site 配置文件:

    登录到 Ambari 控制台,导航到 HDFS 服务的配置页面,确认 hdfs-site.xml 配置文件存在并包含所需配置项。

  2. 使用正确的 API 路径:

    确认集群名称是否正确,如果集群名称是 hdp_prod,使用以下命令检查集群信息:

    sh curl -k -s -u admin:admin "http://bc-gcp-sg-ol-node01.c.proj-bc.internal:8080/api/v1/clusters"

    确认返回的集群名称是否正确,如果名称正确,再使用以下命令获取集群配置信息:

    sh curl -k -s -u admin:admin "http://bc-gcp-sg-ol-node01.c.proj-bc.internal:8080/api/v1/clusters/hdp_prod?fields=Clusters/desired_configs"
  3. 修改 configs.sh 脚本:

    如果集群名称和 API 路径都正确,确保 configs.sh 脚本中的命令格式正确:

    sh /var/lib/ambari-agent/cache/stacks/HDP/3.1/services/HUE/package/files/configs.sh set bc-gcp-sg-ol-node01.c.proj-bc.internal hdp_prod hdfs-site 'dfs.namenode.acls.enabled' 'true'

    确保脚本路径和命令格式没有多余的引号或拼写错误。

  4. 调试和日志:

    如果问题仍然存在,可以查看 Ambari 和脚本的详细日志,进一步定位问题的根源。

通过这些步骤,您应该能够找到并解决 hdfs-site 配置文件找不到的问题,以及 HTTP 404 错误。

 

(1)package/files/configs.sh文件 ambari的端口配置错了

cd /var/lib/ambari-server/resources/stacks/HDP/3.1/services/HUE/package/files

vim configs.sh

标签:hue,ambari,lib,启动,py,agent,报错,File,line
From: https://www.cnblogs.com/guoyu1/p/18202837

相关文章