Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HDP 2.5 Hortonworks ambari-admin-password-reset missing

I have downloaded the sandbox from hortonworks (Centos OS), then tried to follow the tutorial. It seems like the ambari-admin-password-reset command is not there and missing. I tried also to login with putty, the console asked me to change the password so I did. now it seems like the command is there, but I have different passwords for the console and one for the putty for the same user.

I have tried to look for the reason why for the same user 'root' I have 2 different passwords (one for the virtual box console and one for the putty) that I can login with. I see different commands on each box. more than that when I share folder I can only see it on the virtual box console but not on the putty console) which is really frustrating.

How can I enforce that what I would see from putty would be the same as what I see from the virtual box console.

I think it somehow related to TTY but I am not sure.

EDIT: running commands from the virtual box machine output:

grep "^passwd" /etc/nsswitch.conf

OUT: passwd: files sss

grep root /etc/passwd

OUT: rppt"x"0"0"root:/root:/bin/bash operator:x:11:0:operator:/root:/sbin/nologin

getent passwd root

OUT: root:x:0:0:root:/root:/bin/bash

EDIT: I think this is all about docker containers. It seems like the machine 2222 port is the ssh port for the hdp 2.5 container and not for the hosting machine. Now I get another problem. when running

docker exec sandbox ls

it is getting stuck. any help ?

Thanks for helpers

like image 637
David H Avatar asked Sep 25 '16 10:09

David H


People also ask

How do I reset my ambari admin password?

In Admin/Users, for a listed Ambari Administrator user, click Actions > Edit. In Users/[USERNAME], click CHANGE PASSWORD. Click Change Password.

What is the default username and password for ambari?

Log in to the Ambari Server using the default user name/password: admin/admin . You can change these credentials later.

How do I reset my hortonworks sandbox root password?

Login using username as root and password as hadoop. change your password. virtualBox –> Press Alt+F5 –> enter username – root –> enter password – hadoop –> it will ask you to set new password –> set new password.


1 Answers

So now I had the time to analyze the sandbox vm, and write it up for other users. As you stated correctly in your edit of the question, its the docker container setup of the sandbox, which confuses with two separate root users:

  • via ssh [email protected] -p 2222 you get into the docker container called "sandbox". This is a CentOS release 6.8 (Final), containing all the HDP services, especially the ambari service. The configuration enforces a password change at first login for the root user. Inside this VM you can also execute the ambari-admin-password-reset and set there a password for the ambari admin.

  • via console access you reach the docker host running a Centos 7.2, here you can login with the default root password for the VM as found in the HDP docs.

Coming to your sub-question with the hanging docker exec, it seems to be a bug in that specific docker version. If you google that, you will find issues discussing this or similar problems with docker. So I thought that it would be a good idea to just update the host via yum update. However this turned out to be a difficult path.

yum tried to update the kernel, but complained that there is not enough space on the boot partion.

So I moved the boot partion to the root partition:

  1. edit /etc/fsab and comment out the boot entry
  2. unmount /boot
  3. mv /boot
  4. cp -a /boot.org /boot
  5. grub2-mkconfig -o /boot/grub2/grub.cfg
  6. grub2-install /dev/sda
  7. reboot

After that I have found out that the docker configuration is broken and docker does not start anymore. In the logs it complained about

"Error starting daemon: error initializing graphdriver: \"/var/lib/docker\" contains other graphdrivers: devicemapper; Please cleanup or explicitly choose storage driver (-s )"

So I edited /etc/systemd/system/multi-user.target.wants/docker.service and changed the ExecStart setting to:

ExecStart=/usr/bin/dockerd  --storage-driver=overlay

After a service docker start and a docker start sandbox. The container worked again and I could could login to the container and after a ambari-server restart everything worked again.

And now - with the new docker version 1.12.2, docker exec sandbox ls works again.

So to sum up the docker exec command has a bug in that specific version of the sandbox, but you should think twice if you want to upgrade your sandbox.

like image 69
data cosmos Avatar answered Oct 08 '22 01:10

data cosmos