karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Created] (KARAF-3494) client should not fail if it can't read etc/org.apache.karaf.shell.cfg file
Date Mon, 02 Feb 2015 17:46:34 GMT
Jean-Baptiste Onofré created KARAF-3494:
-------------------------------------------

             Summary: client should not fail if it can't read etc/org.apache.karaf.shell.cfg
file
                 Key: KARAF-3494
                 URL: https://issues.apache.org/jira/browse/KARAF-3494
             Project: Karaf
          Issue Type: Bug
          Components: karaf-shell
    Affects Versions: 2.4.1, 3.0.3, 3.0.2, 3.0.1
            Reporter: Jean-Baptiste Onofré
            Assignee: Jean-Baptiste Onofré
             Fix For: 4.0.0, 2.4.2, 3.0.4


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

{code}
        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"));
{code}

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message