Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

 
7 REPLIES 7

Re: Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

Super Mentor

@tahine ndongo

1. How did you start the Ambari Server? Which of the following command was used?

# ambari-server start
(OR)
# service ambari-server start

.

2. If you have started amabri server using "service" command then please try to stop it using "service ambari-server stop" command.

.

3. Also please let us know which user is running ambari server "root" user or a Non Root User?

4. Do you see PID is changing when you fire the stop command? Also can you please share the output of the following command?

# ps -ef | grep AmbariServer

.

Re: Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

Thanks @Jay Kumar SenSharma

I usually use ambari-server start. But currently to stop it I tried with both commands: ambari-server stop and ambari-stop service but the result remains the same: it stops and restarts immediately. Yes the PID changes when it is restarted. Here are the outputs:

[root@edge1 ~]# ps -ef | grep AmbariServer

admin 8804 1 14 11:41 ? 00:01:11 /usr/java/jdk1.8.0_60/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.controller.AmbariServer

root 20933 5262 0 11:49 pts/1 00:00:00 grep AmbariServer

Re: Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

Thanks @Jay Kumar SenSharma

I use the both command:

# ambari-server start

# service ambari-server start

Yes the PID is changing when i fire the stop command. sometimes it takes a few seconds to restart.

ps -ef | grep AmbariServer

admin 8804 1 14 11:41 ? 00:01:11 /usr/java/jdk1.8.0_60/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.controller.AmbariServer

root 20933 5262 0 11:49 pts/1 00:00:00 grep AmbariServer

Re: Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

Thanks @Jay Kumar SenSharma

I usually use ambari-server start. But currently to stop it I tried with both commands: ambari-server stop and ambari-stop service but the result remains the same: it stops and restarts immediately. Yes the PID changes when it is restarted. Here are the outputs:

[root@edge1 ~]# ps -ef | grep AmbariServer

admin 8804 1 14 11:41 ? 00:01:11 /usr/java/jdk1.8.0_60/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.controller.AmbariServer

root 20933 5262 0 11:49 pts/1 00:00:00 grep AmbariServer

Re: Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

Super Mentor

@tahine ndongo

In the output of "ps -ef | grep AmbariServer" we see that you had started AmbariServer as "admin" user. However you might be trying to stop/start it using root user again and tat might be causing the issue.

So are you sure that you have configured your ambari server to run as Non Root User "admin" ?

In that case you will need to make sure that you have followed the doc: https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/sudoer_configura...

AND

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.2.2/bk_ambari-security/content/sudo_defaults_se...

AND
similar link:

https://community.hortonworks.com/questions/101075/ambari-server-as-a-non-root-user.html

.

You must trigger the stop and start command on AmbariServer with the same user account. If you by mistake started ambari as non root user 'admin' to start it and attempting to stop it using root user (or vice-versa) then please Kill the ambari server using root user and then properly start and then staop the server using a single account.

Re: Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

Thanks @Jay Kumar SenSharma

I usually use ambari-server start. But currently to stop it I tried with both commands: ambari-server stop and ambari-stop service but the result remains the same: it stops and restarts immediately. Yes the PID changes when it is restarted. Here are the outputs:

[root@edge1 ~]# ps -ef | grep AmbariServer

admin 8804 1 14 11:41 ? 00:01:11 /usr/java/jdk1.8.0_60/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.controller.AmbariServer

root 20933 5262 0 11:49 pts/1 00:00:00 grep AmbariServer

Re: Hello, I need your help please. My ambari server can't stop. It restart automatically . I use ambari 2.2.2

@Jay Kumar SenSharma

I changed the user to root but the problem remains the same. the result of ps -ef shows that the process belongs to the root but when I stop it or even kill as root it restarts and the pid changes. Above the the output of the ps -ef command. I would also like you to look at the contents of the /etc/init/amabri-server.conf file

	[root@edge2 ~]# ps -ef | grep AmbariServer
	root      8273  5454  0 16:57 pts/0    00:00:00 grep AmbariServer
	root     17537     1 12 16:40 ?        00:02:16 /usr/java/jdk1.8.0_60/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -Djava.security.auth.login.config=/etc/ambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.controller.AmbariServer
	[root@edge2 ~]# cat /etc/init/ambari-server.conf
	# Licensed to the Apache Software Foundation (ASF) under one or more
	# contributor license agreements.  See the NOTICE file distributed with
	# this work for additional information regarding copyright ownership.
	# The ASF licenses this file to You under the Apache License, Version 2.0
	# (the "License"); you may not use this file except in compliance with
	# the License.  You may obtain a copy of the License at
	#
	#     http://www.apache.org/licenses/LICENSE-2.0
	#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
	# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	# See the License for the specific
	#ambari-server
description     "ambari server"
	#start on runlevel [2345]
	stop on runlevel [016]
	env PIDFILE=/var/run/ambari-server/ambari-server.pid
	#respawn
	expect fork
	script
	   . /etc/environment
	    export AMBARI_SERVER_RUN_IN_FOREGROUND=true
	    exec /etc/init.d/ambari-server start
	end script
	post-stop script
	   rm -f $PIDFILE
	end script
Don't have an account?
Coming from Hortonworks? Activate your account here