wso2 / product-iots

Welcome to the WSO2 IoT Server source code! For info on working with the WSO2 IoT Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
184 stars 181 forks source link

[Broker] Error when stopping the broker node #1280

Open pubudup opened 7 years ago

pubudup commented 7 years ago
  1. Start broker, core, analytics in that order
  2. Once all the servers are started stop the broker node
  3. Observe the server logs

Expected Results:-

Actual Results:-

[2017-08-08 12:22:53,116] [IoT-Broker] ERROR {org.wso2.carbon.core.init.CarbonServerManager} -  Error occurred while shutting down WSO2 Message Broker
sun.reflect.generics.reflectiveObjects.NotImplementedException
    at org.wso2.andes.mqtt.MQTTLocalSubscription.forcefullyDisconnect(MQTTLocalSubscription.java:153)
    at org.wso2.andes.kernel.subscription.SubscriberConnection.forcefullyDisconnect(SubscriberConnection.java:219)
    at org.wso2.andes.kernel.subscription.AndesSubscription.closeConnection(AndesSubscription.java:420)
    at org.wso2.andes.kernel.subscription.AndesSubscriptionManager.closeAllActiveLocalSubscriptions(AndesSubscriptionManager.java:876)
    at org.wso2.andes.server.cluster.ClusterManager.clearAllPersistedStatesOfLocalNode(ClusterManager.java:269)
    at org.wso2.andes.server.cluster.ClusterManager.prepareLocalNodeForShutDown(ClusterManager.java:175)
    at org.wso2.andes.kernel.disruptor.inbound.InboundKernelOpsEvent.gracefulShutdown(InboundKernelOpsEvent.java:213)
    at org.wso2.andes.kernel.Andes.shutDown(Andes.java:331)
    at org.wso2.andes.kernel.AndesKernelBoot.shutDownAndesKernel(AndesKernelBoot.java:232)
    at org.wso2.carbon.andes.internal.QpidServiceComponent$MBShutdownHandler.invoke(QpidServiceComponent.java:560)
    at org.wso2.carbon.core.internal.CarbonCoreServiceComponent.shutdown(CarbonCoreServiceComponent.java:195)
    at org.wso2.carbon.core.init.CarbonServerManager.shutdown(CarbonServerManager.java:846)
    at org.wso2.carbon.core.init.CarbonServerManager.shutdownGracefully(CarbonServerManager.java:884)
    at org.wso2.carbon.core.init.CarbonServerManager$4.run(CarbonServerManager.java:902)
pubudup commented 7 years ago

@chamaraanu , @madhawap , @geethkokila : Pre-RC4 pack 2 (Released on 08-Aug-2017) , High

pubudup commented 7 years ago

This behaviour can be avoided by stopping the servers in the following order. Analytics, Core, Broker.

harshanL commented 7 years ago

When shutting down the MB node first, all the active MQTT connections will be forcefully terminated. But the forceFullyDisconnect method is not implemented in MQTTLocalSubscription class and it's throwing a not-implmented exception. This issue will be fixed when this method is implemented.

[1]. https://github.com/wso2/andes/blob/v3.2.15/modules/andes-core/broker/src/main/java/org/wso2/andes/mqtt/MQTTLocalSubscription.java#L153

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity.