Highlighted

Problem running 6.2 upgrade in RedHat Linux

lebom50735824

05-08-2016

I am getting the problem below when running a RedHat AEM service :

Loading quickstart properties: default
Loading quickstart properties: instance
org.apache.commons.cli2.OptionException: Unexpected start while processing Use these options on the Quickstart command line.
        at org.apache.commons.cli2.commandline.Parser.parse(Parser.java:99)
        at com.adobe.granite.quickstart.base.impl.Main.<init>(Main.java:582)
        at com.adobe.granite.quickstart.base.impl.Main.main(Main.java:940)
Quickstart: aborting

When I run "java -jar quickstart.jar", I get : 

Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 3543 MB, meets our expectation of 1024 MB +/- 20
**** WARNING: insufficent PermGen memory ***************************************
The JVM MBean:PS Perm Gen reports 166 MB but we recommend at least 256 MB +/- 20
Use your JVM's PermGen size option (like -XX:MaxPermSize=256M) to set that size.
Will fork a JVM to get enough memory.
********************************************************************************
Available memory below specified limits and low-memory action set to fork, will fork to get enough memory
Preparing to fork JVM, OS name=Linux, isWindows=false
Forking JVM: [/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.65.x86_64/jre/bin/java, -Xmx1024m, -XX:MaxPermSize=256m, -jar, /opt/aem/author/crx-quickstart/app/cq-quickstart-6.2.0-standalone.jar, -nofork, -pt, CHILD]
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork arguments=[-Xmx1024m, -XX:MaxPermSize=256m]
**** WARNING: insufficent heap memory ******************************************
The JVM reports 910 MB but we recommend at least 1024 MB +/- 20
Use your JVM's heap size option (like -Xmx1024M) to set that size.
Will fork a JVM to get enough memory.
********************************************************************************
The JVM MBean:PS Perm Gen reports a maximum size of 256 MB, meets our expectation of 256 MB +/- 20
Available memory below specified limits and low-memory action set to fork, will fork to get enough memory
Not forking JVM as -nofork option is set
Setting properties from filename '/opt/aem/author/crx-quickstart/app/cq-quickstart-6.2.0-standalone.jar'
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to /opt/aem/author/crx-quickstart/app/crx-quickstart/logs/stdout.log
Redirecting stderr to /opt/aem/author/crx-quickstart/app/crx-quickstart/logs/stderr.log
Press CTRL-C to shutdown the Quickstart server...

 

Any idea on what the problem is about?

Replies

Highlighted

Opkar_Gill

Employee

05-08-2016

Hi,

you are trying to run AEM and it works from the command line but not the init script? This is after it has been upgraded, confused about upgrade in your subject.

How did you set up your service? This [0] is an example of how to set it up.

Regards,

Opkar

Highlighted

kautuk_sahni

Community Manager

07-08-2016

Hi 

Your problem seems similar to this one:-

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

// here the problem was, User copied and pasted the command from a document and it pasted the wrong type of dash.  It looked similar to the real dash but it was actually a different ascii code than what was needed.  Therefore just type the command manually if you want to be sure it's accurate.

 

Reference link :- http://stackoverflow.com/questions/9374991/how-to-convert-files-from-dos-to-unix-in-java

// This talks about How to convert files from dos to unix.

 

I hope this might help you.

Thanks and Regards

Kautuk Sahni

 

 

 

 
Highlighted

lebom50735824

08-08-2016

The command I run to start the service doesn't have the character problem as you see below.

Below is how our service is set up:

The command to start the service:
sudo /etc/init.d/aem6 start

The contents of the start script in /etc/init.d are:
#!/bin/bash
. /etc/rc.d/init.d/functions
SCRIPT_NAME=`basename $0`
AEM_ROOT=/opt/aem/author
AEM_USER=aem
########
BIN=${AEM_ROOT}/crx-quickstart/bin
START=${BIN}/start
STOP=${BIN}/stop
STATUS="${BIN}/status"
case "$1" in
start)
echo -n "Starting AEM services: "
su - ${AEM_USER} ${START}
touch /var/lock/subsys/$SCRIPT_NAME
;;
stop)
echo -n "Shutting down AEM services: "
su - ${AEM_USER} ${STOP}
rm -f /var/lock/subsys/$SCRIPT_NAME
;;
status)
su - ${AEM_USER} ${STATUS}
;;
restart)
su - ${AEM_USER} ${STOP}
su - ${AEM_USER} ${START}
;;
reload)
;;
*)
echo "Usage: $SCRIPT_NAME {start|stop|status|reload}"
exit 1
;;
esac


/opt/aem/author/crx-quickstart/bin/start

The contents of the start script in /opt/aem/author/crx-quickstart/bin are:
#!/bin/bash

# TCP port used for stop and status scripts
if [ -z "$CQ_PORT" ]; then
        CQ_PORT=4502
fi

# hostname of the interface that this server should listen to
#if [ -z "$CQ_HOST" ]; then
#       CQ_HOST=
#fi

# runmode(s)
if [ -z "$CQ_RUNMODE" ]; then
        CQ_RUNMODE='author,crx3,crx3tar,nosamplecontent'
fi

# name of the jarfile
#if [ -z "$CQ_JARFILE" ]; then
#       CQ_JARFILE=''
#fi

# use jaas.config
#if [ -z "$CQ_USE_JAAS" ]; then
#       CQ_USE_JAAS='true'
#fi

# config for jaas
if [ -z "$CQ_JAAS_CONFIG" ]; then
        CQ_JAAS_CONFIG='etc/jaas.config'
fi

# default JVM options
if [ -z "$CQ_JVM_OPTS" ]; then
        CQ_JVM_OPTS='-server -Xmx4096m -XX:MaxPermSize=1024M -Djava.awt.headless=true -javaagent:/opt/aem/author/notsoserial-1.0.8-adobe-2b851bf.jar'
fi

# file size limit (ulimit)
if [ -z "$CQ_FILE_SIZE_LIMIT" ]; then
        CQ_FILE_SIZE_LIMIT=8192
fi

# ------------------------------------------------------------------------------
# do not configure below this point
# ------------------------------------------------------------------------------

if [ $CQ_FILE_SIZE_LIMIT ]; then
        CURRENT_ULIMIT=`ulimit`
        if [ $CURRENT_ULIMIT != "unlimited" ]; then
                if [ $CURRENT_ULIMIT -lt $CQ_FILE_SIZE_LIMIT ]; then
                        echo "ulimit ${CURRENT_ULIMIT} is too small (must be at least ${CQ_FILE_SIZE_LIMIT})"
                        exit 1
                fi
        fi
fi

BIN_PATH=$(dirname $0)
cd $BIN_PATH/..
if [ -z $CQ_JARFILE ]; then
        CQ_JARFILE=`ls app/*.jar | head -1`
fi
CURR_DIR=$(basename $(pwd))
cd ..
START_OPTS="start -c ${CURR_DIR} -i launchpad"
if [ $CQ_PORT ]; then
        START_OPTS="${START_OPTS} -p ${CQ_PORT}"
fi
if [ $CQ_RUNMODE ]; then
        CQ_JVM_OPTS="${CQ_JVM_OPTS} -Dsling.run.modes=${CQ_RUNMODE}"
fi
if [ $CQ_HOST ]; then
        CQ_JVM_OPTS="${CQ_JVM_OPTS} -Dorg.apache.felix.http.host=${CQ_HOST}"
    START_OPTS="${START_OPTS} -a ${CQ_HOST}"
fi
if [ $CQ_USE_JAAS ]; then
    CQ_JVM_OPTS="${CQ_JVM_OPTS} -Djava.security.auth.login.config=${CQ_JAAS_CONFIG}"
fi
START_OPTS="${START_OPTS} -Dsling.properties=conf/sling.properties"

(
  (
    java $CQ_JVM_OPTS -jar $CURR_DIR/$CQ_JARFILE $START_OPTS &
    echo $! > $CURR_DIR/conf/cq.pid
  ) >> $CURR_DIR/logs/stdout.log 2>&1
) &

:q

The AEM quickstart file
/opt/aem/author/crx-quickstart/app/cq-quickstart-6.2.0-standalone.jar

Highlighted

Opkar_Gill

Employee

08-08-2016

Does it work if you remove the "javaagent" parameter?

-javaagent:/opt/aem/author/notsoserial-1.0.8-adobe-2b851bf.jar

Highlighted

lebom50735824

08-08-2016

If I remove the Java agent, I still get the same error (Loading quickstart properties: default
Loading quickstart properties: instance
org.apache.commons.cli2.OptionException: Unexpected start while processing Use these options on the Quickstart command line.
        at org.apache.commons.cli2.commandline.Parser.parse(Parser.java:99)
        at com.adobe.granite.quickstart.base.impl.Main.<init>(Main.java:582)
        at com.adobe.granite.quickstart.base.impl.Main.main(Main.java:940)
Quickstart: aborting). 

What is strange though is that I have another quickstart jar file for AEM 6.0 in /opt/aem/author/crx-quickstart/app/ as per the previous script code I sent and this one works just fine without this error. All I did was to rename the AEM 6.2 jar file and put it there.   

Highlighted

Anselm_H_

06-08-2018

It's an old thread but maybe someone appreciate this hint:

Don't use: java -jar "aem-quickstart-6.3.0.jar" start

Just use it without 'start': java -jar "aem-quickstart-6.3.0.jar"

'start' is valid for crx-quickstart/app/cq-quickstart-6.1.0-standalone-quickstart.jar

Highlighted

sachinarora

23-05-2020

Its happening because of 2 arguments i.e. "start" and "-i launchpad". If we refer the Adobe Document of 6.5 In-Place Upgrade and compare difference of commands mentioned in point 2 & 3 of "Determining the correct upgrade start command", we can get actual difference. LINK
difference-commands.JPG