故障诊断
常见问题
- 安装成功但带有警告,而用户无法创建数据源,错误为“无法完成请求。 原因:权限被拒绝”
- 将 distrib.fs.root 参数设置为 Analytic Server 用户 (缺省情况下为 as_user) 无权访问的目录将导致错误。 确保 Analytic Server 用户有权读取,写入和执行 distrib.fs.root 目录。
- Analytic Server 性能逐渐变差。
- 当 Analytic Server 性能不满足预期时,请从 Knox 服务部署路径中除去所有 *.war 文件: /<KnoxServicePath>/data/deployments。 例如:/usr/hdp/3.1.0.0-78/knox/data/deployments。
- 在 Ambari 上卸载 Analytic Server 或 Essentials for R
- 在某些情况下,卸载过程在 Ambari上卸载 Analytic Server 或 Essentials for R 时挂起。 当发生该问题时,必须手动停止 Ambari 服务器的进程标识。
- 在使用 OpenJDK 的 POWER System 上安装 Analytic Server 时发生问题
- 当 Analytic Server 在使用 OpenJDK的 POWER System 上运行时,必须手动执行以下配置步骤以确保坐标系 API 按预期工作注: 如果不使用坐标系 API ,那么可以忽略配置需求。
- 在 Ambari 控制台中,浏览至 ,并将以下行添加到内容区域:
-XX:CompileCommand=exclude,com/esri/sde/sdk/pe/engine/PeHznTwoPointEquidistant$GCSHorizon.* - 在 Ambari 控制台中,导航至定制 analytics.cfg 部分,然后添加下列 3 项配置:
- spark.executor.extraJavaOptions
- 将值设置为:
-XX:CompileCommand=exclude,com/esri/sde/sdk/pe/engine/PeHznTwoPointEquidistant$GCSHorizon.* - spark.driver.extraJavaOptions
- 将值设置为:
-XX:CompileCommand=exclude,com/esri/sde/sdk/pe/engine/PeHznTwoPointEquidistant$GCSHorizon.* - mapred.child.java.opts
- 将值设置为:
-XX:CompileCommand=exclude,com/esri/sde/sdk/pe/engine/PeHznTwoPointEquidistant$GCSHorizon.*
- 在 Ambari 控制台中,浏览至 ,并将以下行添加到内容区域:
- 在 SuSE Linux 12 上安装 Analytic Server 时出错
- 在 SuSE Linux 12 上安装 Analytic Server 时,可能会迂到以下错误:
Signature verification failed [4-Signatures public key is not available]
特定 Hadoop 发行版的问题
- 在 CDP 7.1.7 上迂到
SemanticException错误 - CDP 7.1.7上可能会发生以下错误。
com.spss.utilities.i18n.LocException: Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 4:14 Wrong arguments 'field2': Casting DATE/TIMESTAMP to NUMERIC is prohibited (hive.strict.timestamp.conversion)可以通过将值为
false的hive.strict.timestamp.conversion添加到 配置设置来解决问题。- 在 Cloudera Manager 控制台中,浏览到 的高级配置片段。
- 添加值为
false的hive.strict.timestamp.conversion设置。图 1。 HiveServer2 hive-site.xml 屏幕的高级配置片段 (安全阀) 
- 当输入数据源是 CDP Private Cloud Base 7 上的 Hive 数据库时,作业将失败
- 作业执行失败,发生类似于 as_trace.log 文件中的以下错误:
(AEQAE2103E) SQL execution failed - Error while compiling statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask. Unable to move source hdfs://xxx/warehouse/tablespace/external/hive/xxx to destination hdfs://xxx/warehouse/tablespace/managed/hive/xxx - 在 HDP 2.6.5上使用 HiveDB 数据源时可能发生错误。
- 在 HDP 2.6.5上使用 HiveDB 数据源时,可能会发生以下错误。
Execution failed. Reason: Could not initialize class org.apache.derby.jdbc.AutoloadedDriver40 - Analytic Server 服务的刷新操作在 Hortonworks 2.6 上已禁用
- 要手动刷新 Hortonworks 2.6 上的 Analytic Server 库,请执行以下步骤。
- 以 Analytic Server 用户 (缺省情况下为 as_user) 身份登录到运行 Analytic Metastore 的主机。注: 您可以从 Ambari 控制台中找到此主机名。
- 在目录 {AS_ROOT}/bin中运行 refresh 脚本; 例如:
cd /opt/ibm/spss/analyticserver/3.4/bin ./refresh - 在 Ambari 控制台中重新启动 Analytic Server 服务。
- 以 Analytic Server 用户 (缺省情况下为 as_user) 身份登录到运行 Analytic Metastore 的主机。
- 从外部站点下载的包在 Cloudera Manager 中进行散列检查时失败。
- 散列验证错误将显示在包列表中。 完成下载过程,然后通过
cloudera-scm-server服务重新启动 Cloudera,便可以解决此问题。 重新启动服务后,将不会发生此错误。
- HDFS 超组属性
- 如果
as_user不是以下 HDFS 组属性的成员,那么 Analytic Server 将在启动期间记录异常: dfs.permissions.supergroup/dfs.permissions.superusergroup。 例如:[11/15/17 7:32:35:510 PST] 000000bf SystemOut O 2017-11-15 07:32:35,510 | : | | | | | ERROR | slmtagoutput.SlmOuputAgent | SLM Logger => Error in performing callback function when calculating number of nodes in kerberos environment: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Access denied for user as_user. Superuser privilege is required at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.checkSuperuserPrivilege(FSPermissionChecker.java:93) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.checkSuperuserPrivilege(FSNamesystem.java:6606) at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.datanodeReport(FSNamesystem.java:5595) at org.apache.hadoop.hdfs.server.namenode.NameNodeRpcServer.getDatanodeReport(NameNodeRpcServer.java:928) at org.apache.hadoop.hdfs.server.namenode.AuthorizationProviderProxyClientProtocol.getDatanodeReport(AuthorizationProviderProxyClientProtocol.java:390) at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolServerSideTranslatorPB.getDatanodeReport(ClientNamenodeProtocolServerSideTranslatorPB.java:694) at org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$ClientNamenodeProtocol$2.callBlockingMethod(ClientNamenodeProtocolProtos.java) at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:617) at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:1073) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2141) at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2137) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1912) at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2135) - MapReduce 作业在 HDP 3.0 上执行失败
- 在 HDP 3.0 上,您可能会遇到 MapReduce 作业的以下错误:
Unable to complete the request. Reason: java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING (as_trace.log)
- 由于存在 Cloudera 问题,无法向 Hive 表写入日期或时间戳记值
- 当 Analytic Server 尝试将日期或时间戳记值写入 Cloudera 环境中的 Hive 表时,该进程由于已知的 Cloudera 问题 (https://issues.apache.org/jira/browse/HIVE-11024) 而失败。注: 日期值问题不影响 Hive 1.3.0 或 2.0.0 (https://issues.apache.org/jira/browse/HIVE-11024); 时间戳记值问题不影响 Hive 2.0.0 (https://issues.apache.org/jira/browse/HIVE-11748?jql=project%20%3D%20HIVE%20AND%20text%20~%20%22jdbc%20timestamp%22)。 必须确保 Cloudera 环境中存在受支持的 Hive 版本(1.3.0 或 2.0.0)。
元数据存储库的问题
- 在运行 add_mysql_user 脚本时,操作 CREATE USER 失败
在运行 add_mysql_user 脚本之前,您首先需要从 MySQL 数据库中手动移除尝试添加的用户。 您可以通过 MySQL Workbench UI 或 MySQL 命令移除这些用户。 例如:
mysql -u root -e "DROP USER '$AEDB_USERNAME_VALUE'@'localhost';" mysql -u root -e "DROP USER '$AEDB_USERNAME_VALUE'@'$METASTORE_HOST';" mysql -u root -e "DROP USER '$AEDB_USERNAME_VALUE'@'%';"在上述命令中,将 $AEDB_USERNAME_VALUE 替换为您移除的用户名,将 $METASTORE_HOST 替换为您在其中安装数据库的主机名。
Apache Spark 问题
- 在 Spark 进程中运行的流的问题
SPSS Modeler 流在强制在 Spark 流程中运行时无法完成。 失败的 SPSS Modeler 流是使用链接到
Sort节点的 Analytic Server 源节点 (HDFS 文件) 构建的,然后设置为导出到另一个 Analytic Server 数据源。 运行该流后,资源管理器用户界面将指示新应用程序正在运行,但该流不会结束且保持Running状态。 没有消息指示为何在 Analytic Server 日志, YARN 日志或 Spark 日志中未能完成流。可以通过将
spark.executor.memory设置添加到 Analytic Server 配置中的定制 analytics.cfg 文件来解决此问题。 将内存值设置为 4GB 将允许先前失败的 SPSS Modeler 流在不到 2 分钟内完成 (在单节点集群环境中)。- 错误 " HdfsAuthcom.spss.utilities.i18n.LocException:Execution 失败。 原因: com.spss.ae.filesystem.exception.FileSystemException: 无法初始化文件系统访问。" 在运行 SparkML 案例时迂到。
- 在 Spark 无法找到系列日志目录时生成此错误。 此问题的变通方法是将 spark.lineage.log.dir 重定向到 /ae_wlpserver/usr/servers/aeserver/logs/spark。
高可用性集群
- 由于依赖关系中的更改,无法将 Analytic Server 添加到更多主机
- 使用 更新客户机依赖关系中的指示信息运行
update_clientdeps脚本。 - “分析集群服务与 Zookeeper 意外失去联系,将终止此 JVM 以保证集群完整性。”
导致此问题的一个原因是要写入到 Zookeeper 的数据量是否过大。 如果,在 Zookeeper 日志中存在类似以下异常:
java.io.IOException: Unreasonable length = 2054758或者在 Analytic Server 日志中存在类似以下消息:
Caused by: java.io.UTFDataFormatException: encoded string too long: 2054758 bytes at java.io.DataOutputStream.writeUTF(DataOutputStream.java:375)- 在 Ambari 控制台中,浏览至 Zookeeper 服务“配置”选项,并将以下行添加到 env-template,然后重新启动 Zookeeper 服务。
export JVMFLAGS="-Xmx2048m -Djute.maxbuffer=2097152" - 在 Ambari 控制台中,浏览到 Analytic Server 服务 "配置" 选项卡,并在 Advanced analytics-jvm-options 中添加以下内容,然后重新启动 Analytic Cluster 服务。
-Djute.maxbuffer=2097152
要为 jute.maxbuffer 设置指定的数字应大于异常消息中指示的数字。
- 在 Ambari 控制台中,浏览至 Zookeeper 服务“配置”选项,并将以下行添加到 env-template,然后重新启动 Zookeeper 服务。
- Zookeeper 事务数据无法进行管理
将 zoo.cfg 中的 autopurge.purgeInterval 参数设置为 1 以启用 Zookeeper 事务日志的自动清除。
- 分析集群服务与 Zookeeper 失去联系
- 查看并修改 zoo.cfg中的 tickTime, initLimit和 syncLimit 参数。 例如:
# The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=30 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=15请参阅 Zookeeper 文档以获取详细信息: https://zookeeper.apache.org/doc/r3.3.3/zookeeperAdmin.html
- Analytic Server 作业未恢复
- 存在无法恢复 Analytic Server 作业的常见情况。
- 当 Analytic Server 作业由于集群成员失败而失败时,通常会在另一个集群成员上自动重新启动该作业。 如果该作业未恢复,请检查以确保高可用性集群中至少有 4 个集群成员。
Hive 回送
(AEQAE2103E) SQL execution failed - Error while compiling statement: FAILED: SemanticException [Error 10014]: Line 3:47 Wrong arguments '9223372036854775808': Unsafe compares between different types are disabled for safety reasons. If you know what you are doing, please set hive.strict.checks.type.safety to false and make sure that hive.mapred.mode is not set to 'strict' to proceed. Note that you may get errors or incorrect results if you make a mistake while using some of the unsafe features. (as_trace.log)
- 将 hive.sql.check=true 添加到 Analytic Server config.properties 文件。
- 将 Hive 配置中的 hive.strict.checks.type.safety 设置更改为 false。