[jira] [Commented] (KARAF-6422) karaf client sometimes hang when executing command

2019-09-24 Thread wenjie sun (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16937366#comment-16937366
 ] 

wenjie sun commented on KARAF-6422:
---

and in my environment, I have:

python script  invoke bash script, and then invoke karaf client with commands.

 

in the bash scripts, code like below:

su - $KARAF_USER_NAME -c "$KARAF_BIN_DIR/start"
result=`su - $KARAF_USER_NAME -c "$KARAF_BIN_DIR/client -u karaf -p karaf 
version 2>&1"`

sometimes it's hanging for ever here.

> 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
>Assignee: Freeman Fang
>Priority: Major
>
> 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)


[jira] [Commented] (KARAF-6422) karaf client sometimes hang when executing command

2019-09-24 Thread wenjie sun (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16937362#comment-16937362
 ] 

wenjie sun commented on KARAF-6422:
---

it's easy to reproduce it.

what kinds of logs do you need?

 

> 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
>Assignee: Freeman Fang
>Priority: Major
>
> 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)


[jira] [Commented] (KARAF-6422) karaf client sometimes hang when executing command

2019-09-20 Thread Freeman Fang (Jira)


[ 
https://issues.apache.org/jira/browse/KARAF-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16934690#comment-16934690
 ] 

Freeman Fang commented on KARAF-6422:
-

Hi [~wenjie_sun1979],

Is it easy for you to reproduce it? What's your env?

I've tried 100 times on my machine but can't reproduce this issue anyway.

Thanks
Freeman

> 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
>Assignee: Freeman Fang
>Priority: Major
>
> 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)


[jira] [Commented] (KARAF-6422) karaf client sometimes hang when executing command

2019-09-19 Thread Jira


[ 
https://issues.apache.org/jira/browse/KARAF-6422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16934078#comment-16934078
 ] 

Jean-Baptiste Onofré commented on KARAF-6422:
-

We also have another Jira about that. Let me link both together.

> 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
>Assignee: Freeman Fang
>Priority: Major
>
> 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)