linuxdockercentoshortonworks-sandbox

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


Solution

  • 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:

    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.