Support Questions

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

Error Installing HDB HAWQ Standby Master

avatar

I am not able to install the HAWQ Standby master on an AWS cluster running HDP 2.4.2 and Ambari 2.2.2 Here is the error: "This can be run only on master or standby host"

6948-screen-shot-2016-08-25-at-91510-am.png

Not sure what that means. It is not being installed on a DN, with PFX installed. It is not bing installed on the Ambari node. I am using the Name Node (since I only have 3 HDP master nodes) to install the HAWQ Standby Master. I attempted to remove the HAWQ Standby (that does not start) from the Name node and placed it on another node just to test. It gives the same error. So right now I am just running without a standby master. See

6949-screen-shot-2016-08-25-at-101409-am.png

How do I begin trouble shooting this?

1 ACCEPTED SOLUTION

avatar

@Vineet @Pratheesh Nair Ok.. Here is solution

So apparently if you are installing on Amazon AWS EC2 (remember you are only given access to ec2-user, not root), and if you decided to NOT do passwordless ssh with default key named id_rsa for that ec2-user when installing Ambari and its agents, when you try to install Hortonworks HDB (HAWQ) via Ambari, Ambari WILL NOT exchange the keys for the gpadmin user for you. It would create the gpadmin user with the password you give it on the HAWQ config screen during install, but no keys exchanged.

NOTE: for my nodes I had a key for ssh that was NOT default name of id_rsa. I do not know if this is a combination of using a non root user or the fact that ec2-user did not have its own passwordless ssh with default key named id_rsa. In anycase ONLY on the HAWQ Master, for gpadmin would the keys exist. If you tried the following to generate keys on the HAWQ Master you would still get an error, where it would NOT even accept the default gpadmin user password you set, even though it works. That was surprising.

su gpadmin

> source /usr/local/hawq/greenplum_path.sh
> hawq ssh-exkeys -f Hosts

>Enter password for existing user for node <......>
>Enter password for existing user for node <......>
>Enter password for existing user for node <......>

So in essence you have to manually go to each node, and copy authorized_keys file from HAWQ Master to each node (chmod 600), into the /home/gpadmin/.ssh/ so that you can at least password ssh from that HAWQ master node. Then you run the ssh-exkeys manually and it would work.

View solution in original post

11 REPLIES 11

avatar

avatar
Contributor

It can be a network configuration issue .Having said that could you please make sure the following

1.Confirm you are able to do ssh between the master and standby master ( Please make sure you can ssh to localhost as well)

2.Master ip addresses are different.

3. Please try to intialize standby master from the command line and share the logs

The hawq init object --standby-host= option allows defining the host for a standby at initialization.

Also if you can upload the logs from hawqAdminLogs it would be useful

avatar

@Pratheesh Nair

There are no logs on /data/hawq/masteron the HAWQ standby master. In fact nothing is created there unlike on the HAWQ master node.

Yes the ips are different for the masters.

When you run the command from the command line, it immediately returns

This can be run only on master or standby host

Even in verbose mode. Yes I can do passwordless ssh if I provide the -i with pem file (as this is AWS) i.e. ssh -i <.pem> node I cannot do a ssh node directly without passing the -i option.

avatar
Contributor

I hope you ran the command from the hawq master node only .Also can you give the output of gp_segement_configuration table .

su - gpadmin

psql template1

select * from gp_segement_configuration

avatar

avatar

@Pratheesh Nair ok I did not run it from hawq master, because Ambari is trying to run it from the HAWQ Standby node. So I ran it from the HAWQ Master and got the dreaded error:

gpadmin-[ERROR]:-Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

So I am attempting to run as gpadmin

hawq ssh-exkeys -f Hosts

It is asking for password for each hosts I am attempting to set up passwordless ssh for the gpadmin user (since this is AWS, it was setup for the ec2-user) Hopefully that may solve it.

avatar
Contributor

Yep .It will resolve the issue .Also please make sure you can do a "ssh localhost" as well after the key exchange

avatar
Rising Star

@Ancil McBarnett I'm curious as to why you ran into this issue. Ambari should have automatically created gpadmin account and exchanged keys for you.

Unless you manually created gpadmin account, and gave a different password on HAWQ config screen in Ambari during install?

http://hdb.docs.pivotal.io/hdb/install/install-ambari.html

avatar

@Vineet @Pratheesh Nair Ok.. Here is solution

So apparently if you are installing on Amazon AWS EC2 (remember you are only given access to ec2-user, not root), and if you decided to NOT do passwordless ssh with default key named id_rsa for that ec2-user when installing Ambari and its agents, when you try to install Hortonworks HDB (HAWQ) via Ambari, Ambari WILL NOT exchange the keys for the gpadmin user for you. It would create the gpadmin user with the password you give it on the HAWQ config screen during install, but no keys exchanged.

NOTE: for my nodes I had a key for ssh that was NOT default name of id_rsa. I do not know if this is a combination of using a non root user or the fact that ec2-user did not have its own passwordless ssh with default key named id_rsa. In anycase ONLY on the HAWQ Master, for gpadmin would the keys exist. If you tried the following to generate keys on the HAWQ Master you would still get an error, where it would NOT even accept the default gpadmin user password you set, even though it works. That was surprising.

su gpadmin

> source /usr/local/hawq/greenplum_path.sh
> hawq ssh-exkeys -f Hosts

>Enter password for existing user for node <......>
>Enter password for existing user for node <......>
>Enter password for existing user for node <......>

So in essence you have to manually go to each node, and copy authorized_keys file from HAWQ Master to each node (chmod 600), into the /home/gpadmin/.ssh/ so that you can at least password ssh from that HAWQ master node. Then you run the ssh-exkeys manually and it would work.