Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to download client config files from Ambari 2.4.1

Solved Go to solution
Highlighted

Unable to download client config files from Ambari 2.4.1

Expert Contributor

Hello,

I'm trying to download our cluster config files but im having a status 500 as response..

Ambari response:

{
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: Execution of \"ambari-python-wrap /var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package/scripts/spark_client.py generate_configs /var/lib/ambari-server/data/tmp/SPARK_CLIENT-configuration.json /var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package /var/lib/ambari-server/data/tmp/structured-out.json INFO /var/lib/ambari-server/data/tmp\" returned 1. java.lang.Throwable: 2017-01-19 09:17:44,499 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf\n2017-01-19 09:17:44,502 - call['ambari-python-wrap /usr/bin/hdp-select status spark-client'] {'timeout': 20}\n2017-01-19 09:17:44,540 - call returned (0, 'spark-client - 2.4.0.0-169')\n2017-01-19 09:17:44,542 - Directory['/var/lib/ambari-server/data/tmp'] {'create_parents': True}\n2017-01-19 09:17:44,564 - Creating directory Directory['/var/lib/ambari-server/data/tmp'] since it doesn't exist.\nTraceback (most recent call last):\n  File \"/var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package/scripts/spark_client.py\", line 88, in <module>\n    SparkClient().execute()\n  File \"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py\", line 280, in execute\n    method(env)\n  File \"/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py\", line 806, in generate_configs\n    Directory(self.get_tmp_dir(), create_parents = True)\n  File \"/usr/lib/python2.6/site-packages/resource_management/core/base.py\", line 155, in __init__\n    self.env.run()\n  File \"/usr/lib/python2.6/site-packages/resource_management/core/environment.py\", line 160, in run\n    self.run_action(resource, action)\n  File \"/usr/lib/python2.6/site-packages/resource_management/core/environment.py\", line 124, in run_action\n    provider_action()\n  File \"/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py\", line 194, in action_create\n    raise Fail(\"Applying %s failed, file %s already exists\" % (self.resource, path))\nresource_management.core.exceptions.Fail: Applying Directory['/var/lib/ambari-server/data/tmp'] failed, file /var/lib/ambari-server/data/tmp already exists\n"
}

ambari-server.log output:

19 Jan 2017 09:17:44,361  INFO [ambari-client-thread-1474693] Configuration:1026 - Reading password from existing file
19 Jan 2017 09:17:44,709 ERROR [ambari-client-thread-1474693] ClientConfigResourceProvider:418 - Execution of "ambari-python-wrap /var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package/scripts/spark_client.py generate_configs /var/lib/ambari-server/data/tmp/SPARK_CLIENT-configuration.json /var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package /var/lib/ambari-server/data/tmp/structured-out.json INFO /var/lib/ambari-server/data/tmp" returned 1.
java.util.concurrent.ExecutionException: Execution of "ambari-python-wrap /var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package/scripts/spark_client.py generate_configs /var/lib/ambari-server/data/tmp/SPARK_CLIENT-configuration.json /var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package /var/lib/ambari-server/data/tmp/structured-out.json INFO /var/lib/ambari-server/data/tmp" returned 1.
        at org.apache.ambari.server.controller.internal.ClientConfigResourceProvider.executeCommand(ClientConfigResourceProvider.java:491)
        at org.apache.ambari.server.controller.internal.ClientConfigResourceProvider.getResources(ClientConfigResourceProvider.java:410)
        at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ExtendedResourceProviderWrapper.queryForResources(ClusterControllerImpl.java:966)
        at org.apache.ambari.server.controller.internal.ClusterControllerImpl.getResources(ClusterControllerImpl.java:141)
        at org.apache.ambari.server.api.query.QueryImpl.doQuery(QueryImpl.java:529)
        at org.apache.ambari.server.api.query.QueryImpl.queryForResources(QueryImpl.java:398)
        at org.apache.ambari.server.api.query.QueryImpl.execute(QueryImpl.java:222)
        at org.apache.ambari.server.api.handlers.ReadHandler.handleRequest(ReadHandler.java:77)
        at org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:145)
        at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:126)
        at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:90)
        at org.apache.ambari.server.api.services.ComponentService.createClientConfigResource(ComponentService.java:226)
        at org.apache.ambari.server.api.services.ComponentService.getComponent(ComponentService.java:79)
        at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
        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.RightHandPathRule.accept(RightHandPathRule.java:147)
        at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
        at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        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:558)
        at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1507)
        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.apache.ambari.server.security.authorization.AmbariAuthorizationFilter.doFilter(AmbariAuthorizationFilter.java:257)
        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.jwt.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:96)
        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.apache.ambari.server.security.authentication.AmbariAuthenticationFilter.doFilter(AmbariAuthenticationFilter.java:88)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.apache.ambari.server.security.authorization.AmbariUserAuthorizationFilter.doFilter(AmbariUserAuthorizationFilter.java:91)
        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:1478)
        at org.apache.ambari.server.api.MethodOverrideFilter.doFilter(MethodOverrideFilter.java:72)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1478)
        at org.apache.ambari.server.api.AmbariPersistFilter.doFilter(AmbariPersistFilter.java:47)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1478)
        at org.apache.ambari.server.security.AbstractSecurityHeaderFilter.doFilter(AbstractSecurityHeaderFilter.java:109)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1478)
        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:1478)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
        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:427)
        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:212)
        at org.apache.ambari.server.controller.AmbariHandlerList.processHandlers(AmbariHandlerList.java:201)
        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.headerComplete(AbstractHttpConnection.java:973)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1035)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:641)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:231)
        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)
