Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-6842

On connection error, dsconfig should guide users towards using admin port or ldaps port

    Details

    • Type: Improvement
    • Status: Done
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0.0
    • Fix Version/s: 7.0.0
    • Component/s: config, tech-debt
    • Labels:
      None

      Description

      Problem: I was using dsconfig by copying the argument from ldapsearch (on the LDAP port) that I had used just before.

       

      The error message that I got back was too succinct to help me understand the problem:

      $ dsconfig -D "uid=admin" -w password -h localhost -p 1391
      Unable to connect to the server at "jnrouvignac-Precision-5510" on port 1391
      

      By debugging the code I found that dsconfig being an administrative tool it always connects using SSL.

       

      Outputting the error message improves a bit the output:

      $ dsconfig -D "uid=admin" -w password -h localhost -p 1391
      Unable to connect to the server at "jnrouvignac-Precision-5510" on port 1391:
      Connect Error: The LDAP connection has failed because an error occurred during
      the SSL handshake: java.io.EOFException
      

      Now I have a better idea that it is trying to connect using SSL.

       

      We can also go a little further and warn users that we should try to connect on an admin or ldaps port:

      $ dsconfig -D "uid=admin" -w password -h localhost -p 1391
      Unable to connect to the server at "jnrouvignac-Precision-5510" on port 1391:
      Connect Error: The LDAP connection has failed because an error occurred during
      the SSL handshake: java.io.EOFException. Check that the port number corresponds
      to the Administration Port of the server.
      

      Note: interactive mode also has the same problem, and since it is using a separate code path, it needs a dedicated fix too.

        Attachments

          Activity

            People

            • Assignee:
              ondrej.fuchsik Ondrej Fuchsik
              Reporter:
              JnRouvignac Jean-Noël Rouvignac
              Dev Assignee:
              Jean-Noël Rouvignac
              QA Assignee:
              Ondrej Fuchsik
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: