Answer
New Contributor
Posts: 8
Registered: ‎09-02-2016
Accepted Solution
cannot start cloudera-scm-agent after upgrade to cm6

HI,

 

Try to follow this document for upgrading from cdh5.13

https://www.cloudera.com/documentation/enterprise/6/latest/topics/cm_upgrade_c6.html#concept_pyn_qdf...

 

in step 14

run command 'service cloudera-scm-agent start' but failed

and the log said Error: no such option: --hostname

 

What does that mean?

 

Thanks.

 

View Entire Topic
Cloudera Employee
Posts: 10
Registered: ‎04-21-2016
Answered

 

Looking at 

https://www.cloudera.com/documentation/enterprise/6/latest/topics/cm_upgrade_c6.html#concept_pyn_qdf...

 

Step 14 says:

 

If you previously stopped the Cloudera Manager Agent, start the agent:

sudo systemctl start cloudera-scm-agent

 

Please do not use the "service" command unless you're on RHEL6.

 

by teng on ‎05-31-2018 05:46 PM
Hi I'm using on RHEL6
by Cloudera Employee mostrows on ‎05-31-2018 06:58 PM
Please clarify what log you were referring to, ideally posting a substantial enough portion of it to provide context.
by teng on ‎05-31-2018 07:34 PM
I look into /var/log/cloudera-scm-agent/cloudera-scm-agent.out

each attempt to start cloudera-scm-agent it just print only one line
Error: no such option: --hostname
by Cloudera Employee mostrows on ‎05-31-2018 07:56 PM
Please try the following:

bash -x /etc/init.d/cloudera-scm-agent start 2>&1 |tee /tmp/out.txt

I’d like to see the content out that out.txt file.

