Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12199

TestReplicationHandler.doTestRepeater(): TEST_PORT interpolation failure: Server refused connection at:



    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: None
    • Labels:


      From https://jenkins.thetaphi.de/job/Lucene-Solr-7.x-MacOSX/551/:

         [junit4]   2> 750759 INFO  (TEST-TestReplicationHandler.doTestRepeater-seed#[7078A21248E0962E]) [    ] o.a.s.h.TestReplicationHandler Waited for 0ms and found 3 docs
         [junit4]   2> 750760 INFO  (qtp351238853-8844) [    x:collection1] o.a.s.c.S.Request [collection1]  webapp=/solr path=/replication params={_trace=getDetails&qt=/replication&wt=javabin&version=2&command=details} status=0 QTime=1
         [junit4]   2> 750761 INFO  (qtp351238853-8846) [    x:collection1] o.a.s.c.S.Request [collection1]  webapp=/solr path=/replication params={_trace=getDetails&qt=/replication&wt=javabin&version=2&command=details} status=0 QTime=0
         [junit4]   2> 750769 WARN  (qtp738580099-8901) [    x:collection1] o.a.s.h.ReplicationHandler Exception while invoking 'details' method for replication on master 
         [junit4]   2> org.apache.solr.client.solrj.SolrServerException: Server refused connection at:
         [junit4]   2> 	at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:650) ~[java/:?]
         [junit4]   2> 	at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:255) ~[java/:?]
         [junit4]   2> 	at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:244) ~[java/:?]
         [junit4]   2> 	at org.apache.solr.client.solrj.SolrClient.request(SolrClient.java:1219) ~[java/:?]
         [junit4]   2> 	at org.apache.solr.handler.IndexFetcher.getDetails(IndexFetcher.java:1852) ~[java/:?]

      I looked at TestReplicationHandler Jenkins failure logs from the last couple days, and every single one has the same pattern: a WARN message from doTestRepeater() about failure to connect with a URL containing port TEST_PORT (rather than a numeric value).

      On the dev list Dawid Weiss wrote:

      I see this in TestReplicationHandler:

        * character copy of file using UTF-8. If port is non-null, will be
      substituted any time "TEST_PORT" is found.
       private static void copyFile(File src, File dst, Integer port,
      boolean internalCompression) throws IOException {
         BufferedReader in = new BufferedReader(new InputStreamReader(new
      FileInputStream(src), StandardCharsets.UTF_8));
         Writer out = new OutputStreamWriter(new FileOutputStream(dst),
         for (String line = in.readLine(); null != line; line = in.readLine()) {
           if (null != port)
             line = line.replace("TEST_PORT", port.toString());

      So it seems port is allowed to be null and then won't be substituted.
      This looks like a bug in the test scaffolding: this situation
      shouldn't be allowed; if a port cannot be acquired the test should
      fail much sooner?


        1. SOLR-12199.patch
          2 kB
          Steve Rowe



            • Assignee:
              steve_rowe Steve Rowe
              steve_rowe Steve Rowe
            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created: