stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shavindri Dissanayake <shavin...@wso2.com>
Subject [Question] [Issue] Undeploying and deleting an application
Date Thu, 02 Apr 2015 05:18:01 GMT
Hi Devs,

I am in the process of documenting the samples in wiki, and testing if the
steps documented run accordingly. I faced the following issue when doing so.

Deployed the Complex-app application in the respective sample. Next the
application was successfully undeployed  and deleted [1]. There after step
by step I removed the artifacts added to the application, but when trying
to remove the auto-scaling policy an error message was given mentioning
that the auto-scaling policy cannot be removed because the application is
using it [2].

Then I went to the UI and checked. It shows that the application is still
deployed. When trying to undeploy the application via the UI too, the
success message is given saying the application is undeployed successfully
but the application does not get undeployed.

Do you know why a user might face this issue? Is this regarding to any
steps followed when undeploying an application ?



[1]

Shavindris-MacBook-Air:samples shavindridissanayake$

Shavindris-MacBook-Air:samples shavindridissanayake$ curl -X POST -H
"Content-Type: application/json" -k -v -u admin:admin
https://localhost:9443/api/applications/complex-app/undeploy

* Hostname was NOT found in DNS cache

*   Trying ::1...

* Connected to localhost (::1) port 9443 (#0)

* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

* Server certificate: localhost

* Server auth using Basic with user 'admin'

> POST /api/applications/complex-app/undeploy HTTP/1.1

> Authorization: Basic YWRtaW46YWRtaW4=

> User-Agent: curl/7.37.1

> Host: localhost:9443

> Accept: */*

> Content-Type: application/json

>

< HTTP/1.1 202 Accepted

< Date: Thu, 02 Apr 2015 04:37:03 GMT

< Content-Type: application/json

< Transfer-Encoding: chunked

* Server WSO2 Carbon Server is not blacklisted

< Server: WSO2 Carbon Server

<

* Connection #0 to host localhost left intact

{"statusCode":202,"successMessage":"Application undeployed successfully:
[application] complex-app"}Shavindris-MacBook-Air:samples
shavindridissanayake$

Shavindris-MacBook-Air:samples shavindridissanayake$

Shavindris-MacBook-Air:samples shavindridissanayake$ curl -X DELETE -H
"Content-Type: application/json" -k -v -u admin:admin
https://localhost:9443/api/applications/complex-app

* Hostname was NOT found in DNS cache

*   Trying ::1...

* Connected to localhost (::1) port 9443 (#0)

* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

* Server certificate: localhost

* Server auth using Basic with user 'admin'

> DELETE /api/applications/complex-app HTTP/1.1

> Authorization: Basic YWRtaW46YWRtaW4=

> User-Agent: curl/7.37.1

> Host: localhost:9443

> Accept: */*

> Content-Type: application/json

>

< HTTP/1.1 200 OK

< Date: Thu, 02 Apr 2015 04:37:22 GMT

< Content-Type: application/json

< Transfer-Encoding: chunked

* Server WSO2 Carbon Server is not blacklisted

< Server: WSO2 Carbon Server

<

* Connection #0 to host localhost left intact

{"statusCode":200,"successMessage":"Application deleted successfully:
[application] complex-app"}Shavindris-MacBook-Air:samples
shavindridissanayake$


[2]

Shavindris-MacBook-Air:samples shavindridissanayake$ curl -X DELETE -H
"Content-Type: application/json" -k -v -u admin:admin
https://localhost:9443/api/autoscalingPolicies/autoscaling-policy-1

* Hostname was NOT found in DNS cache

*   Trying ::1...

* Connected to localhost (::1) port 9443 (#0)

* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

* Server certificate: localhost

* Server auth using Basic with user 'admin'

> DELETE /api/autoscalingPolicies/autoscaling-policy-1 HTTP/1.1

> Authorization: Basic YWRtaW46YWRtaW4=

> User-Agent: curl/7.37.1

> Host: localhost:9443

> Accept: */*

> Content-Type: application/json

>

< HTTP/1.1 400 Bad Request

< Date: Thu, 02 Apr 2015 05:07:17 GMT

< Content-Type: application/json

< Transfer-Encoding: chunked

< Connection: close

* Server WSO2 Carbon Server is not blacklisted

< Server: WSO2 Carbon Server

<

* Closing connection 0

{"errorCode":400,"errorMessage":"This autoscaler policy cannot be removed,
since it is used in applications."}Shavindris-MacBook-Air:samples
shavindridissanayake$

[3]

[2015-04-02 10:39:20,873]  INFO
{org.apache.stratos.rest.endpoint.api.StratosApiV41Utils} -  Removing
autoscaling policy: [id] autoscaling-policy-1

[2015-04-02 10:39:20,891] ERROR
{org.apache.stratos.rest.endpoint.api.StratosApiV41Utils} -  This
autoscaler policy cannot be removed, since it is used in applications.

org.apache.stratos.autoscaler.stub.AutoscalerServiceInvalidPolicyExceptionException:
AutoscalerServiceInvalidPolicyExceptionException

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

at java.lang.Class.newInstance(Class.java:379)

at
org.apache.stratos.autoscaler.stub.AutoscalerServiceStub.removeAutoScalingPolicy(AutoscalerServiceStub.java:2063)

at
org.apache.stratos.common.client.AutoscalerServiceClient.removeAutoscalingPolicy(AutoscalerServiceClient.java:160)

at
org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.removeAutoscalingPolicy(StratosApiV41Utils.java:731)

at
org.apache.stratos.rest.endpoint.api.StratosApiV41.removeAutoscalingPolicy(StratosApiV41.java:1063)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)

at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)

at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)

at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)

at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)

at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)

at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)

at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)

at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)

at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)

at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)

at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)

at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)

at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doDelete(AbstractHTTPServlet.java:217)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:761)

at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)

at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)

at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)

at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)

at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)

at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:745)

[2015-04-02 10:39:20,893] ERROR
{org.apache.stratos.rest.endpoint.handlers.CustomExceptionMapper} -  This
autoscaler policy cannot be removed, since it is used in applications.

org.apache.stratos.rest.endpoint.exception.RestAPIException: This
autoscaler policy cannot be removed, since it is used in applications.

at
org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.removeAutoscalingPolicy(StratosApiV41Utils.java:738)

at
org.apache.stratos.rest.endpoint.api.StratosApiV41.removeAutoscalingPolicy(StratosApiV41.java:1063)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)

at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)

at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:194)

at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:100)

at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:57)

at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:93)

at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)

at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239)

at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)

at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:203)

at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)

at
org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:159)

at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)

at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.doDelete(AbstractHTTPServlet.java:217)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:761)

at
org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)

at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)

at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)

at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178)

at
org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)

at
org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56)

at
org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)

at
org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141)

at
org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156)

at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)

at
org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52)

at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)

at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)

at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)

at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

at java.lang.Thread.run(Thread.java:745)

Caused by:
org.apache.stratos.autoscaler.stub.AutoscalerServiceInvalidPolicyExceptionException:
AutoscalerServiceInvalidPolicyExceptionException

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

at java.lang.Class.newInstance(Class.java:379)

at
org.apache.stratos.autoscaler.stub.AutoscalerServiceStub.removeAutoScalingPolicy(AutoscalerServiceStub.java:2063)

at
org.apache.stratos.common.client.AutoscalerServiceClient.removeAutoscalingPolicy(AutoscalerServiceClient.java:160)

at
org.apache.stratos.rest.endpoint.api.StratosApiV41Utils.removeAutoscalingPolicy(StratosApiV41Utils.java:731)

... 45 more



Thanks & Regards
Shavindri Dissanayake
Technical Writer
LinkedIn Profile
<https://www.linkedin.com/profile/view?id=112227277&trk=nav_responsive_tab_profile>
Mob: 0779966739

WSO2 Inc.
lean.enterprise.middleware

Mime
View raw message