Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-3494

client should not fail if it can't read etc/org.apache.karaf.shell.cfg file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.1, 3.0.2, 3.0.3, 2.4.1
    • 2.4.2, 3.0.4, 4.0.0.M3
    • karaf
    • None

    Description

      The bin/client tries to read etc/org.apache.karaf.shell.cfg file to automatically get the SSH port number:

              Properties shellCfg = loadProps(new File(System.getProperty("karaf.etc"), "org.apache.karaf.shell.cfg"));
              String host = shellCfg.getProperty("sshHost", "localhost");
              int port = Integer.parseInt(shellCfg.getProperty("sshPort", "8101"));
      

      Unfortunately, if etc/org.apache.karaf.shell.cfg file is not present or not readable, the client fails to start. We should add a try/catch statement and fallback to the default 8101 port number.

      Attachments

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            jbonofre Jean-Baptiste Onofré
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: