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.

Unable to login Ambari after migrating Ambari & Ambarirca Postgres database to remote Postgres from Local

Unable to login Ambari after migrating Ambari & Ambarirca Postgres database to remote Postgres from Local

Explorer

Hi Team,

Please advise on the below issue facing ..

I have HWX cluster where I want to migrate the local postgres database Ambari and Ambarirca to Cloud RDS Postgres server.

From Cloud side everything fine !!

I followed the below procedure in migrating the local to Remote

-bash-4.1$ psql postgres -U NE7Y1jJnst24kSzb -p 5432 -h postgres-778326ea-7ddd-47a7-b430-6b0d0d58d7f0.cbgfynx3dyky.us-east-1.rds.amazonaws.com

CREATE DATABASE ambari;

CREATE USER ambari WITH CREATEDB PASSWORD 'bigdata';

GRANT ALL PRIVILEGES ON DATABASE ambari TO ambari;

\q

-bash-4.1$ psql postgres -U ambari -p 5432 -h postgres-778326ea-7ddd-47a7-b430-6b0d0d58d7f0.cbgfynx3dyky.us-east-1.rds.amazonaws.com

\connect ambari;

CREATE SCHEMA ambari AUTHORIZATION ambari;

ALTER SCHEMA ambari OWNER TO ambari;

ALTER ROLE ambari SET search_path to 'ambari', 'public';

-bash-4.1$ psql ambari -U ambari -p 5432 -h postgres-778326ea-7ddd-47a7-b430-6b0d0d58d7f0.cbgfynx3dyky.us-east-1.rds.amazonaws.com

Below are the properties set in /etc/ambari-server/conf/ambari.properties

server.jdbc.user.name=ambari

server.persistence.type=remote

server.jdbc.postgres.schema=ambari

server.jdbc.database=postgres

server.jdbc.database_name=ambari

server.jdbc.url=jdbc:postgresql://postgres-778326ea-7ddd-47a7-b430-6b0d0d58d7f0.cbgfynx3dyky.us-east-1.rds.amazonaws.com:5432/ambari?createDatabaseIfNotExist=true

I have used pg_dump and restored DB also

With these configuration , Ambari server able to connect the " Ambari " database and service ambari-server restart worked and connecting to remote postgres but ....when I try to login to cluster , my previous credentials not worked and I am unable to login .

admin/admin is navigating me a page where no HDP installed .

Please let me know if anything missed from my end ....

Thanks,

Hari Kishore Javvaji

3 REPLIES 3

Re: Unable to login Ambari after migrating Ambari & Ambarirca Postgres database to remote Postgres from Local

@hari Kishore javvaji

1. Do you see any WARN or ERROR message in your ambari-server.log?

2. Did you try resetting the ambari admin password to default 'admin' ? My be you can check or set it back to the following wich is 'admin' (encrypted)

update ambari.users set user_password='538916f8943ec225d97a9a86a2c6ec0818c1cd400e09e03b660fdaaec4af29ddbb6f2b1033b81b00' where user_name='admin'

3. Also can you please check if the ambari-server is started completely or not.

4. What all ports do you see in the following output:

# netstat -tnlpa | grep $AMBARI_SERVER_PID

.

Re: Unable to login Ambari after migrating Ambari & Ambarirca Postgres database to remote Postgres from Local

Explorer

@jss

cat /var/run/ambari-server/ambari-server.pid

73745

root@hdp-dev29-control01.dev[us-east-1]:hjavvaji# netstat -pln | grep 73745

tcp 0 0 :::8080 :::* LISTEN 73745/java

tcp 0 0 :::8440 :::* LISTEN 73745/java

tcp 0 0 :::8441 :::* LISTEN 73745/java

udp 0 0 :::53488 :::* 73745/java

27 Nov 2016 18:42:29,239 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert mapreduce_history_server_process for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,239 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert ams_metrics_collector_process for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,239 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert yarn_resourcemanager_webui for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,239 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert ams_metrics_collector_autostart for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,239 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert secondary_namenode_process for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert ranger_admin_process for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert hive_webhcat_server_status for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert nodemanager_health_summary for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert zookeeper_server_process for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert yarn_app_timeline_server_webui for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert mapreduce_history_server_webui for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert SPARK_JOBHISTORYSERVER_PROCESS for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert namenode_last_checkpoint for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 ERROR [alert-event-bus-2] AlertReceivedListener:341 - Unable to process alert datanode_health_summary for an invalid cluster named hdp-iaas-dev29 27 Nov 2016 18:42:29,240 WARN [alert-event-bus-2] AlertReceivedListener:259 - Cluster lookup failed for cluster named hdp-iaas-dev29

Re: Unable to login Ambari after migrating Ambari & Ambarirca Postgres database to remote Postgres from Local

Explorer

Hi JSS ,

Thanks for coming back !!

I could see that not all the tables in remote postgresql updated when I did pg_dump .

example : cluster_id and remaining tables which are having HDP packages information .

I want to know the correction on top of my steps where I moved the local database to Remote RDS

Don't have an account?
Coming from Hortonworks? Activate your account here