Caused by: java.lang.Throwable: 2017-01-19 09:17:44,499 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2017-01-19 09:17:44,502 - call['ambari-python-wrap /usr/bin/hdp-select status spark-client'] {'timeout': 20}
2017-01-19 09:17:44,540 - call returned (0, 'spark-client - 2.4.0.0-169')
2017-01-19 09:17:44,542 - Directory['/var/lib/ambari-server/data/tmp'] {'create_parents': True}
2017-01-19 09:17:44,564 - Creating directory Directory['/var/lib/ambari-server/data/tmp'] since it doesn't exist.
Traceback (most recent call last):
  File "/var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package/scripts/spark_client.py", line 88, in <module>
    SparkClient().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 806, in generate_configs
    Directory(self.get_tmp_dir(), create_parents = True)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 194, in action_create
    raise Fail("Applying %s failed, file %s already exists" % (self.resource, path))
resource_management.core.exceptions.Fail: Applying Directory['/var/lib/ambari-server/data/tmp'] failed, file /var/lib/ambari-server/data/tmp already exists

        ... 102 more

ambari-audit.log output:

2017-01-19T09:17:44.710+0100, User(admin), RemoteIp(10.0.1.10), Operation(Client config download), RequestType(GET), url(http://pbigd01.int:8080/api/v1/clusters/pro/services/SPARK/components/SPARK_CLIENT?format=client_config_tar), ResultStatus(500 Internal Server Error), Reason(org.apache.ambari.server.controller.spi.SystemException: Execution of "ambari-python-wrap /var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package/scripts/spark_client.py generate_configs /var/lib/ambari-server/data/tmp/SPARK_CLIENT-configuration.json /var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package /var/lib/ambari-server/data/tmp/structured-out.json INFO /var/lib/ambari-server/data/tmp" returned 1. java.lang.Throwable: 2017-01-19 09:17:44,499 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2017-01-19 09:17:44,502 - call['ambari-python-wrap /usr/bin/hdp-select status spark-client'] {'timeout': 20}
2017-01-19 09:17:44,540 - call returned (0, 'spark-client - 2.4.0.0-169')
2017-01-19 09:17:44,542 - Directory['/var/lib/ambari-server/data/tmp'] {'create_parents': True}
2017-01-19 09:17:44,564 - Creating directory Directory['/var/lib/ambari-server/data/tmp'] since it doesn't exist.
Traceback (most recent call last):
  File "/var/lib/ambari-server/resources/common-services/SPARK/1.2.1/package/scripts/spark_client.py", line 88, in <module>
    SparkClient().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 806, in generate_configs
    Directory(self.get_tmp_dir(), create_parents = True)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 194, in action_create
    raise Fail("Applying %s failed, file %s already exists" % (self.resource, path))
resource_management.core.exceptions.Fail: Applying Directory['/var/lib/ambari-server/data/tmp'] failed, file /var/lib/ambari-server/data/tmp already exists
), Service(SPARK), Component(SPARK_CLIENT)

I also have tested to remove the the /var/lib/ambari-server/data/tmp but ambari just keep showing the same error after creating it with the following file inside:

total 176K
drwxr-xr-x  2 ambari ambari 4.0K Jan 19 09:29 .
drwxr-xr-x. 5 ambari root   4.0K Jan 19 09:29 ..
-rw-r--r--  1 ambari ambari 168K Jan 19 09:29 SPARK_CLIENT-configuration.json

Ambari-server is executed as ambari.

