0

我试图将 knox 用于我的 spark-thriftserver。我有我的 spark-thriftserver,当尝试使用 knox url 连接到配置单元时,它给了我错误 404,即服务不可用。当我检查 knox 网关的日志时,在 gateway-audit.log 中所有服务都不可用。这是设置,我按照设置 knox :

  1. 首先启动ldap服务

    ./bin/ldap.sh start

  2. 创建主密钥

    ./bin/knoxcli.sh create-master

  3. 启动网关服务

    ./bin/gateway.sh start

以下是gateway.log的日志

018-04-21 19:37:12,557 INFO  knox.gateway (GatewayServer.java:logSysProp(205)) - System Property: user.name=rajatm91
2018-04-21 19:37:12,572 INFO  knox.gateway (GatewayServer.java:logSysProp(205)) - System Property: user.dir=/home/rajatm91/knox
2018-04-21 19:37:12,572 INFO  knox.gateway (GatewayServer.java:logSysProp(205)) - System Property: java.runtime.name=Java(TM) SE Runtime Environment
2018-04-21 19:37:12,572 INFO  knox.gateway (GatewayServer.java:logSysProp(205)) - System Property: java.runtime.version=1.8.0_171-b11
2018-04-21 19:37:12,573 INFO  knox.gateway (GatewayServer.java:logSysProp(205)) - System Property: java.home=/usr/lib/jre1.8.0_171
2018-04-21 19:37:13,050 INFO  knox.gateway (GatewayConfigImpl.java:loadConfigResource(404)) - Loading configuration resource jar:file:/home/rajatm91/knox/bin/../lib/gateway-server-1.0.0.jar!/conf/gateway-default.xml
2018-04-21 19:37:14,213 INFO  knox.gateway (GatewayConfigImpl.java:loadConfigFile(392)) - Loading configuration file /home/rajatm91/knox/bin/../conf/gateway-site.xml
2018-04-21 19:37:14,252 INFO  knox.gateway (GatewayConfigImpl.java:initGatewayHomeDir(336)) - Using /home/rajatm91/knox/bin/.. as GATEWAY_HOME via system property.
2018-04-21 19:37:14,253 INFO  knox.gateway (GatewayConfigImpl.java:init(317)) - Cookie scoping feature enabled: false
2018-04-21 19:37:16,157 INFO  knox.gateway (JettySSLService.java:init(88)) - Creating credential store for the gateway instance.
2018-04-21 19:37:16,159 INFO  knox.gateway (JettySSLService.java:init(104)) - Creating keystore for the gateway instance.
2018-04-21 19:37:16,731 INFO  knox.gateway (JettySSLService.java:logAndValidateCertificate(148)) - The Gateway SSL certificate is issued to hostname: localhost.
2018-04-21 19:37:16,746 INFO  knox.gateway (JettySSLService.java:logAndValidateCertificate(151)) - The Gateway SSL certificate is valid between: 4/21/18 7:37 PM and 4/21/19 7:37 PM.
2018-04-21 19:37:16,882 INFO  knox.gateway (DefaultTopologyService.java:init(590)) - Monitoring simple descriptors in directory: /home/rajatm91/knox/conf/descriptors
2018-04-21 19:37:16,883 INFO  knox.gateway (DefaultTopologyService.java:init(595)) - Monitoring shared provider configurations in directory: /home/rajatm91/knox/conf/shared-providers
2018-04-21 19:37:16,887 WARN  knox.gateway (DefaultRemoteConfigurationMonitor.java:<init>(94)) - There is no registry client defined for remote configuration monitoring.
2018-04-21 19:37:17,856 INFO  knox.gateway (GatewayServer.java:startGateway(291)) - Starting gateway...
2018-04-21 19:37:18,448 INFO  knox.gateway (GatewayServer.java:start(556)) - Loading topologies from directory: /home/rajatm91/knox/conf/topologies
2018-04-21 19:37:18,825 INFO  knox.gateway (GatewayServer.java:handleCreateDeployment(898)) - Deploying topology sandbox to /home/rajatm91/knox/data/deployments/sandbox.topo.16151333d40
2018-04-21 19:37:18,825 INFO  knox.gateway (GatewayServer.java:internalDeactivateTopology(816)) - Deactivating topology sandbox
2018-04-21 19:37:22,937 INFO  knox.gateway (DefaultGatewayServices.java:initializeContribution(218)) - Creating credential store for the cluster: sandbox
2018-04-21 19:37:31,041 INFO  knox.gateway (GatewayServer.java:internalActivateTopology(784)) - Activating topology sandbox
2018-04-21 19:37:31,042 INFO  knox.gateway (GatewayServer.java:internalActivateArchive(794)) - Activating topology sandbox archive %2F
2018-04-21 19:37:31,425 INFO  knox.gateway (GatewayServer.java:handleCreateDeployment(898)) - Deploying topology admin to /home/rajatm91/knox/data/deployments/admin.topo.16151333d40
2018-04-21 19:37:31,425 INFO  knox.gateway (GatewayServer.java:internalDeactivateTopology(816)) - Deactivating topology admin
2018-04-21 19:37:31,913 INFO  knox.gateway (DefaultGatewayServices.java:initializeContribution(218)) - Creating credential store for the cluster: admin
2018-04-21 19:37:32,705 INFO  knox.gateway (GatewayServer.java:internalActivateTopology(784)) - Activating topology admin
2018-04-21 19:37:32,706 INFO  knox.gateway (GatewayServer.java:internalActivateArchive(794)) - Activating topology admin archive %2F
2018-04-21 19:37:32,712 INFO  knox.gateway (GatewayServer.java:handleCreateDeployment(898)) - Deploying topology manager to /home/rajatm91/knox/data/deployments/manager.topo.16151333d40
2018-04-21 19:37:32,712 INFO  knox.gateway (GatewayServer.java:internalDeactivateTopology(816)) - Deactivating topology manager
2018-04-21 19:37:33,260 INFO  knox.gateway (DefaultGatewayServices.java:initializeContribution(218)) - Creating credential store for the cluster: manager
2018-04-21 19:37:34,410 INFO  knox.gateway (DefaultGatewayServices.java:initializeContribution(222)) - Credential store found for the cluster: manager - no need to create one.
2018-04-21 19:37:35,494 INFO  knox.gateway (GatewayServer.java:internalActivateTopology(784)) - Activating topology manager
2018-04-21 19:37:35,507 INFO  knox.gateway (GatewayServer.java:internalActivateArchive(794)) - Activating topology manager archive %2F
2018-04-21 19:37:35,508 INFO  knox.gateway (GatewayServer.java:internalActivateArchive(794)) - Activating topology manager archive %2Fadmin-ui
2018-04-21 19:37:35,509 INFO  knox.gateway (GatewayServer.java:handleCreateDeployment(898)) - Deploying topology knoxsso to /home/rajatm91/knox/data/deployments/knoxsso.topo.16151333d40
2018-04-21 19:37:35,509 INFO  knox.gateway (GatewayServer.java:internalDeactivateTopology(816)) - Deactivating topology knoxsso
2018-04-21 19:37:35,897 INFO  knox.gateway (DefaultGatewayServices.java:initializeContribution(218)) - Creating credential store for the cluster: knoxsso
2018-04-21 19:37:37,008 INFO  knox.gateway (DefaultGatewayServices.java:initializeContribution(222)) - Credential store found for the cluster: knoxsso - no need to create one.
2018-04-21 19:37:37,461 INFO  knox.gateway (GatewayServer.java:internalActivateTopology(784)) - Activating topology knoxsso
2018-04-21 19:37:37,461 INFO  knox.gateway (GatewayServer.java:internalActivateArchive(794)) - Activating topology knoxsso archive %2F
2018-04-21 19:37:37,474 INFO  knox.gateway (GatewayServer.java:internalActivateArchive(794)) - Activating topology knoxsso archive %2Fknoxauth
2018-04-21 19:37:37,552 INFO  knox.gateway (GatewayServer.java:start(581)) - Topology port mapping feature enabled: true
2018-04-21 19:37:42,630 INFO  knox.gateway (GatewayServer.java:start(607)) - Monitoring topologies in directory: /home/rajatm91/knox/conf/topologies
2018-04-21 19:37:42,656 WARN  knox.gateway (DefaultTopologyService.java:startMonitor(500)) - An error occurred while attempting to start the remote configuration monitor org.apache.knox.gateway.topology.monitor.DefaultRemoteConfigurationMonitor : Failed to acquire a remote configuration registry client.
2018-04-21 19:37:42,657 INFO  knox.gateway (GatewayServer.java:startGateway(320)) - Started gateway on port 8,443.
~                                                             

网关审计日志

18/04/21 19:37:18 |||Audit||||||deploy|topology|sandbox|unavailable|
18/04/21 19:37:31 |||audit||||||deploy|topology|admin|unavailable|
18/04/21 19:37:32 |||audit||||||deploy|topology|manager|unavailable|
18/04/21 19:37:35 |||audit||||||deploy|topology|knoxsso|unavailable|
~                                                                    

诺克斯版本 - 1.0.0

即使网关服务器已正常启动,我也无法理解为什么服务不可用。任何帮助,将不胜感激 。

谢谢。

4

1 回答 1

0

我认为您可以放心地忽略部署不可用错误。当您尝试通过 Knox 访问 Hive 时,您是否点击了 Knox ?查看网关日志看起来您的请求没有发送到 Knox。

于 2018-04-22T12:50:17.513 回答