<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:15:16 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>[NETCONF-533] channelActive may happen later than handleMessage when connect devices. This will result a java.lang.IllegalStateException and failed the connection. </title>
                <link>https://jira.opendaylight.org/browse/NETCONF-533</link>
                <project id="10142" key="NETCONF">netconf</project>
                    <description>&lt;p&gt;This was not a inevitable phenomenon, it occured when i tried to connect 500 devices.&lt;/p&gt;

&lt;p&gt;I believe that&#160; when there are many devices to connect, channelActive may happen later than handleMessage because device will not wait for your hello message. When you handle the message, you need to get session for hello message ,then change state to ESTABLISHED , but the state is IDLE now (Only channelActive can invoke startNegotiation method and change state to OPEN_WAIT.), change will result a IllegalStateException.&lt;/p&gt;

&lt;p&gt;&#160; And this happens again and again even if reconnect strategy invoke reconnect. At last, the device will not connect success.&lt;/p&gt;

&lt;p&gt;Test case show the stack.(&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/69738/4/netconf/netconf-client/src/test/java/org/opendaylight/netconf/client/NetconfClientSessionNegotiatorTest.java&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/69738/4/netconf/netconf-client/src/test/java/org/opendaylight/netconf/client/NetconfClientSessionNegotiatorTest.java&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#FF0000&quot;&gt;java.lang.IllegalStateException: Cannot change state from IDLE to ESTABLISHED for chanel&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&#160;&#160; &#160;&lt;font color=&quot;#ff0000&quot;&gt;at com.google.common.base.Preconditions.checkState(Preconditions.java:836)&lt;/font&gt;&lt;br/&gt;
 &lt;font color=&quot;#ff0000&quot;&gt;&#160;&#160; &#160;at org.opendaylight.netconf.nettyutil.AbstractNetconfSessionNegotiator.changeState(AbstractNetconfSessionNegotiator.java:236)&lt;/font&gt;&lt;br/&gt;
 &lt;font color=&quot;#ff0000&quot;&gt;&#160;&#160; &#160;at org.opendaylight.netconf.nettyutil.AbstractNetconfSessionNegotiator.getSessionForHelloMessage(AbstractNetconfSessionNegotiator.java:173)&lt;/font&gt;&lt;br/&gt;
 &lt;font color=&quot;#ff0000&quot;&gt;&#160;&#160; &#160;at org.opendaylight.netconf.client.NetconfClientSessionNegotiator.handleMessage(NetconfClientSessionNegotiator.java:68)&lt;/font&gt;&lt;br/&gt;
 &lt;font color=&quot;#ff0000&quot;&gt;&#160;&#160; &#160;at&lt;/font&gt; org.opendaylight.netconf.client.NetconfClientSessionNegotiatorTest.testNegotiatorWhenChannelActiveHappenAfterHandleMessage(NetconfClientSessionNegotiatorTest.java:180)&lt;br/&gt;
 &#160;&#160; &#160;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;br/&gt;
 &#160;&#160; &#160;at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)&lt;br/&gt;
 &#160;&#160; &#160;at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)&lt;br/&gt;
 &#160;&#160; &#160;at java.lang.reflect.Method.invoke(Method.java:498)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runners.ParentRunner.run(ParentRunner.java:309)&lt;br/&gt;
 &#160;&#160; &#160;at org.junit.runner.JUnitCore.run(JUnitCore.java:160)&lt;br/&gt;
 &#160;&#160; &#160;at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)&lt;br/&gt;
 &#160;&#160; &#160;at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)&lt;br/&gt;
 &#160;&#160; &#160;at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)&lt;br/&gt;
 &#160;&#160; &#160;at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)&lt;/p&gt;</description>
                <environment>&lt;p&gt;connect enough device, or use test case&lt;/p&gt;</environment>
        <key id="29547">NETCONF-533</key>
            <summary>channelActive may happen later than handleMessage when connect devices. This will result a java.lang.IllegalStateException and failed the connection. </summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.opendaylight.org/images/icons/priorities/major.svg">Medium</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="-1">Unassigned</assignee>
                                    <reporter username="jiang.wei">Wei Jiang</reporter>
                        <labels>
                    </labels>
                <created>Thu, 29 Mar 2018 06:04:20 +0000</created>
                <updated>Mon, 6 Aug 2018 14:42:28 +0000</updated>
                            <resolved>Mon, 6 Aug 2018 14:42:28 +0000</resolved>
                                                    <fixVersion>Fluorine</fixVersion>
                                    <component>netconf</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="61980" author="jiang.wei" created="Thu, 29 Mar 2018 06:23:33 +0000"  >&lt;p&gt;i have give a soution on &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/69738/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/69738/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;when you get a message from device, you can check whether channelActive invoke already to ensure the state have been changed to OPEN_WAIT and it is legal to change state to ENSTABLISHED&lt;/p&gt;</comment>
                            <comment id="64564" author="jmorvay" created="Mon, 6 Aug 2018 14:42:28 +0000"  >&lt;p&gt;fix:&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/72446/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/72446/&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </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|i03cfr:</customfieldvalue>

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