Any idea about what is possible going on?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Unable to download client config files from Ambari 2.4.1

Expert Contributor

Finally I solved this..

Due a bad sudoer configuration.. ambari was unable to execute some scripts as sudo.

The following configuration was missing in sudoers:

# Ambari: Core System Commands
ambari ALL=(ALL) NOPASSWD:SETENV: /usr/bin/yum,/usr/bin/zypper,/usr/bin/apt-get, /bin/mkdir, /usr/bin/test, /bin/ln, /bin/ls, /bin/chown, /bin/chmod, /bin/chgrp, /bin/cp, /usr/sbin/setenforce, /usr/bin/test, /usr/bin/stat, /bin/mv, /bin/sed, /bin/rm, /bin/kill, /bin/readlink, /usr/bin/pgrep, /bin/cat, /usr/bin/unzip, /bin/tar, /usr/bin/tee, /bin/touch, /usr/bin/mysql, /sbin/service mysqld *, /usr/bin/dpkg *, /bin/rpm *, /usr/sbin/hst * 


# Ambari: Hadoop and Configuration Commands
ambari ALL=(ALL) NOPASSWD:SETENV: /usr/bin/hdp-select, /usr/bin/conf-select, /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh, /usr/lib/hadoop/bin/hadoop-daemon.sh, /usr/lib/hadoop/sbin/hadoop-daemon.sh, /usr/bin/ambari-python-wrap *

# Ambari: System User and Group Commands
ambari ALL=(ALL) NOPASSWD:SETENV: /usr/sbin/groupadd, /usr/sbin/groupmod, /usr/sbin/useradd, /usr/sbin/usermod
7 REPLIES 7

Re: Unable to download client config files from Ambari 2.4.1

@Juan Manuel Nieto

Can you modify below property to root user in - "/etc/ambari-server/conf/ambari.properties"

ambari-server.user=root

Restart ambari server and check if that works fine?

Re: Unable to download client config files from Ambari 2.4.1

Expert Contributor

Hi @Sagar Shimpi, with root user works correctly.

Here is my sudoer configuration related to ambari:

Defaults exempt_group = ambari
Defaults: ambari !requiretty
ambari ALL=(ALL) NOPASSWD:SETENV: /bin/mkdir, /bin/cp, /bin/chmod, /bin/rm

Re: Unable to download client config files from Ambari 2.4.1

Expert Contributor

Seems to be a sudoer configuration problem if I change "NOPASSWD:SETENV: /bin/mkdir, /bin/cp, /bin/chmod, /bin/rm" for "NOPASSWD: ALL" it seems to work

Re: Unable to download client config files from Ambari 2.4.1

Super Mentor

@Juan Manuel Nieto

As you already mentined that you tried removing the "/var/lib/ambari-server/data/tmp" and created it again.

However in the permission we see ambari:root at one place. If you are planning to run ambari as a non root user then you might want to recursively give the permission to "/var/lib/ambari-server/" directory as "ambari:ambari"

drwxr-xr-x.5 ambari root   4.0K    Jan   19   09:29..
Example:
chown -R ambari:ambari /var/lib/ambari-server

.

Re: Unable to download client config files from Ambari 2.4.1

Expert Contributor

@Jay SenSharma

The error persist even after apply that ownership

Re: Unable to download client config files from Ambari 2.4.1

Expert Contributor

Finally I solved this..

Due a bad sudoer configuration.. ambari was unable to execute some scripts as sudo.

The following configuration was missing in sudoers:

# Ambari: Core System Commands
ambari ALL=(ALL) NOPASSWD:SETENV: /usr/bin/yum,/usr/bin/zypper,/usr/bin/apt-get, /bin/mkdir, /usr/bin/test, /bin/ln, /bin/ls, /bin/chown, /bin/chmod, /bin/chgrp, /bin/cp, /usr/sbin/setenforce, /usr/bin/test, /usr/bin/stat, /bin/mv, /bin/sed, /bin/rm, /bin/kill, /bin/readlink, /usr/bin/pgrep, /bin/cat, /usr/bin/unzip, /bin/tar, /usr/bin/tee, /bin/touch, /usr/bin/mysql, /sbin/service mysqld *, /usr/bin/dpkg *, /bin/rpm *, /usr/sbin/hst * 


# Ambari: Hadoop and Configuration Commands
ambari ALL=(ALL) NOPASSWD:SETENV: /usr/bin/hdp-select, /usr/bin/conf-select, /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh, /usr/lib/hadoop/bin/hadoop-daemon.sh, /usr/lib/hadoop/sbin/hadoop-daemon.sh, /usr/bin/ambari-python-wrap *

