Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-576

DefaultListeningIOReactor does not resumes listening to requests after stopped with linux OS

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.4.9
    • Fix Version/s: None
    • Component/s: HttpCore, HttpCore NIO
    • Labels:
      None

      Description

      We are using DefaultListeningIOReactor with nio http server 4.4.9, within our application we have a setting when the number a requests reaches a particular value, we call pause() method on DefaultListeningIOReactor object and when the request gets handled, software resumes listening to new request with the help of resume() method.

      However with Linux machine, this behavior does not seems to be working, and when we try to resume the listener, it throws BindException. At the same time if we check we do not have any process running in the same port.

       

      This application is working fine with Windows machine and also worked well with HTTPComponent 4.0.2 beta version.

       

      We are using this code to pause and resume :

       

      ListeningIOReactor serverHandle = (ListeningIOReactor)ServerHandles.get(portKey);
      if (serverHandle!=null)

      { serverHandle.pause(); }

       

      ListeningIOReactor serverHandle = (ListeningIOReactor)ServerHandles.get(portKey);
      if (serverHandle!=null)

      { serverHandle.resume(); }

       

      Here this ServerHandles is map whoch we populate ate the time of creating server like this :

       

      final ListeningIOReactor ioReactor = new DefaultListeningIOReactor(
      workerThread, params);
      ServerHandles.put(new Integer(connector.getPort()),ioReactor);

      try {
      ioReactor.listen(socketaddress);
      ioReactor.execute(ioEventDispatch);

       

      Can anyone please help for this.

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rachit90 RACHIT GUPTA
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: