Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-2042

FusekiServer::getPort() does not return actual port

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • Jena 3.17.0
    • Jena 4.0.0
    • Fuseki
    • None

    Description

      FusekiServer::getPort() does not return the actual port (but 0), if Fuseki was configured to select a random free port. E.g. FusekiServer.create().port(0).build().start().getPort() returns 0. I would expect and Java Doc states the method should return the selected port.

      In case of HTTP only, one can use ((ServerConnector) fuseki.getJettyServer().getConnectors()[0]).getLocalPort() instead. However, including HTTPS, things become more complicated, as the correct port of the correct connector needs to be selected first.

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              jmkeil Jan Martin Keil
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h