ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukáš Drbal <lukas.dr...@gmail.com>
Subject Re: Unable to stop ambari server
Date Thu, 09 Jun 2016 14:06:19 GMT
Hi Andrew,

thanks for reply. I already try it and when i kill all process (after stop
by init scripts) by:
kill `ps aux | grep -i ambari-server | awk '{ print $2 }' | tr "\n" " "`

Its spawned again with different PID.

Its default installation from deb repository without any modification.

root@ambarisrv-01:~# ps aux | grep -i ambari-server
root      2969  0.0  0.0  17988  1520 ?        Ss   14:01   0:00 bash
/etc/init.d/ambari-server start
root      2980  4.2  0.0  55204 15172 ?        S    14:01   0:00
/usr/bin/python /usr/sbin/ambari-server.py start
root      3028  0.0  0.0   4440   648 ?        S    14:01   0:00 /bin/sh -c
ulimit -n 10000 ; /usr/jdk64/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/postgresql-jdbc.jar'
org.apache.ambari.server.controller.AmbariServer >
/var/log/ambari-server/ambari-server.out 2>&1 || echo $? >
/var/run/ambari-server/ambari-server.exitcode
root      3029  301  1.8 4678572 290572 ?      Sl   14:01   0:12
/usr/jdk64/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/postgresql-jdbc.jar
org.apache.ambari.server.controller.AmbariServer
root      3102  0.0  0.0  10460   956 pts/0    R+   14:01   0:00 grep
--color=auto -i ambari-server
root     23765 10.5  5.0 5760640 779836 ?      Sl   13:28   3:29
/usr/jdk64/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/postgresql-jdbc.jar
org.apache.ambari.server.controller.AmbariServer
root@ambarisrv-01:~#
root@ambarisrv-01:~#
root@ambarisrv-01:~# /etc/init.d/ambari-server stop
Using python  /usr/bin/python
Stopping ambari-server
Ambari Server stopped
root@ambarisrv-01:~# ps aux | grep -i ambari-server | awk '{ print $2 }' |
tr "\n" " "
3334 3345 3381 3382 3500 23765 root@ambarisrv-01:~#
root@ambarisrv-01:~#
root@ambarisrv-01:~# kill `ps aux | grep -i ambari-server | awk '{ print $2
}' | tr "\n" " "`
-bash: kill: (3621) - No such process
root@ambarisrv-01:~# ps aux | grep -i ambari-server
root      3631  0.0  0.0  17988  1520 ?        Ss   14:02   0:00 bash
/etc/init.d/ambari-server start
root      3642  2.4  0.0  55204 15172 ?        S    14:02   0:00
/usr/bin/python /usr/sbin/ambari-server.py start
root      3688  0.0  0.0   4440   648 ?        S    14:02   0:00 /bin/sh -c
ulimit -n 10000 ; /usr/jdk64/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/postgresql-jdbc.jar'
org.apache.ambari.server.controller.AmbariServer >
/var/log/ambari-server/ambari-server.out 2>&1 || echo $? >
/var/run/ambari-server/ambari-server.exitcode
root      3689  319  2.5 4847020 390936 ?      Sl   14:02   0:28
/usr/jdk64/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/postgresql-jdbc.jar
org.apache.ambari.server.controller.AmbariServer
root@ambarisrv-01:~#


And again

root@ambarisrv-01:~# kill `ps aux | grep -i ambari-server | awk '{ print $2
}' | tr "\n" " "`
-bash: kill: (4360) - No such process
root@ambarisrv-01:~# ps aux | grep -i ambari-server
root      4368  0.0  0.0  17988  1516 ?        Ss   14:05   0:00 bash
/etc/init.d/ambari-server start
root      4379  6.3  0.0  55204 15168 ?        S    14:05   0:00
/usr/bin/python /usr/sbin/ambari-server.py start
root      4418  0.0  0.0   4440   648 ?        S    14:05   0:00 /bin/sh -c
ulimit -n 10000 ; /usr/jdk64/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/postgresql-jdbc.jar'
org.apache.ambari.server.controller.AmbariServer >
/var/log/ambari-server/ambari-server.out 2>&1 || echo $? >
/var/run/ambari-server/ambari-server.exitcode
root      4419  244  1.5 4670380 240160 ?      Sl   14:05   0:07
/usr/jdk64/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/postgresql-jdbc.jar
org.apache.ambari.server.controller.AmbariServer
root      4456  0.0  0.0  10460   960 pts/0    S+   14:05   0:00 grep
--color=auto -i ambari-server
root@ambarisrv-01:~#

On Thu, Jun 9, 2016 at 3:49 PM, Andrew Stadtler <andy@phdata.io> wrote:

> Looks like you have another ambari-server process running and the pid
> doesn’t match the one in /var/run/ambari-server.pid. Which is the error
> when it fails to stop.
>
> The error messages when you try and start are because the port is in use
> by  another process.
>
> Can you post the output of the pids before and after the kill command and
> what command you are using to kill it.
>
> # ps ef | grep -i ambari-server
>
> # kill command
>
> # ps ef | grep -i ambari-server
>
> On Jun 9, 2016, at 8:40 AM, Lukáš Drbal <lukas.drbal@gmail.com> wrote:
>
> Hi,
>
> i am trying to stop sever and there is still one java process running.
> When i kill it by kill command, its spawned again. Did i something wrong?
> Thanks
>
> *My environment:*
> root@ambarisrv-01:~# cat /etc/lsb-release
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=14.04
> DISTRIB_CODENAME=trusty
> DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
> root@ambarisrv-01:~# dpkg -l "ambari-*"
> Desired=Unknown/Install/Remove/Purge/Hold
> |
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name                                    Version
>  Architecture             Description
>
> +++-=======================================-========================-========================-===================================================================================
> ii  ambari-agent                            2.2.2.0-460              amd64
>                    Ambari Agent
> ii  ambari-metrics-assembly                 2.2.2.0-460              amd64
>                    Ambari Metrics Assembly
> ii  ambari-server                           2.2.2.0-460              amd64
>                    Ambari Server
> root@ambarisrv-01:~#
>
>
> *What i try:*
>
> root@ambarisrv-01:~# /etc/init.d/ambari-server stop
> Using python  /usr/bin/python
> Stopping ambari-server
> Ambari Server stopped
> root@ambarisrv-01:~# /etc/init.d/ambari-server status
> Using python  /usr/bin/python
> Ambari-server status
> Ambari Server not running. Stale PID File at:
> /var/run/ambari-server/ambari-server.pid
> root@ambarisrv-01:~# ps aux | grep -i ambari-server
> root     23717  0.0  0.0  17988  1516 ?        Ss   13:28   0:00 bash
> /etc/init.d/ambari-server start
> root     23728  0.5  0.0  55204 15168 ?        S    13:28   0:00
> /usr/bin/python /usr/sbin/ambari-server.py start
> root     23764  0.0  0.0   4440   648 ?        S    13:28   0:00 /bin/sh
> -c ulimit -n 10000 ; /usr/jdk64/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/postgresql-jdbc.jar'
> org.apache.ambari.server.controller.AmbariServer >
> /var/log/ambari-server/ambari-server.out 2>&1 || echo $? >
> /var/run/ambari-server/ambari-server.exitcode
> root     23765  221  3.6 5746264 565880 ?      Sl   13:28   1:17
> /usr/jdk64/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/postgresql-jdbc.jar
> org.apache.ambari.server.controller.AmbariServer
> root     23908  0.0  0.0  10460   960 pts/0    S+   13:28   0:00 grep
> --color=auto -i ambari-server
>
> root@ambarisrv-01:~# ambari-server stop
> Using python  /usr/bin/python
> Stopping ambari-server
> *Ambari Server is not running*
>
> *But webface still respond*
> root@ambarisrv-01:~# nc localhost 8080
> GET /
> <!--
> * Licensed to the Apache Software Foundation (ASF) under one <TRUNCATED>
>
> *When i start it again, logs is full of messages like:*
> 09 Jun 2016 13:00:24,512 ERROR [main] AmbariServer:844 - Failed to run the
> Ambari Server
> java.net.BindException: Address already in use
>         at sun.nio.ch.Net.bind0(Native Method)
>         at sun.nio.ch.Net.bind(Net.java:433)
>         at sun.nio.ch.Net.bind(Net.java:425)
>         at
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
>         at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
>         at
> org.eclipse.jetty.server.nio.SelectChannelConnector.open(SelectChannelConnector.java:187)
>         at
> org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:316)
>         at
> org.eclipse.jetty.server.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:265)
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
>         at org.eclipse.jetty.server.Server.doStart(Server.java:293)
>         at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
>         at
> org.apache.ambari.server.controller.AmbariServer.run(AmbariServer.java:555)
>         at
> org.apache.ambari.server.controller.AmbariServer.main(AmbariServer.java:842)
>
> --
> Save The World - http://www.worldcommunitygrid.org/
> http://www.worldcommunitygrid.org/stat/viewMemberInfo.do?userName=LesTR
>
> LesTR
>
>
>


-- 
Save The World - http://www.worldcommunitygrid.org/
http://www.worldcommunitygrid.org/stat/viewMemberInfo.do?userName=LesTR

LesTR

Mime
View raw message