Uploaded image for project: 'Crucible'
  1. Crucible
  2. CRUC-4834

Control port connection refused problems when using the command line tools

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 3.5.3
    • 2.4.1
    • None

    Description

      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.

      Attachments

        Activity

          People

            cmacneill Conor
            andrew.myers Andrew Myers [Atlassian]
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: