wenjie sun created KARAF-6422:
---------------------------------

             Summary: karaf client sometimes hang when executing command
                 Key: KARAF-6422
                 URL: https://issues.apache.org/jira/browse/KARAF-6422
             Project: Karaf
          Issue Type: Bug
          Components: karaf
    Affects Versions: 4.2.6
         Environment: redhat7.6

jdk1.8.0_221

newly installed latest karaf runtime version 4.2.6, no any changes to it.

just start it by bin/start
            Reporter: wenjie sun


when my script invoke below command after karaf started:

"/opt/apache/karaf/bin/client -u karaf -p karaf version 2>&1"

sometimes it will hang for ever.

 

workaround:

just recompile the karaf client main source code by removing below code:

org.apache.karaf.client.Main

line 194~211

//////////////////////

if (!config.isBatch()) {
 new Thread() {
 public void run() {
 while (true) {
 try {
 int a = System.in.read();
 if (a == -1) {
 channel.close(true);
 break;
 }
 Thread.sleep(1000);
 } catch (Exception e) {
 //ignore
 }
 }
 }
 }.start();
}

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to