HDP 2.5 Hortonworks ambari-admin-password-reset missing
Asked Answered
C

4

10

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

Contraindicate answered 25/9, 2016 at 10:2 Comment(2)
Can you reproduce this behaviour after a reboot? If so, please post the output of grep "^passwd" /etc/nsswitch.conf and grep root /etc/passwd (anonymize the hash) and getent passwd rootIreneirenic
I have added the relevant data you have requested. this output is from the virtual box console (not putty). if you need the putty output let me know.Contraindicate
I
4

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.

Ireneirenic answered 6/10, 2016 at 13:37 Comment(3)
it seems like command not found. running unamae -a results with :Linux sandbox.hortonworks.com 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 x86_64 x86_64 GNU/LinuxContraindicate
Do you see files in /var/lib/sss/db/? Can you delete them, see this link?Ireneirenic
no such path. [root@sandbox ~]# cat /etc/redhat-release. OUT: CentOS release 6.8 (Final)Contraindicate
E
0

I ran into the same issue. The HDP 2.5 sandbox runs all of its components in a docker container, but commands like docker exec -it sandbox /bin/bash or docker attach sandbox got stuck.

When I ran a simple ps aux, I found several /usr/bin/docker-proxy commands which looked like : /usr/bin/docker-proxy -proto tcp -host-ip 0.0.0.0 -host-port 60000 -container-ip 172.17.0.2 -container-port 60000

They probably forward the HTTP ports of the various UIs of HDP components.

I could ssh into the container ip (here 172.17.0.2) using root/hadoop to authenticate. From there, I could use all "missing" commands like ambari-admin-password-reset.

$ ssh [email protected] ... # change password $ ambari-admin-password-reset

NB: I am new to docker, so there's probably a better way to deal with this.

Evangelistic answered 2/11, 2016 at 16:35 Comment(0)
F
0

I'd like to post here the instructions for 3.0.1 here.

I followed the instructions of installing hortonworks version 3.0.1 here: https://youtu.be/5TJMudSNn9c

After running the docker container, go to your browser and enter "localhost:4200", that will take you to the in browser terminal of the container, that hosts ambari. Enter "root" for login and "hadoop" for password, change the root password, and then enter "ambari-admin-password-reset" in order to reset ambari password.

In order to be able to use sandbox-hdp.hortonworks.com, you need to add the line "127.0.0.1 sandbox-hdp.hortonworks.com" at the end of the /private/etc/hosts file on your mac.

Freeboard answered 29/10, 2020 at 0:39 Comment(0)
M
0

Incorrect Pass

Then right corner click on power button >> power off drop down >> Restart >> when it boots up then press Esc key to get into recovery menu

Restart

select advance option and hit enter Advance Option

Select Recovery mode hit enter

Select Root

Root enter

Command mount -rw -o remount/ ls /home

change pass command passwd username

user as yours

last step enter pass two times by pressing enter enter image description here

Hopefully you changed password (:

Mosesmosey answered 16/10, 2022 at 17:53 Comment(2)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Chopine
it works for Oracle VM VirtualBox .Mosesmosey

© 2022 - 2024 — McMap. All rights reserved.