CLI Script hangs in EAP6.1.x

Solution Verified - Updated -

Issue

  • Script using CLI commands hangs in EAP6.1.x but works fine in EAP6.0. Following is the script :

#/bin/bash export JBOSS_HOME="/path/jboss-eap-6.1" export NAME="main.log" export SIZE="5m" export BACKUP_SIZE="10" export DC_HOST=127.0.0.1:9999 while getopts p:h:n:l: option do case "${option}" in p) LOG_PATH=${OPTARG};; h) HANDLER_NAME=${OPTARG};; n) PACKAGE_NAME=${OPTARG};; l) LEVEL=$OPTARG;; esac done $JBOSS_HOME/bin/jboss-cli.sh -c --controller=$DC_HOST <<EOF /subsystem=logging/size-rotating-file-handler=$HANDLER_NAME:add(file={"path"=>"$LOG_PATH/$NAME", "relative-to"=>"jboss.server.log.dir"}) /subsystem=logging/size-rotating-file-handler=$HANDLER_NAME:write-attribute(name="formatter", value="%d{ISO8601} %p %c &quot;%t&quot; %m%n") /subsystem=logging/size-rotating-file-handler=$HANDLER_NAME:write-attribute(name="rotate-size", value="$SIZE") /subsystem=logging/size-rotating-file-handler=$HANDLER_NAME:write-attribute(name="max-backup-index", value="$BACKUP_SIZE") /subsystem=logging/logger=$PACKAGE_NAME/:add(category=$PACKAGE_NAME,level=$LEVEL) /subsystem=logging/logger=$PACKAGE_NAME:assign-handler(name="$HANDLER_NAME") /subsystem=logging/root-logger=ROOT:root-logger-assign-handler(name="$HANDLER_NAME") :reload EOF

Environment

  • JBoss Enterprise Application Platform(EAP)
    • 6.1.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content