# Ambari: System User and Group Commands
ambari ALL=(ALL) NOPASSWD:SETENV: /usr/sbin/groupadd, /usr/sbin/groupmod, /usr/sbin/useradd, /usr/sbin/usermod

Re: Unable to download client config files from Ambari 2.4.1

New Contributor

hi Team,

This is pawan gir new to the hadoop world, m trying to install zookeeper on ambari server and its throwing below error.

Hi Sir, I'm trying to install ambari agent on VMs but it has some issue, please help me to close this issue, PFB the error. stderr: /var/lib/ambari-agent/data/errors-35.txt Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_client.py", line 81, in <module> ZookeeperClient().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 219, in execute method(env) File "/var/lib/ambari-agent/cache/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_client.py", line 60, in install self.install_packages(env) File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 410, in install_packages retry_count=agent_stack_retry_count) File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 154, in __init__ self.env.run() File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run self.run_action(resource, action) File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action provider_action() File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 54, in action_install self.install_package(package_name, self.resource.use_repos, self.resource.skip_repos) File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/yumrpm.py", line 49, in install_package self.checked_call_with_retries(cmd, sudo=True, logoutput=self.get_logoutput()) File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 83, in checked_call_with_retries return self._call_with_retries(cmd, is_checked=True, **kwargs) File "/usr/lib/python2.6/site-packages/resource_management/core/providers/package/__init__.py", line 91, in _call_with_retries code, out = func(cmd, **kwargs) File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner result = function(command, **kwargs) File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call tries=tries, try_sleep=try_sleep) File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper result = _call(command, **kwargs_copy) File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 291, in _call raise Fail(err_msg) resource_management.core.exceptions.Fail: Execution of '/usr/bin/yum -d 0 -e 0 -y install 'zookeeper_2_4_*'' returned 1. Error: Nothing to do stdout: /var/lib/ambari-agent/data/output-35.txt 2017-04-20 12:58:28,531 - Group['hadoop'] {} 2017-04-20 12:58:28,533 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']} 2017-04-20 12:58:28,535 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop']} 2017-04-20 12:58:28,536 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['users']} 2017-04-20 12:58:28,537 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555} 2017-04-20 12:58:28,540 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'} 2017-04-20 12:58:28,549 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa'] due to not_if 2017-04-20 12:58:28,575 - Repository['HDP-2.4'] {'base_url': 'http://hdpserver.techmahindra.com/yum/HDP/centos6/2.x/updates/2.3.4.0', 'action': ['create'], 'components': ['HDP', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP', 'mirror_list': None} 2017-04-20 12:58:28,585 - File['/etc/yum.repos.d/HDP.repo'] {'content': '[HDP-2.4]\nname=HDP-2.4\nbaseurl=http://hdpserver.techmahindra.com/yum/HDP/centos6/2.x/updates/2.3.4.0\n\npath=/\nenabled=1\ngpgcheck=0'} 2017-04-20 12:58:28,588 - Repository['HDP-UTILS-1.1.0.20'] {'base_url': 'http://hdpserver.techmahindra.com/yum/HDP-UTILS-1.1.0.20/repos/centos6', 'action': ['create'], 'components': ['HDP-UTILS', 'main'], 'repo_template': '[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list %}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0', 'repo_file_name': 'HDP-UTILS', 'mirror_list': None} 2017-04-20 12:58:28,594 - File['/etc/yum.repos.d/HDP-UTILS.repo'] {'content': '[HDP-UTILS-1.1.0.20]\nname=HDP-UTILS-1.1.0.20\nbaseurl=http://hdpserver.techmahindra.com/yum/HDP-UTILS-1.1.0.20/repos/centos6\n\npath=/\nenabled=1\ngpgcheck=0'} 2017-04-20 12:58:28,595 - Package['unzip'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2017-04-20 12:58:28,735 - Skipping installation of existing package unzip 2017-04-20 12:58:28,736 - Package['curl'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2017-04-20 12:58:28,755 - Skipping installation of existing package curl 2017-04-20 12:58:28,756 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2017-04-20 12:58:28,765 - Skipping installation of existing package hdp-select 2017-04-20 12:58:28,983 - Package['zookeeper_2_4_*'] {'retry_on_repo_unavailability': False, 'retry_count': 5} 2017-04-20 12:58:29,126 - Installing package zookeeper_2_4_* ('/usr/bin/yum -d 0 -e 0 -y install 'zookeeper_2_4_*'')

please help me to debug this issue.

Thanks

Pawan Giri