开发者社区> 问答> 正文

ambari-agent注册失败,help:报错

    最近在centos7下用apache的ambari2.2.1.0做hadoop集群,以前也用6.5装过2.0和2.1.0,都没出多大的错。这次按照官方的文档装起来了,但在注册agent时总是出错,原因未知,这个是centos7的问题吗?求助,稍后贴出agent日志
,ambari-server那边并没有出现错误log记录

    ambari-agent.log:
    INFO 2016-03-21 15:15:04,321 main.py:71 - loglevel=logging.INFO
INFO 2016-03-21 15:15:04,321 main.py:71 - loglevel=logging.INFO
ERROR 2016-03-21 15:15:09,352 main.py:315 - Fatal exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 312, in <module>
    main(heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 248, in main
    stop_agent()
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 195, in stop_agent
    sys.exit(1)
SystemExit: 1
INFO 2016-03-21 15:15:09,353 ExitHelper.py:53 - Performing cleanup before exiting...
INFO 2016-03-21 15:15:09,728 main.py:71 - loglevel=logging.INFO
INFO 2016-03-21 15:15:09,728 main.py:71 - loglevel=logging.INFO
INFO 2016-03-21 15:15:09,730 DataCleaner.py:39 - Data cleanup thread started
INFO 2016-03-21 15:15:09,732 DataCleaner.py:120 - Data cleanup started
INFO 2016-03-21 15:15:09,732 DataCleaner.py:122 - Data cleanup finished
INFO 2016-03-21 15:15:09,776 PingPortListener.py:50 - Ping port listener started on port: 8670
INFO 2016-03-21 15:15:09,777 main.py:289 - Connecting to Ambari server at https://master.hdp.com:8440 (192.168.1.152)
INFO 2016-03-21 15:15:09,777 NetUtil.py:60 - Connecting to https://master.hdp.com:8440/ca
INFO 2016-03-21 15:15:09,867 threadpool.py:52 - Started thread pool with 3 core threads and 20 maximum threads
WARNING 2016-03-21 15:15:09,868 AlertSchedulerHandler.py:243 - [AlertScheduler] /var/lib/ambari-agent/cache/alerts/definitions.json not found or invalid. No alerts will be scheduled until registration occurs.
INFO 2016-03-21 15:15:09,868 AlertSchedulerHandler.py:139 - [AlertScheduler] Starting <ambari_agent.apscheduler.scheduler.Scheduler object at 0x22d2610>; currently running: False
INFO 2016-03-21 15:15:11,872 hostname.py:89 - Read public hostname 'master.hdp.com' using socket.getfqdn()
ERROR 2016-03-21 15:15:11,881 main.py:315 - Fatal exception occurred:
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 312, in <module>
    main(heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 303, in main
    ExitHelper.execute_cleanup()
TypeError: unbound method execute_cleanup() must be called with ExitHelper instance as first argument (got nothing instead)






ambari-agent.out:
 Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/threading.py", line 811, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/site-packages/ambari_agent/Controller.py", line 375, in run
    self.register = Register(self.config)
  File "/usr/lib/python2.6/site-packages/ambari_agent/Register.py", line 34, in init
    self.hardware = Hardware()
  File "/usr/lib/python2.6/site-packages/ambari_agent/Hardware.py", line 43, in init
    self.hardware['mounts'] = Hardware.osdisks()
  File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk
    return fn(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/ambari_agent/Hardware.py", line 96, in osdisks
    if mountinfo != None and Hardware._chk_mount(mountinfo['mountpoint']):
  File "/usr/lib/python2.6/site-packages/ambari_agent/Hardware.py", line 105, in _chk_mount
    return call(['test', '-w', mountpoint], sudo=True, timeout=int(Hardware.CHECK_REMOTE_MOUNTS_TIMEOUT_DEFAULT)/2)[0] == 0
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 59, in inner
    log_msg = Logger.get_function_repr("{0}['{1}']".format(function.name, command_alias), kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/logger.py", line 147, in get_function_repr
    return unicode("{0} {{{1}}}").format(name, arguments_str)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 15: ordinal not in range(128)

Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 312, in <module>
    main(heartbeat_stop_callback)
  File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 303, in main
    ExitHelper.execute_cleanup()
TypeError: unbound method execute_cleanup() must be called with ExitHelper instance as first argument (got nothing instead)
?


展开
收起
kun坤 2020-06-14 14:43:19 1971 0
1 条回答
写回答
取消 提交回答
  • 我也遇到类似的问题,请问解决了吗######我的问题跟楼主的差不多,刚刚解决。CentOS7自带的SSL版本是没问题的。我出现这个问题的原因是系统语言导致的,之前安装centos7选择的是中文,后来重装为英文的就没出现这个问题了######OpenSSL装的最新版本吗?######并没有,怀疑是SSL,但并没找到解决办法,回装2.1了######

    我也遇到同样的问题,蛋疼。。至今尚未解决。。。以下是我的日志,哪位大神给点儿指示~

    Agent端日志:


    INFO 2016-04-05 10:31:30,106 hostname.py:89 - Read public hostname \'slavenode1.hdp\' using socket.getfqdn()
    ERROR 2016-04-05 10:31:30,111 main.py:309 - Fatal exception occurred:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 306, in <module>
        main(heartbeat_stop_callback)
      File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 297, in main
        ExitHelper.execute_cleanup()
    TypeError: unbound method execute_cleanup() must be called with ExitHelper instance as first argument (got nothing instead)
    ', None)


    Server端日志:

    01 四月 2016 20:19:53,480 ERROR [qtp-ambari-client-23] AbstractResourceProvider:280 - Caught AmbariException when creating a resource
    org.apache.ambari.server.HostNotFoundException: Host not found, hostname=
    at org.apache.ambari.server.state.cluster.ClustersImpl.getHost(ClustersImpl.java:370)
    at org.apache.ambari.server.state.ConfigHelper.getEffectiveDesiredTags(ConfigHelper.java:107)
    at org.apache.ambari.server.controller.AmbariManagementControllerImpl.findConfigurationTagsWithOverrides(AmbariManagementControllerImpl.java:1876)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37)
    at com.sun.proxy.$Proxy83.findConfigurationTagsWithOverrides(Unknown Source)
    at org.apache.ambari.server.controller.AmbariActionExecutionHelper.addExecutionCommandsToStage(AmbariActionExecutionHelper.java:395)
    at org.apache.ambari.server.controller.AmbariManagementControllerImpl.createAction(AmbariManagementControllerImpl.java:3402)
    at org.apache.ambari.server.controller.internal.RequestResourceProvider$1.invoke(RequestResourceProvider.java:166)
    at org.apache.ambari.server.controller.internal.RequestResourceProvider$1.invoke(RequestResourceProvider.java:163)
    at org.apache.ambari.server.controller.internal.AbstractResourceProvider.invokeWithRetry(AbstractResourceProvider.java:450)
    at org.apache.ambari.server.controller.internal.AbstractResourceProvider.createResources(AbstractResourceProvider.java:273)
    at org.apache.ambari.server.controller.internal.RequestResourceProvider.createResources(RequestResourceProvider.java:163)
    at org.apache.ambari.server.controller.internal.ClusterControllerImpl.createResources(ClusterControllerImpl.java:289)
    at org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl.create(PersistenceManagerImpl.java:76)
    at org.apache.ambari.server.api.handlers.CreateHandler.persist(CreateHandler.java:36)
    at org.apache.ambari.server.api.handlers.BaseManagementHandler.handleRequest(BaseManagementHandler.java:72)
    at org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:135)
    at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:106)
    at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:75)
    at org.apache.ambari.server.api.services.RequestService.createRequests(RequestService.java:145)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.apache.ambari.server.security.authorization.AmbariAuthorizationFilter.doFilter(AmbariAuthorizationFilter.java:196)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
    at org.apache.ambari.server.api.MethodOverrideFilter.doFilter(MethodOverrideFilter.java:72)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
    at org.apache.ambari.server.api.AmbariPersistFilter.doFilter(AmbariPersistFilter.java:47)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
    at org.apache.ambari.server.security.AbstractSecurityHeaderFilter.doFilter(AbstractSecurityHeaderFilter.java:109)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
    at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:82)
    at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:294)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1467)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
    at org.apache.ambari.server.controller.AmbariHandlerList.processHandlers(AmbariHandlerList.java:216)
    at org.apache.ambari.server.controller.AmbariHandlerList.processHandlers(AmbariHandlerList.java:205)
    at org.apache.ambari.server.controller.AmbariHandlerList.handle(AmbariHandlerList.java:139)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
    at org.eclipse.jetty.server.Server.handle(Server.java:370)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
    at java.lang.Thread.run(Thread.java:745)

    ######回复 @Royma_1990 : 是的######我的问题解决了、 之前安装CentOS时选择的语言是中文,然后就一直出现这个问题解决不掉。 后来重装系统选择了英文,就没再出现这个问题了。。######

    缺少ambari服务依赖,运行 yum install ambari-server 安装后无需启动 

    https://reviews.apache.org/r/34822/

    ######

    我的报错前面有一句ERROR 2016-06-14 02:19:11,301 Controller.py:165 - Cannot register host with non compatible agent version, hostname=node1

    INFO 2016-06-14 02:19:11,301 Controller.py:394 - Registration response from master.wyj.com was FAILED
    ERROR 2016-06-14 02:19:11,301 main.py:309 - Fatal exception occurred:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 306, in <module>
        main(heartbeat_stop_callback)
      File "/usr/lib/python2.6/site-packages/ambari_agent/main.py", line 297, in main
        ExitHelper.execute_cleanup()
    TypeError: unbound method execute_cleanup() must be called with ExitHelper instance as first argument (got nothing instead)

    我怀疑是我agent的版本和server版本不一致造成的。

    ######你换英文版系统试试,直接装英文版的系统######这个错误也可能有别的错误,我一看是用中文centos系统出现了,后来换成英文的还是有,之后查找Ambari server的日志,发现里面有Host not found错误,推测可能DNS设置有问题,然后发现在client中hosts里忘了添加其他datanode节点和本机的FQDN与IP的映射,添加进之后重新跑就正常了。
    2020-06-15 11:08:00
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《基于 Service Worker 实现在线代理》 立即下载
开源广进-用Service Catalog构造K8S服务能力 立即下载
低代码开发师(初级)实战教程 立即下载