Control port connection refused problems when using the command line tools

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 3.5.3
    • Affects Version/s: 2.4.1
    • Component/s: None

      We initialise the control port as follows:

      mSvr = new ServerSocket(mBind.getPort(), 0, mBind.getInetAddress());

      That opens the server socket with a backlog of 0 which means requests will not be queued. A backlog of 0, causes the JVM to use the default backlog value of 50, which means requests are queued correctly.

      That means if for example you issue multiple rescan requests in quick succession you may end up getting connection refused errors:

      Problem connecting to 127.0.0.1:8059 : Connection reset
      java.net.SocketException: Connection reset
              at java.net.SocketInputStream.read(SocketInputStream.java:185)
              at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:282)
              at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:324)
              at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:176)
              at java.io.InputStreamReader.read(InputStreamReader.java:184)
              at java.io.BufferedReader.fill(BufferedReader.java:153)
      

      Perhaps we should increase the backlog.

            Assignee:
            Conor (Inactive)
            Reporter:
            Andrew Myers [Atlassian]
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: