<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:33:52 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[OPNFLWPLUG-970] Unable to establish connections with switches after frequent connecting and disconnecting</title>
                <link>https://jira.opendaylight.org/browse/OPNFLWPLUG-970</link>
                <project id="10155" key="OPNFLWPLUG">OpenFlowPlugin</project>
                    <description>&lt;p&gt;My environment has three physical switches connecting to the opendaylight&#160;controller of carbon-sr2.&lt;/p&gt;

&lt;p&gt;After keeping making two of the switches&#160;connected and disconnected frequently for a while, the opendaylight&#160;controller couldn&apos;t set up the connections with switches any longer. Please see the attachment for karaf log.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;One fact is that everything started to go wrong when the following log message showed up:&lt;/p&gt;

&lt;p&gt;2018-01-08 14:21:35,601 | WARN | entLoopGroup-7-8 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 is already in termination state, closing all incoming connections.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Then all connections will be closed after that like this:&lt;/p&gt;

&lt;p&gt;2018-01-08 14:21:35,601 | INFO | entLoopGroup-7-8 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 connected.&lt;br/&gt;
2018-01-08 14:21:35,601 | WARN | entLoopGroup-7-8 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 is already in termination state, closing all incoming connections.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Here is part of the log (filter by openflow:35776560030) when it went wrong:&lt;/p&gt;