If you’ve made any changes to “/etc/default/cloudera-scm-agent”, I’d like to see that too.
by teng on ‎05-31-2018 08:13 PM
this is in out.txt file
++ basename /etc/init.d/cloudera-scm-agent
+ LOCKFILE=/tmp/cloudera-scm-agent.lock
+ LOCKFD=99
+ '[' -f /etc/rc.d/init.d/functions ']'
+ . /etc/rc.d/init.d/functions
++ TEXTDOMAIN=initscripts
++ umask 022
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ export PATH
++ '[' -z '' ']'
++ COLUMNS=80
++ '[' -z '' ']'
+++ /sbin/consoletype
++ CONSOLETYPE=pty
++ '[' -f /etc/sysconfig/i18n -a -z '' -a -z '' ']'
++ . /etc/profile.d/lang.sh
++ unset LANGSH_SOURCED
++ '[' -z '' ']'
++ '[' -f /etc/sysconfig/init ']'
++ . /etc/sysconfig/init
+++ BOOTUP=color
+++ RES_COL=60
+++ MOVE_TO_COL='echo -en \033[60G'
+++ SETCOLOR_SUCCESS='echo -en \033[0;32m'
+++ SETCOLOR_FAILURE='echo -en \033[0;31m'
+++ SETCOLOR_WARNING='echo -en \033[0;33m'
+++ SETCOLOR_NORMAL='echo -en \033[0;39m'
+++ PROMPT=yes
+++ AUTOSWAP=no
+++ ACTIVE_CONSOLES='/dev/tty[1-6]'
+++ SINGLE=/sbin/sushell
++ '[' pty = serial ']'
++ __sed_discard_ignored_files='/\(~\|\.bak\|\.orig\|\.rpmnew\|\.rpmorig\|\.rpmsave\)$/d'
+++ cat /proc/cmdline
++ strstr 'ro root=/dev/mapper/vg_quickstart-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=129M@0M rd_LVM_LV=vg_quickstart/lv_swap rd_LVM_LV=vg_quickstart/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet' rc.debug
++ '[' 'ro root=/dev/mapper/vg_quickstart-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=129M@0M rd_LVM_LV=vg_quickstart/lv_swap rd_LVM_LV=vg_quickstart/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet' = 'ro root=/dev/mapper/vg_quickstart-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=129M@0M rd_LVM_LV=vg_quickstart/lv_swap rd_LVM_LV=vg_quickstart/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet' ']'
++ return 1
+ prepare_locking
+ eval 'exec 99>"/tmp/cloudera-scm-agent.lock"'
++ exec
+ trap no_more_locking EXIT
+ exlock_now
+ lock xn
+ flock -xn 99
+ prog=cloudera-scm-agent
+ pidname=cm-agent
+ start_timeout=10
+ kill_timeout=40
+++ dirname /etc/init.d/cloudera-scm-agent
++ readlink -e /etc/init.d/../default
+ CMF_DEFAULTS=
+ CMF_DEFAULTS=/etc/default
+ '[' -e /etc/default/cloudera-scm-agent ']'
+ . /etc/default/cloudera-scm-agent
++ CMF_AGENT_ARGS='--hostname=quickstart.cloudera --host_id=quickstart.cloudera'
+ : /opt/cloudera
+ : /opt/cloudera/cm-agent/bin/
+ AGENT_SCRIPT=/opt/cloudera/cm-agent/bin/cm
+ CONFIG_INI_PATH=/etc/cloudera-scm-agent/config.ini
+ '[' -e /etc/cloudera-scm-agent/config.ini ']'
++ grep '^[[:blank:]]*log_file=' /etc/cloudera-scm-agent/config.ini
++ cut -d = -f 2
+ LOG_FILE_PATH=
+ '[' '!' -z ']'
+ AGENT_OUT=/var/log/cloudera-scm-agent/cloudera-scm-agent.out
+ CMF_SUDO_CMD='su root -s'
+ CMF_DIR_OWNER=root
++ which python
+ binary=/usr/bin/python
+ '[' '!' -f /opt/cloudera/cm-agent/bin/cm ']'
+ pidfile=/var/run/cloudera-scm-agent/cloudera-scm-agent.pid
+ clean_start_file=/var/run/cloudera-scm-agent/next_start_clean
+ hard_stop_file=/var/run/cloudera-scm-agent/next_stop_hard
++ '[' -e /etc/SuSE-release ']'
++ echo 0
+ is_suse=0
++ pstree -p
++ head -1
++ grep 'systemd(1)' -q
++ echo 0
+ is_systemd=0
+ RETVAL=0
+ case "$1" in
+ '[' -e /var/run/cloudera-scm-agent/next_start_clean ']'
+ start
+ local_checkpid /usr/bin/python /var/run/cloudera-scm-agent/cloudera-scm-agent.pid
+ local local_binary=/usr/bin/python
+ local local_pidfile=/var/run/cloudera-scm-agent/cloudera-scm-agent.pid
+ '[' '!' -f /var/run/cloudera-scm-agent/cloudera-scm-agent.pid ']'
+ return 1
+ '[' 1 = 0 ']'
+ install -d -o root -g root /var/run/cloudera-scm-agent
+ echo -n 'Starting cloudera-scm-agent: '
Starting cloudera-scm-agent: + su root -s /bin/bash -c '/opt/cloudera/cm-agent/bin/cm agent --legacy-supervisor --daemon --comm_name cm-agent --pidfile /var/run/cloudera-scm-agent/cloudera-scm-agent.pid --hostname=quickstart.cloudera --host_id=quickstart.cloudera >> /var/log/cloudera-scm-agent/cloudera-scm-agent.out 2>&1 </dev/null'
+ local_check_start
+ '[' 0 -eq 1 ']'
+ local_checkpid /usr/bin/python /var/run/cloudera-scm-agent/cloudera-scm-agent.pid
+ local local_binary=/usr/bin/python
+ local local_pidfile=/var/run/cloudera-scm-agent/cloudera-scm-agent.pid
+ '[' '!' -f /var/run/cloudera-scm-agent/cloudera-scm-agent.pid ']'
+ return 1
+ echo_failure
+ '[' color = color ']'
+ echo -en '\033[60G'
+ echo -n '['
[+ '[' color = color ']'
+ echo -en '\033[0;31m'
+ echo -n FAILED
FAILED+ '[' color = color ']'
+ echo -en '\033[0;39m'
+ echo -n ']'
]+ echo -ne '\r'
+ return 1
+ return 1
+ RETVAL=1
+ echo

+ return 1
+ exit 1
+ no_more_locking
+ unlock
+ lock u
+ flock -u 99
+ lock xn
+ flock -xn 99
+ rm -f /tmp/cloudera-scm-agent.lock

and also i didn't make any changes to /etc/default/cloudera-scm-agent
the content in that file is
CMF_AGENT_ARGS='--hostname=quickstart.cloudera --host_id=quickstart.cloudera'

I just want to test upgrade cm6 in vm that download from cloudera before the real upgrade in our environment
by teng on ‎05-31-2018 08:28 PM
after change /etc/default/cloudera-scm-agent to
CMF_AGENT_ARGS=''

It can start successfully

Thank you so much to help us