ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artem Ervits <artemerv...@gmail.com>
Subject Re: delete using API problem
Date Fri, 17 Apr 2015 19:00:03 GMT
still had to delete STORM_UI_SERVER by API

curl -u admin:admin -H "X-Requested-By:ambari" -X DELETE
http://localhost:8080/api/v1/clusters/NYPTest/services/STORM

then tried deleting the service again and transaction rolled back again.

retried the command and it went through:

17 Apr 2015 14:58:39,279  INFO [qtp-client-20] ClusterImpl:1755 - Deleting
service for cluster, clusterName=NYPTest, serviceName=STORM
17 Apr 2015 14:58:39,280  INFO [qtp-client-20] ServiceImpl:529 - Deleting
all components for service, clusterName=NYPTest, serviceName=STORM



On Fri, Apr 17, 2015 at 2:38 PM, Artem Ervits <artemervits@gmail.com> wrote:

> ok, I went to the Ambari database and found table servicedesiredstate, in
> that table, STORM is listed as STARTED in desired_state column. I issued a
> command to stop the service
>
> curl -u admin:password -i -H 'X-Requested-By: ambari' -X PUT -d
> '{"RequestInfo": {"context" :"Stop STORM"}, "Body": {"ServiceInfo":
> {"state": "INSTALLED"}}}'
> http://localhost:8080/api/v1/clusters/c1/services/STORM
>
> it took it, I confirmed by going back into the database and desired_stated
> changed to INSTALLED. At that point I was able to delete the service.
>
> curl -u admin:password -H "X-Requested-By: ambari" -X GET
> http://localhost:8080/api/v1/clusters/c1/services/STORM   ​
>
> {
>   "status" : 404,
>   "message" : "The requested resource doesn't exist: Service not found,
> clusterName=c1, serviceName=STORM"
> curl: (6) Couldn't resolve host '​'
>
> I went back into the database and service is still listed.
>
> here's entry from the ambari-server.log
>
> 17 Apr 2015 14:30:37,686  INFO [qtp-client-2389] ClusterImpl:1755 -
> Deleting service for cluster, clusterName=c1, serviceName=STORM
> 17 Apr 2015 14:30:37,688  INFO [qtp-client-2389] ServiceImpl:529 -
> Deleting all components for service, clusterName=c1, serviceName=STORM
> 17 Apr 2015 14:30:37,694  INFO [qtp-client-2389] ServiceComponentImpl:551
> - Deleting all servicecomponenthosts for component, clusterName=c1,
> serviceName=STORM, componentName=STORM_UI_SERVER
> 17 Apr 2015 14:30:37,696  INFO [qtp-client-2389] ServiceComponentImpl:551
> - Deleting all servicecomponenthosts for component, clusterName=c1,
> serviceName=STORM, componentName=SUPERVISOR
> 17 Apr 2015 14:30:37,697  INFO [qtp-client-2389] ServiceComponentImpl:551
> - Deleting all servicecomponenthosts for component, clusterName=c1,
> serviceName=STORM, componentName=NIMBUS
> 17 Apr 2015 14:30:37,698  INFO [qtp-client-2389] ServiceComponentImpl:551
> - Deleting all servicecomponenthosts for component, clusterName=c1,
> serviceName=STORM, componentName=DRPC_SERVER
> 17 Apr 2015 14:30:37,754  WARN [qtp-client-2389] ServletHandler:514 -
> /api/v1/clusters/c1/services/STORM
> javax.persistence.RollbackException: Transaction rolled back because
> transaction was set to RollbackOnly.
>         at
> org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:141)
>         at
> org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:91)
>         at
> org.apache.ambari.server.state.cluster.ClusterImpl.deleteService(ClusterImpl.java:1763)
>         at
> org.apache.ambari.server.controller.internal.ServiceResourceProvider.deleteServices(ServiceResourceProvider.java:934)
>         at
> org.apache.ambari.server.controller.internal.ServiceResourceProvider$3.invoke(ServiceResourceProvider.java:252)
>         at
> org.apache.ambari.server.controller.internal.ServiceResourceProvider$3.invoke(ServiceResourceProvider.java:249)
>         at
> org.apache.ambari.server.controller.internal.AbstractResourceProvider.modifyResources(AbstractResourceProvider.java:331)
>         at
> org.apache.ambari.server.controller.internal.ServiceResourceProvider.deleteResources(ServiceResourceProvider.java:249)
>         at
> org.apache.ambari.server.controller.internal.ClusterControllerImpl.deleteResources(ClusterControllerImpl.java:330)
>         at
> org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl.delete(PersistenceManagerImpl.java:107)
>         at
> org.apache.ambari.server.api.handlers.DeleteHandler.persist(DeleteHandler.java:44)
>         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:103)
>         at
> org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:72)
>         at
> org.apache.ambari.server.api.services.ServiceService.deleteService(ServiceService.java:178)
>         at sun.reflect.GeneratedMethodAccessor186.invoke(Unknown Source)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         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:288)
>         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:134)
>         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:1469)
>         at
> com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
>         at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
>         at
> com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
>         at
> com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
>         at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
>         at
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1329)
>         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.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
>         at
> org.apache.ambari.server.api.MethodOverrideFilter.doFilter(MethodOverrideFilter.java:72)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
>         at
> org.apache.ambari.server.api.AmbariPersistFilter.doFilter(AmbariPersistFilter.java:47)
>         at
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>         at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1038)
>         at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:374)
>         at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
>         at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:972)
>         at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>         at
> org.apache.ambari.server.controller.FailsafeHandlerList.handleNonFailSafe(FailsafeHandlerList.java:148)
>         at
> org.apache.ambari.server.controller.AmbariHandlerList.handleNonFailSafe(AmbariHandlerList.java:157)
>         at
> org.apache.ambari.server.controller.FailsafeHandlerList.handle(FailsafeHandlerList.java:130)
>         at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>         at org.eclipse.jetty.server.Server.handle(Server.java:363)
>         at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
>         at
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
>         at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
>         at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
>         at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>         at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>         at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
>         at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
>         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)
> 17 Apr 2015 14:30:44,864  INFO [qtp-client-4136] ClusterImpl:1755 -
> Deleting service for cluster, clusterName=c1, serviceName=STORM
> 17 Apr 2015 14:30:44,866  INFO [qtp-client-4136] ServiceImpl:529 -
> Deleting all components for service, clusterName=c1, serviceName=STORM
>
>
> :
>
>
> On Fri, Apr 17, 2015 at 1:53 PM, Artem Ervits <artemervits@gmail.com>
> wrote:
>
>> I am seeing a lot of these:
>>
>> 17 Apr 2015 13:52:18,828  WARN [pool-2-thread-684]
>> RestMetricsPropertyProvider:204 - Unable to get component REST metrics. No
>> host name for STORM_UI_SERVER.
>> 17 Apr 2015 13:52:25,183  WARN [pool-2-thread-685]
>> RestMetricsPropertyProvider:204 - Unable to get component REST metrics. No
>> host name for STORM_UI_SERVER.
>> 17 Apr 2015 13:52:31,615  WARN [pool-2-thread-678]
>> RestMetricsPropertyProvider:204 - Unable to get component REST metrics. No
>> host name for STORM_UI_SERVER.
>>
>> I must confess that I erased all storm packages from each server prior to
>> doing any API calls, if that is of any help.
>>
>>
>> On Fri, Apr 17, 2015 at 12:29 PM, Yusaku Sako <yusaku@hortonworks.com>
>> wrote:
>>
>>>  Wow, this is bizarre.
>>> Artem, do you see anything in ambari-server.log corresponding to the GET
>>> http://localhost:8080/api/v1/clusters/c1/services/STORM call?
>>>
>>>  Yusaku
>>>
>>>   From: Sumit Mohanty <smohanty@hortonworks.com>
>>> Reply-To: "user@ambari.apache.org" <user@ambari.apache.org>
>>> Date: Friday, April 17, 2015 9:07 AM
>>> To: "user@ambari.apache.org" <user@ambari.apache.org>
>>>
>>> Subject: Re: delete using API problem
>>>
>>>   ​That error is something I am not familiar with. Perhaps someone else
>>> can chime in.
>>>  ------------------------------
>>> *From:* dbist13@gmail.com <dbist13@gmail.com> on behalf of Artem Ervits
>>> <artemervits@gmail.com>
>>> *Sent:* Friday, April 17, 2015 8:24 AM
>>> *To:* user@ambari.apache.org
>>> *Subject:* Re: delete using API problem
>>>
>>>   I think the anwer lies in last line "couldn't resolve host ''. How do
>>> I go about this?
>>>
>>>  {
>>>   "href" : "http://localhost:8080/api/v1/clusters/c1/services/STORM",
>>>   "ServiceInfo" : {
>>>     "cluster_name" : "c1",
>>>     "maintenance_state" : "ON",
>>>     "service_name" : "STORM",
>>>     "state" : "UNKNOWN"
>>>   },
>>>   "alerts_summary" : {
>>>     "CRITICAL" : 0,
>>>     "MAINTENANCE" : 1,
>>>     "OK" : 0,
>>>     "UNKNOWN" : 0,
>>>     "WARNING" : 0
>>>   },
>>>   "alerts" : [
>>>     {
>>>       "href" : "
>>> http://localhost:8080/api/v1/clusters/c1/services/STORM/alerts/12",
>>>       "Alert" : {
>>>         "cluster_name" : "c1",
>>>         "definition_id" : 22,
>>>         "definition_name" : "storm_supervisor_process_percent",
>>>         "host_name" : null,
>>>         "id" : 12,
>>>         "service_name" : "STORM"
>>>       }
>>>     }
>>>   ],
>>>   "components" : [
>>>     {
>>>       "href" : "
>>> http://localhost:8080/api/v1/clusters/c1/services/STORM/components/DRPC_SERVER
>>> ",
>>>       "ServiceComponentInfo" : {
>>>         "cluster_name" : "c1",
>>>         "component_name" : "DRPC_SERVER",
>>>         "service_name" : "STORM"
>>>       }
>>>     },
>>>     {
>>>       "href" : "
>>> http://localhost:8080/api/v1/clusters/c1/services/STORM/components/NIMBUS
>>> ",
>>>       "ServiceComponentInfo" : {
>>>         "cluster_name" : "c1",
>>>         "component_name" : "NIMBUS",
>>>         "service_name" : "STORM"
>>>       }
>>>     },
>>>     {
>>>       "href" : "
>>> http://localhost:8080/api/v1/clusters/c1/services/STORM/components/STORM_UI_SERVER
>>> ",
>>>       "ServiceComponentInfo" : {
>>>         "cluster_name" : "c1",
>>>         "component_name" : "STORM_UI_SERVER",
>>>         "service_name" : "STORM"
>>>       }
>>>     },
>>>     {
>>>       "href" : "
>>> http://localhost:8080/api/v1/clusters/c1/services/STORM/components/SUPERVISOR
>>> ",
>>>       "ServiceComponentInfo" : {
>>>         "cluster_name" : "c1",
>>>         "component_name" : "SUPERVISOR",
>>>         "service_name" : "STORM"
>>>       }
>>>     }
>>>   ],
>>>   "artifacts" : [ ]
>>> curl: (6) Couldn't resolve host '​'
>>>
>>>
>>
>

Mime
View raw message