&lt;p&gt;2018-01-08 14:19:24,615 | WARN | lt-dispatcher-19 | ContextChainImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Not able to start clustering services for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:24,615 | WARN | ofppool-2 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Not able to set MASTER role on device openflow:35776560030, reason: Failed to initialize device openflow:35776560030 in 9s: java.util.concurrent.TimeoutException: Timeout waiting for task.&lt;br/&gt;
2018-01-08 14:19:24,615 | WARN | ofppool-2 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | This mastering is mandatory, destroying context chain and closing connection for device openflow:35776560030.&lt;br/&gt;
2018-01-08 14:19:24,616 | INFO | ofppool-2 | ContextChainImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Closed clustering services registration for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:24,621 | INFO | ult-dispatcher-3 | ContextChainImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Closing clustering services for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:24,621 | INFO | ult-dispatcher-3 | StatisticsContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Stopping statistics context cluster services for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:24,621 | INFO | ult-dispatcher-3 | StatisticsContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Stopping running statistics gathering for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:24,621 | INFO | ult-dispatcher-3 | RpcContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Stopping rpc context cluster services for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:24,621 | INFO | ult-dispatcher-3 | DeviceContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Stopping device context cluster services for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:24,622 | INFO | ult-dispatcher-3 | ContextChainImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Closed clustering services for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:24,625 | DEBUG | lt-dispatcher-20 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Entity openflow:35776560030 has no owner&lt;br/&gt;
2018-01-08 14:19:24,625 | INFO | lt-dispatcher-20 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Removing device Uri &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=openflow:35776560030&amp;#93;&lt;/span&gt; from operational DS&lt;br/&gt;
2018-01-08 14:19:24,626 | DEBUG | CommitFutures-1 | DeviceManagerImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Delete Node KeyedInstanceIdentifier{targetType=interface org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node, path=[org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Nodes, org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node[key=NodeKey [_id=Uri &lt;span class=&quot;error&quot;&gt;&amp;#91;_value=openflow:35776560030&amp;#93;&lt;/span&gt;]]]} was successful&lt;br/&gt;
2018-01-08 14:19:32,642 | INFO | ofppool-2 | SystemNotificationsListenerImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | ConnectionEvent:Closing connection as device is idle. Echo sent at Mon Jan 08 14:19:30 CST 2018. Device:/192.168.1.103:29990, NodeId:openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:32,642 | DEBUG | ofppool-2 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Actively closing connection: device=openflow:35776560030 | auxiliaryId=0 | connectionState=RIP&lt;br/&gt;
2018-01-08 14:19:32,642 | DEBUG | ofppool-2 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Trying unregister outbound queue handler registration for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:32,642 | DEBUG | ofppool-2 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Trying closing handshake context for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:19:32,642 | DEBUG | ofppool-2 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Propagating connection closed event: /192.168.1.103:29990, datapathId:35776560030.&lt;br/&gt;
2018-01-08 14:19:32,643 | INFO | ofppool-2 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 disconnected.&lt;br/&gt;
2018-01-08 14:19:32,644 | DEBUG | ofppool-2 | ContextChainImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | ContextChain for node openflow:35776560030 is already in TERMINATION state.&lt;br/&gt;
2018-01-08 14:21:35,601 | DEBUG | entLoopGroup-7-8 | HandshakeListenerImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | succeeded by getting sweep barrier after post-handshake for device openflow:35776560030&lt;br/&gt;
2018-01-08 14:21:35,601 | INFO | entLoopGroup-7-8 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 connected.&lt;br/&gt;
2018-01-08 14:21:35,601 | WARN | entLoopGroup-7-8 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 is already in termination state, closing all incoming connections.&lt;br/&gt;
2018-01-08 14:21:35,601 | DEBUG | entLoopGroup-7-8 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Actively closing connection: device=openflow:35776560030 | auxiliaryId=0 | connectionState=RIP&lt;br/&gt;
2018-01-08 14:21:35,601 | DEBUG | entLoopGroup-7-8 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Trying unregister outbound queue handler registration for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:21:35,601 | DEBUG | entLoopGroup-7-8 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Trying closing handshake context for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:21:43,691 | DEBUG | ntLoopGroup-7-10 | HandshakeListenerImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | succeeded by getting sweep barrier after post-handshake for device openflow:35776560030&lt;br/&gt;
2018-01-08 14:21:43,692 | INFO | ntLoopGroup-7-10 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 connected.&lt;br/&gt;
2018-01-08 14:21:43,692 | WARN | ntLoopGroup-7-10 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 is already trying to connect, wait until succeeded or disconnected.&lt;br/&gt;
2018-01-08 14:21:43,692 | DEBUG | ntLoopGroup-7-10 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Actively closing connection: device=openflow:35776560030 | auxiliaryId=0 | connectionState=RIP&lt;br/&gt;
2018-01-08 14:21:43,692 | DEBUG | ntLoopGroup-7-10 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Trying unregister outbound queue handler registration for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:21:43,692 | DEBUG | ntLoopGroup-7-10 | ConnectionContextImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Trying closing handshake context for node openflow:35776560030&lt;br/&gt;
2018-01-08 14:21:51,812 | DEBUG | ntLoopGroup-7-12 | HandshakeListenerImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | succeeded by getting sweep barrier after post-handshake for device openflow:35776560030&lt;br/&gt;
2018-01-08 14:21:51,812 | INFO | ntLoopGroup-7-12 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 connected.&lt;br/&gt;
2018-01-08 14:21:51,813 | WARN | ntLoopGroup-7-12 | ContextChainHolderImpl | 220 - org.opendaylight.openflowplugin.impl - 0.4.2.Carbon | Device openflow:35776560030 is already trying to connect, wait until succeeded or disconnected.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;I tried to analyze it, it seems sometimes the failure in setting master role on switches would cause this issue.&lt;/p&gt;

&lt;p&gt;The pattern is like: Failure in setting master role -&amp;gt; destroying context chain -&amp;gt; Closing connection as device is idle. -&amp;gt; disconnected -&amp;gt; conencted -&amp;gt;&#160;already in termination state -&amp;gt; connected -&amp;gt;&#160;already trying to connect -&amp;gt; connected -&amp;gt; already trying to connect -&amp;gt; ...&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Ubuntu 14.04&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="29044">OPNFLWPLUG-970</key>
            <summary>Unable to establish connections with switches after frequent connecting and disconnecting</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.opendaylight.org/images/icons/priorities/blocker.svg">Highest</priority>
                        <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="jamescch">Chien-Hsin Chen</assignee>
                                    <reporter username="jamescch">Chien-Hsin Chen</reporter>
                        <labels>
                    </labels>
                <created>Mon, 8 Jan 2018 07:12:52 +0000</created>
                <updated>Tue, 19 Jun 2018 10:04:06 +0000</updated>
                            <resolved>Tue, 19 Jun 2018 10:04:06 +0000</resolved>
                                    <version>Carbon-SR3</version>
                    <version>Carbon-SR2</version>
                                    <fixVersion>Oxygen</fixVersion>
                                    <component>openflowplugin-impl</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="60628" author="vishnoianil@gmail.com" created="Tue, 9 Jan 2018 05:45:26 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=jamescch&quot; class=&quot;user-hover&quot; rel=&quot;jamescch&quot;&gt;jamescch&lt;/a&gt; Are you planning to work on this issue?&lt;/p&gt;</comment>
                            <comment id="60631" author="jamescch" created="Tue, 9 Jan 2018 06:09:24 +0000"  >&lt;p&gt;I&apos;m afraid I can&apos;t because of limited knowledge on openflowplugin.&lt;/p&gt;

&lt;p&gt;But I can assist in debugging.&lt;/p&gt;</comment>
                            <comment id="61317" author="kevixw@gmail.com" created="Wed, 28 Feb 2018 00:26:20 +0000"  >&lt;p&gt;I am able to reproduce this issue with just one switch disconnect and reconnect.  It doesn&apos;t happen all the time, but once it happen, the state cannot recover.  I will look into this issue.&lt;/p&gt;</comment>
                            <comment id="61910" author="jamescch" created="Fri, 23 Mar 2018 07:44:59 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=kevinxw&quot; class=&quot;user-hover&quot; rel=&quot;kevinxw&quot;&gt;kevinxw&lt;/a&gt; I have found the root cause. I&apos;m going to fix this.&lt;/p&gt;

&lt;p&gt;Do you mind assigning back to me?&lt;/p&gt;</comment>
                            <comment id="61925" author="kevixw@gmail.com" created="Fri, 23 Mar 2018 17:42:55 +0000"  >&lt;p&gt;Please go ahead. I am busy with other task recently and haven&apos;t really made much progress so far.&lt;/p&gt;</comment>
                            <comment id="61950" author="jamescch" created="Tue, 27 Mar 2018 09:56:46 +0000"  >&lt;p&gt;Change has been opened &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/70093/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="62064" author="greenpau" created="Thu, 5 Apr 2018 02:11:44 +0000"  >&lt;p&gt;Experiencing what appears to be the same issue with Nitrogen:&lt;/p&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
2018-04-04 22:03:14,179 | WARN  | ntLoopGroup-16-7 | ContextChainHolderImpl           | 305 - org.opendaylight.openflowplugin.impl - 0.5.1 | Device openflow:218639756982094 already connected. Closing previous connection
2018-04-04 22:03:16,412 | WARN  | ntLoopGroup-16-4 | ContextChainImpl                 | 305 - org.opendaylight.openflowplugin.impl - 0.5.1 | Not able to start clustering services &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; node openflow:231865136161864
2018-04-04 22:03:16,414 | WARN  | ofppool-11       | ContextChainHolderImpl           | 305 - org.opendaylight.openflowplugin.impl - 0.5.1 | Not able to set MASTER role on device openflow:231865136161864, reason: java.lang.RuntimeException: Failed to initialize device openflow:231865136161864 in 9s: java.util.concurrent.TimeoutException
2018-04-04 22:03:16,414 | WARN  | ofppool-11       | ContextChainHolderImpl           | 305 - org.opendaylight.openflowplugin.impl - 0.5.1 | This mastering is mandatory, destroying context chain and closing connection &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; device openflow:231865136161864.
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=jamescch&quot; class=&quot;user-hover&quot; rel=&quot;jamescch&quot;&gt;jamescch&lt;/a&gt;, what is the root cause of this issue?&lt;/p&gt;</comment>
                            <comment id="62321" author="jamescch" created="Tue, 10 Apr 2018 10:12:07 +0000"  >&lt;p&gt;The root cause is that when destoryContextChain in class ContextChainHolderImpl is called, class DeviceContextImpl will try to iterate all requestContexts it has created in a collection to close them.&lt;/p&gt;

&lt;p&gt;However, those requestContexts&#160;will remove themselves from the collection.&lt;/p&gt;

&lt;p&gt;And this caused the CurrentModificationException and the thread was aborted.&lt;/p&gt;

&lt;p&gt;The status in ContextChainImpl for this switch remained&#160;CLOSING and changed to ALREADY_CONNECTED later and blocked all incoming connections.&lt;/p&gt;

&lt;p&gt;And the reason why we didn&apos;t see the error in the karaf console is that thread is executed using ExecutorService.submit() which didn&apos;t expose the exception.&lt;/p&gt;

&lt;p&gt;I uploaded the stack trace so that you can see how it&#160;goes&#160;into this situation.&lt;/p&gt;</comment>
                            <comment id="63387" author="vishnoianil@gmail.com" created="Mon, 11 Jun 2018 15:59:39 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.opendaylight.org/secure/ViewProfile.jspa?name=jamescch&quot; class=&quot;user-hover&quot; rel=&quot;jamescch&quot;&gt;jamescch&lt;/a&gt; Can you please cherry-pick the changes to stable/oxygen and master branch as well. We have seen similar issue with those branches as well.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="30117">OPNFLWPLUG-1018</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="14345" name="karaf.log" size="808097" author="jamescch" created="Mon, 8 Jan 2018 07:14:05 +0000"/>
                            <attachment id="14600" name="stack trace.pdf" size="66257" author="jamescch" created="Tue, 10 Apr 2018 10:18:08 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i039bz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>