Bug 1149526 - jboss-cli-client does not print output correctly
Summary: jboss-cli-client does not print output correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: CLI
Version: 6.3.1
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: DR13
: EAP 6.4.0
Assignee: James Perkins
QA Contact: Petr Kremensky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-05 20:16 UTC by Bryan Parry
Modified: 2019-08-19 12:42 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFCORE-267 0 Major Resolved CLI prints output twice if using cli client jar 2017-05-03 14:32:16 UTC

Description Bryan Parry 2014-10-05 20:16:44 UTC
Description of problem:
When using the jboss-cli-client.jar found in $EAP_HOME/bin/client, the output printed by the tool is duplicated. Output from log statements is printed as well as the expected output. Also, specifying the system property logging.configuration has no effect on the results.

Version-Release number of selected component (if applicable):
6.3.1

How reproducible:
Always

Steps to Reproduce:
1. cd $EAP_HOME/bin/client
2. java -jar jboss-cli-client.jar --help

Actual results:
WARN: can't find jboss-cli.xml. Using default configuration values.
Oct 05, 2014 3:11:05 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO: Usage:
Usage:
Oct 05, 2014 3:11:05 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO: 

Oct 05, 2014 3:11:05 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO:   jboss-cli.sh/jboss-cli.bat [--help] [--version] [--controller=host:port]
  jboss-cli.sh/jboss-cli.bat [--help] [--version] [--controller=host:port]
Oct 05, 2014 3:11:05 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO:                      [--connect] [--file=file_path]
                     [--connect] [--file=file_path]
...
[additional output omitted]

Expected results:
Usage:

  jboss-cli.sh/jboss-cli.bat [--help] [--version] [--controller=host:port]
                     [--connect] [--file=file_path]
...
[additional output omitted]

Additional info:
The same results occur when specifying the logging.configuration property:
$ java -Dlogging.configuration=file:/opt/jboss-eap-6.3/bin/jboss-cli-logging.properties -jar jboss-cli-client.jar --help

Comment 1 Petr Kremensky 2014-10-06 05:36:13 UTC
Hi Bryan, 
what OS/JMV did you use? I am unable to reproduce locally (the output is printed only once), tried both 6.3.1 and 6.4.0.DR3 cli clients.

Comment 2 Bryan Parry 2014-10-07 22:52:41 UTC
Hi Petr,

I am able to reproduce the issue on both RHEL and Windows XP using Java 7. Here is the version information for the three systems I have seen this issue:

First:
  OS: RHEL 6.5
  Java: 1.7.0_65
  EAP: 6.3.0.GA

Second:
  OS: Windows XP Professional SP3
  Java: 1.7.0_17
  EAP: 6.3.0.GA

Third
  OS: RHEL 6.5 CSB
  Java: 1.7.0_55
  EAP: 6.3.1.GA

Comment 3 Bryan Parry 2014-10-07 23:00:50 UTC
I just tried a quick test on my RHEL 6.5 CSB with Java 6 and I was able to reproduce as well.

$ export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64
$ export PATH=$JAVA_HOME/bin:$PATH
$ java -version
java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.3) (rhel-5.1.13.3.el6_5-x86_64)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
$ java -jar jboss-cli-client.jar --help
WARN: can't find jboss-cli.xml. Using default configuration values.
Oct 7, 2014 5:58:22 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO: Usage:
Usage:
Oct 7, 2014 5:58:22 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO: 

Oct 7, 2014 5:58:22 PM org.jboss.as.cli.impl.CommandContextImpl printLine
INFO:   jboss-cli.sh/jboss-cli.bat [--help] [--version] [--controller=host:port]
...

OS: RHEL 6.5 CSB
Java: 1.6.0_30
EAP: 6.3.1.GA

Comment 4 Petr Kremensky 2014-10-08 07:10:13 UTC
Sorry Bryan, I can see it now (I redirected the output to the file before so I didn't see the output from logger).

Comment 5 Alexey Loubyansky 2014-10-10 11:42:28 UTC
When the CLI is launched this way, the logging config property name would be the standard java util one, i.e.

java -Djava.util.logging.config.file=file:"$JBOSS_HOME"/bin/jboss-cli-logging.properties -jar jboss-cli-client.jar --help

Comment 6 Bryan Parry 2014-10-10 22:33:26 UTC
(In reply to Alexey Loubyansky from comment #5)
> When the CLI is launched this way, the logging config property name would be
> the standard java util one, i.e.
> 
> java
> -Djava.util.logging.config.file=file:"$JBOSS_HOME"/bin/jboss-cli-logging.
> properties -jar jboss-cli-client.jar --help

Thanks Alexey this will be helpful.

Comment 8 Petr Kremensky 2014-12-10 12:14:16 UTC
Verified on EAP 6.4.0.DR13

java -jar jboss-cli-client.jar --help
 // no logs from client

java -jar -Djboss.cli.log.file=/home/pkremens/cli.log jboss-cli-client.jar --help -Djboss.cli.log.level=INFO
 // logs to file


Note You need to log in before you can comment on or make changes to this bug.