Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

How to stop HAWQ segment from the terminal?

avatar
Contributor

I am trying to restart the HAWQ service using Ambari. However, for some reason the segments are not Stopping and the operation is timing out after 600 seconds. Is there a way to stop the segments and/or restart them from the terminal?

I am using HDP 2.4.2 and HAWQ 2.0.1

1 ACCEPTED SOLUTION

avatar
Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login
4 REPLIES 4

avatar
Contributor

waiting for server to shut down........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... failed 20170108:19:26:51:311785 hawq_stop:datanode01-dev:gpadmin-[INFO]:-pg_ctl: server does not shut down 20170108:19:26:51:311785 hawq_stop:datanode01-dev:gpadmin-[ERROR]:-Segment stop failed, exit 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Prepare to do 'hawq stop' 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[INFO]:-You can find log in: 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[INFO]:-/home/gpadmin/hawqAdminLogs/hawq_stop_20170108.log 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[INFO]:-GPHOME is set to: 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[INFO]:-/usr/local/hawq/. 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[DEBUG]:-Current user is 'gpadmin' 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[DEBUG]:-Parsing config file: 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[DEBUG]:-/usr/local/hawq/./etc/hawq-site.xml 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Stop hawq with args: ['stop', 'segment'] 20170108:19:36:55:313713 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Stop hawq segment waiting for server to shut down........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... failed 20170108:19:46:56:313713 hawq_stop:datanode01-dev:gpadmin-[INFO]:-pg_ctl: server does not shut down 20170108:19:46:56:313713 hawq_stop:datanode01-dev:gpadmin-[ERROR]:-Segment stop failed, exit 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Prepare to do 'hawq stop' 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[INFO]:-You can find log in: 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[INFO]:-/home/gpadmin/hawqAdminLogs/hawq_stop_20170108.log 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[INFO]:-GPHOME is set to: 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[INFO]:-/usr/local/hawq/. 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[DEBUG]:-Current user is 'gpadmin' 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[DEBUG]:-Parsing config file: 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[DEBUG]:-/usr/local/hawq/./etc/hawq-site.xml 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Stop hawq with args: ['stop', 'segment'] 20170108:19:48:12:314792 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Stop hawq segment waiting for server to shut down..........................................20170108:19:48:51:314926 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Prepare to do 'hawq stop' 20170108:19:48:51:314926 hawq_stop:datanode01-dev:gpadmin-[INFO]:-You can find log in: 20170108:19:48:51:314926 hawq_stop:datanode01-dev:gpadmin-[INFO]:-/home/gpadmin/hawqAdminLogs/hawq_stop_20170108.log 20170108:19:48:51:314926 hawq_stop:datanode01-dev:gpadmin-[INFO]:-GPHOME is set to: 20170108:19:48:51:314926 hawq_stop:datanode01-dev:gpadmin-[INFO]:-/usr/local/hawq/. 20170108:19:48:51:314926 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Stop hawq with args: ['stop', 'segment'] .......20170108:19:48:58:314926 hawq_stop:datanode01-dev:gpadmin-[INFO]:-Stop hawq segment waiting for server to shut down........................................................................................................................................................................................[root@datanode01-dev ~]#

avatar
Contributor
hide-solution

This problem has been solved!

Want to get a detailed solution you have to login/registered on the community

Register/Login

avatar
Contributor

Killing the process(es) helped. Thanks!

avatar
Contributor

Hi Piyush,

Additionally, you can try using the following commands:

hawq stop segment -M fast

If the above does not work stop with option "immediate" should kill the process for you:

hawq stop segment -M immediate

If you do not provide any option with -M the stop/shutdown uses "smart" mode which does not really kill anything if there is any active connection or query.