我已经在Centos 7服务器上以Mysql 5.7.29作为后端安装了Ambari 2.7.0。所有服务运行正常,但是当我尝试使用admin:admin
凭据登录时,它似乎挂起并在ambari-server.log
文件中显示以下日志:
2020-03-18 06:55:28,031 INFO [MessageBroker-1] WebSocketMessageBrokerStats:113 - WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannelpool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0]
2020-03-18 06:55:28,678 INFO [MessageBroker-1] WebSocketMessageBrokerStats:113 - WebSocketSession[0 current WS(0)-HttpStream(0)-HttpPoll(0), 0 total, 0 closed abnormally (0 connect failure, 0 send limit, 0 transport error)], stompSubProtocol[processed CONNECT(0)-CONNECTED(0)-DISCONNECT(0)], stompBrokerRelay[null], inboundChannel[pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], outboundChannelpool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0], sockJsScheduler[pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0]
有趣的是,当我输入无效的用户或错误的admin
用户密码时,它会抛出正确的错误Invalid credentials
,但在输入正确的凭据时,其挂起并在ambari-server.log
文件中记录上述日志。
以前我曾经在MySQL日志文件中看到以下日志:
[Note] Aborted connection 4 to db: '' user: '' host: '' (Got an error reading communication packets)
根据某些问题的建议,我将max_connections
增加到400,并且max_allowed_packet
将服务器上可用RAM的接近2%增加到656MB
。
增加了上述配置后,我在MySQL日志文件中看不到任何Error reading communication packets
,但似乎没有使Ambari登录正常工作。
[当我将Ambari-Server的日志记录级别更改为debug
并输入随机用户时,它会提供日志:
2020-03-18 11:24:16,116 DEBUG [ambari-client-thread-47] FilterChainProxy:325 - /api/v1/users/esrdf?fields=*,privileges/PrivilegeInfo/cluster_name,privileges/PrivilegeInfo/permission_name&_=1599955834198 at position 1 of 13 in additional filter chain; firing Filter: 'WebAsyncManagerIntegrationFilter'
但是当我输入正确的凭证admin:admin
时,即使在日志中也没有看到任何API。这可能是什么原因?
有人可以指点我,我哪里可能出问题了?
感谢帮助!
所以基本上可能发生的事情是,一旦部署为所有路径提供服务,那么假设您有 home 链接就可以在本地运行,但不能在服务器上运行,因为您的应用程序URL是现在host:8080 / appName /,当您使用/ home引用任何内容而不是将您带到host:8080 / appName / home时,它将带您到host:8080 / home,这时它的URL损坏了。