Uploaded image for project: 'Apache RocketMQ'
  1. Apache RocketMQ
  2. ROCKETMQ-2

Broker tests fail with "Address already in use"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0-incubating
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux

      Description

      Execute mvn test in rocketmq-broker/ to reproduce.

        Issue Links

          Activity

          Hide
          roman_s Roman Shtykh added a comment -

          vongosling How can I assign myself? Can you please add me to the Jira contributor list?

          Show
          roman_s Roman Shtykh added a comment - vongosling How can I assign myself? Can you please add me to the Jira contributor list?
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user shroman opened a pull request:

          https://github.com/apache/incubator-rocketmq/pull/1

          Closing the channel. Fix for ROCKETMQ-2.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/shroman/incubator-rocketmq ROCKETMQ-2

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/incubator-rocketmq/pull/1.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #1


          commit 924e39c0311b7a0c5c10c818f486a7f5ffea0f30
          Author: shtykh_roman <rshtykh@yahoo.com>
          Date: 2016-12-21T10:23:04Z

          Closing the channel. Fix for ROCKETMQ-2.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user shroman opened a pull request: https://github.com/apache/incubator-rocketmq/pull/1 Closing the channel. Fix for ROCKETMQ-2 . You can merge this pull request into a Git repository by running: $ git pull https://github.com/shroman/incubator-rocketmq ROCKETMQ-2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/1.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1 commit 924e39c0311b7a0c5c10c818f486a7f5ffea0f30 Author: shtykh_roman <rshtykh@yahoo.com> Date: 2016-12-21T10:23:04Z Closing the channel. Fix for ROCKETMQ-2 .
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          @shroman Thanks for your PR, Could you paste some unit test for these question

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 @shroman Thanks for your PR, Could you paste some unit test for these question
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shroman commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          @vongosling Thanks for pointing to the checklist. Added the test and more

          Show
          githubbot ASF GitHub Bot added a comment - Github user shroman commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 @vongosling Thanks for pointing to the checklist. Added the test and more
          Hide
          roman_s Roman Shtykh added a comment -

          vongosling This fixes the problem that happens when you restart the broker controller by closing the channel (anyway, if there's no special reason it's good to close it). But you cannot write the test for it because AcceptSocketService#beginAccept() swallows the exception.

          The solution is to make AcceptSocketService#beginAccept() propagate the exception up, so we can catch it, and this will make writing the test possible. AcceptSocketService#beginAccept() can potentially throw many kinds of exceptions, let's not swallow them. I added the modifications and BrokerControllerTest#testRestart(). Please have a look.

          Actually, even without adding this test, enabling exception propagation fails all tests for the broker controller, which shows again that swallowing the exceptions were just hiding them

          Show
          roman_s Roman Shtykh added a comment - vongosling This fixes the problem that happens when you restart the broker controller by closing the channel (anyway, if there's no special reason it's good to close it). But you cannot write the test for it because AcceptSocketService#beginAccept() swallows the exception. The solution is to make AcceptSocketService#beginAccept() propagate the exception up, so we can catch it, and this will make writing the test possible. AcceptSocketService#beginAccept() can potentially throw many kinds of exceptions, let's not swallow them. I added the modifications and BrokerControllerTest#testRestart() . Please have a look. Actually, even without adding this test, enabling exception propagation fails all tests for the broker controller, which shows again that swallowing the exceptions were just hiding them
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          @shroman
          Thanks for your PR, Could you paste some unit test for these question . please see our contributing checklist, https://github.com/apache/incubator-rocketmq/blob/master/CONTRIBUTING.md

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 @shroman Thanks for your PR, Could you paste some unit test for these question . please see our contributing checklist, https://github.com/apache/incubator-rocketmq/blob/master/CONTRIBUTING.md
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shroman commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          @vongosling The unit test is included in the PR. I don't quite understand what else is needed...

          Show
          githubbot ASF GitHub Bot added a comment - Github user shroman commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 @vongosling The unit test is included in the PR. I don't quite understand what else is needed...
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          That's ok for me. please @lollipopjin @zhouxinyu review it.

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 That's ok for me. please @lollipopjin @zhouxinyu review it.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zhouxinyu commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          It seems ok, Thanks @shroman.

          Show
          githubbot ASF GitHub Bot added a comment - Github user zhouxinyu commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 It seems ok, Thanks @shroman.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shroman commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          @vongosling @zhouxinyu Cool!
          Btw, have you managed to get admin permissions for JIRA to add guys who send requests to JIRA contributor list? We are working on tickets but cannot assign ourselves and change the progress status

          Show
          githubbot ASF GitHub Bot added a comment - Github user shroman commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 @vongosling @zhouxinyu Cool! Btw, have you managed to get admin permissions for JIRA to add guys who send requests to JIRA contributor list? We are working on tickets but cannot assign ourselves and change the progress status
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          @lollipopjin your review opinion is ?

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 @lollipopjin your review opinion is ?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lollipopjin commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          Seems ok for me.

          Show
          githubbot ASF GitHub Bot added a comment - Github user lollipopjin commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 Seems ok for me.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user asfgit closed the pull request at:

          https://github.com/apache/incubator-rocketmq/pull/1

          Show
          githubbot ASF GitHub Bot added a comment - Github user asfgit closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/1
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/1

          @shroman I will try to grant right permission for your

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on the issue: https://github.com/apache/incubator-rocketmq/pull/1 @shroman I will try to grant right permission for your
          Hide
          roman_s Roman Shtykh added a comment -

          @vongosling thanks a lot!

          Show
          roman_s Roman Shtykh added a comment - @vongosling thanks a lot!
          Hide
          vongosling vongosling added a comment -

          This PR has been merged by vongosling

          Show
          vongosling vongosling added a comment - This PR has been merged by vongosling
          Hide
          roman_s Roman Shtykh added a comment -

          Guys, I reopen the issue, because the selector was not closed. This works on Linux machines, but not on Windows.

          Show
          roman_s Roman Shtykh added a comment - Guys, I reopen the issue, because the selector was not closed. This works on Linux machines, but not on Windows.
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user shroman opened a pull request:

          https://github.com/apache/incubator-rocketmq/pull/10

          ROCKETMQ-2 Broker tests fail with "Address already in use"

          Jira issue: https://issues.apache.org/jira/browse/ROCKETMQ-2

          Closed the selector.

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/shroman/incubator-rocketmq ROCKETMQ-2-1

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/incubator-rocketmq/pull/10.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #10


          commit 16182fceba9c8431cc135dc82b9b4b7f45a62050
          Author: shroman <rshtykh@yahoo.com>
          Date: 2016-12-25T09:38:12Z

          Jira issue: https://issues.apache.org/jira/browse/ROCKETMQ-2

          Closed the selector.


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user shroman opened a pull request: https://github.com/apache/incubator-rocketmq/pull/10 ROCKETMQ-2 Broker tests fail with "Address already in use" Jira issue: https://issues.apache.org/jira/browse/ROCKETMQ-2 Closed the selector. You can merge this pull request into a Git repository by running: $ git pull https://github.com/shroman/incubator-rocketmq ROCKETMQ-2 -1 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/10.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #10 commit 16182fceba9c8431cc135dc82b9b4b7f45a62050 Author: shroman <rshtykh@yahoo.com> Date: 2016-12-25T09:38:12Z Jira issue: https://issues.apache.org/jira/browse/ROCKETMQ-2 Closed the selector.
          Hide
          roman_s Roman Shtykh added a comment -

          vongosling Can you please review the fix?

          Show
          roman_s Roman Shtykh added a comment - vongosling Can you please review the fix?
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user WillemJiang commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/10

          It looks good. I just merged it into the master branch.

          Show
          githubbot ASF GitHub Bot added a comment - Github user WillemJiang commented on the issue: https://github.com/apache/incubator-rocketmq/pull/10 It looks good. I just merged it into the master branch.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shroman commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/10

          Thanks, Willem!

          Show
          githubbot ASF GitHub Bot added a comment - Github user shroman commented on the issue: https://github.com/apache/incubator-rocketmq/pull/10 Thanks, Willem!
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shroman closed the pull request at:

          https://github.com/apache/incubator-rocketmq/pull/10

          Show
          githubbot ASF GitHub Bot added a comment - Github user shroman closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/10

            People

            • Assignee:
              roman_s Roman Shtykh
              Reporter:
              roman_s Roman Shtykh
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development