-1

When I run the docker command on the ICP tutorial:

docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception:2.1.0.3 install

I receive a error that I am logged in as root instead of the ubuntu user. What may be causing this and how can it be fixed?

PLAY [Checking Python interpreter] *********************************************

TASK [Checking Python interpreter] ********************************************* changed: [10.2.7.26]

PLAY [Checking prerequisites] **************************************************

TASK [Gathering Facts] ********************************************************* [WARNING]: sftp transfer mechanism failed on [10.2.7.26]. Use ANSIBLE_DEBUG=1 to see detailed information

[WARNING]: scp transfer mechanism failed on [10.2.7.26]. Use ANSIBLE_DEBUG=1 to see detailed information

fatal: [10.2.7.26]: FAILED! => {"changed": false, "module_stderr": "Connection to 10.2.7.26 closed.\r\n", "module_stdout": "Please login as the user \"ubuntu\" rather than the user \"root\".\r\n\r\n", "msg": "MODULE FAILURE", "rc": 0}

NO MORE HOSTS LEFT *************************************************************

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP ********************************************************************* 10.2.7.26 : ok=1 changed=1 unreachable=0 failed=1

Edit: The error from the verbose message:

<10.2.7.26> ESTABLISH SSH CONNECTION FOR USER: root

<10.2.7.26> SSH: EXEC ssh -C -o CheckHostIP=no -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o 'IdentityFile="/installer/cluster/ssh_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=60 10.2.7.26 'dd of=Please login as the user "ubuntu" rather than the user "root"./setup.py bs=65536'

<10.2.7.26> (0, 'Please login as the user "ubuntu" rather than the user "root".\n\n', '')

However, this error occurs when I use my private key generated from my cloud provider. When I follow the SSH key generator here: https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.3/installing/ssh_keys.html I get this error:

<10.2.7.26> ESTABLISH SSH CONNECTION FOR USER: root

<10.2.7.26> SSH: EXEC ssh -C -o CheckHostIP=no -o LogLevel=ERROR -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o 'IdentityFile="/installer/cluster/ssh_key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=60 -tt 10.2.7.26 'ls /usr/bin/python &>/dev/null || (echo "Can'"'"'t find Python interpreter(/usr/bin/python) on your node" && exit 1)'

<10.2.7.26> (255, '', 'Permission denied (publickey).\r\n')

fatal: [10.2.7.26]: UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host via ssh: Permission denied >(publickey).\r\n", "unreachable": true }

The hosts:

[master]

10.2.7.26

[worker]

10.2.7.26

[proxy]

10.2.7.26

The Config.yaml:

network_type: calico

kubelet_extra_args: ["--fail-swap-on=false"]

cluster_domain: cluster.local

etcd_extra_args: ["--grpc-keepalive-timeout=0", "--grpc-keepalive-interval=0", "--snapshot-count=10000"]

default_admin_user: admin

default_admin_password: admin

disabled_management_services: ["istio", "vulnerability-advisor", "custom-metrics-adapter"]

image-security-enforcement: clusterImagePolicy: - name: "docker.io/ibmcom/*" policy:

Damien Gu
  • 77
  • 8
Y. Ro
  • 3
  • 3

1 Answers1

0

For ICP installation, it requires root user permission. Could you try to install ICP by below command?

sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception:2.1.0.3 install

More information, you can access below link for details.

https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.3/installing/install_containers_CE.html

AsirXing
  • 706
  • 6
  • 3
  • Sorry, I've actually tried that originally. Running the installation in Root gives me the same error as above. – Y. Ro Aug 23 '18 at 03:51
  • could you let me know the ICP installation configuration files (config.yaml and hosts)? And you can install ICP with verbose message to get more installation logs. – AsirXing Aug 23 '18 at 05:18
  • You can run this command to install ICP with verbose message. sudo docker run --net=host -t -e LICENSE=accept -v "$(pwd)":/installer/cluster ibmcom/icp-inception:2.1.0.3 install -vvv – AsirXing Aug 23 '18 at 05:18
  • I've added the config.yaml and hosts, as well as the verbose messages for ICP in the edit. – Y. Ro Aug 24 '18 at 04:29
  • Thanks for your updates. From the verbose messages, seems the SSH key has issue in your environment, you can see the error message like 'Permission denied (publickey)'. As you use SSH keys to secure your cluster, seems you create the SSH key with 'ubuntu' user, but you tried to SSH login into the ICP node with 'root' user. – AsirXing Aug 24 '18 at 05:47
  • @Y.Ro For your installation issue, I have 2 suggestions. The first one, you can refer ICP documentation to configure password authentication for cluster nodes. And then try to install ICP again. The ICP KC link is: https://www.ibm.com/support/knowledgecenter/SSBS6K_2.1.0.3/installing/password_auth.html – AsirXing Aug 24 '18 at 05:53
  • The second suggestion, you can enable SSH root user login, and then create the SSH key according to ICP documentation. Then you can try to install ICP again. To enable SSH root user login, you can refer: https://www.ehowstuff.com/how-to-enable-ssh-root-login-on-ubuntu-16-04/ – AsirXing Aug 24 '18 at 05:57
  • Thanks @AsirXing! The second suggestion got ICP working. – Y. Ro Aug 24 '18 at 23:51