Memsql-deploy is not working. Not able to install memsql

I’m trying to create 3 leaf node cluster on redhat 6.x with one aggregator node. I’m not able to install memsql. Did anyone have this issue before?

x.x.x.x is my admin node here. userone has all privileges to run sudo without password but memsql-deploy is asking for password and even supplying correct password, it’s not working.

$ memsql-deploy install --file-path /Users/userone/memsql/memsql-server-6.7.14-fa416b0a53.x86_64.rpm --all
The target user userone on host x.x.x.x does not have the privileges to perform this action.
Please enter your password to proceed with sudo. (For details, see SingleStore Tools Issues · SingleStore Documentation).
sudo password for userone@x.x.x.x:
could not achieve desired privilege level: error running command: "/usr/bin/timeout" "--foreground" "5" "sudo" "-S" "-k" "-v": exit status 125

$ sudo -n -l
sudo: a password is required

$ sudo -k -l
Matching Defaults entries for userone on this host:
!lecture, env_keep+=SSH_AUTH_SOCK, passwd_tries=1

User userone may run the following commands on this host:
(ALL) ALL

Thank you for reporting this issue to us. Can you check the output of memsql-deploy version? I believe this issue was fixed in version 1.1.0. If you need to upgrade, run yum update memsql-toolbox.

$ memsql-deploy version
Version: 1.1.0
Commit: 71bb8a3568be5544fb811e7e4f56613dc8dd5911

$ rpm -qa|grep memsql
memsql-studio-1.5.6-1.x86_64
memsql-client-1.0.0-1.x86_64
memsql-server6.7.14-fa416b0a53-6.7.14-1.x86_64
memsql-toolbox-1.1.0-1.x86_64

memsql-deploy install --file-path /Users/userone/memsql/memsql-server-6.7.14-fa416b0a53.x86_64.rpm --all -y -v
2019/03/28 11:09:05 main.go:39 Running command /usr/bin/ssh -oControlMaster=yes -oControlPath=/tmp/memsql-toolbox334967331/1.socket -N -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oServerAliveInterval=60 -oServerAliveCountMax=5 -oBatchMode=yes -oUser=userone 10.54.1.211
2019/03/28 11:09:06 connection_manager.go:127 Testing SSH configuration for 10.54.1.211
2019/03/28 11:09:06 main.go:39 Running command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/1.socket 10.54.1.211 'echo' 'ping'
2019/03/28 11:09:06 main.go:39 Command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/1.socket 10.54.1.211 'echo' 'ping' took 26.671337ms
2019/03/28 11:09:06 main.go:39 Running command /usr/bin/ssh -oControlMaster=yes -oControlPath=/tmp/memsql-toolbox334967331/2.socket -N -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oServerAliveInterval=60 -oServerAliveCountMax=5 -oBatchMode=yes -oUser=userone 10.54.1.212
2019/03/28 11:09:06 connection_manager.go:127 Testing SSH configuration for 10.54.1.212
2019/03/28 11:09:06 main.go:39 Running command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/2.socket 10.54.1.212 'echo' 'ping'
2019/03/28 11:09:07 main.go:39 Command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/2.socket 10.54.1.212 'echo' 'ping' took 25.86071ms
2019/03/28 11:09:07 main.go:39 Running command /usr/bin/ssh -oControlMaster=yes -oControlPath=/tmp/memsql-toolbox334967331/3.socket -N -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oServerAliveInterval=60 -oServerAliveCountMax=5 -oBatchMode=yes -oUser=userone 10.54.1.75
2019/03/28 11:09:07 connection_manager.go:127 Testing SSH configuration for 10.54.1.75
2019/03/28 11:09:07 main.go:39 Running command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/3.socket 10.54.1.75 'echo' 'ping'
2019/03/28 11:09:07 main.go:39 Command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/3.socket 10.54.1.75 'echo' 'ping' took 43.18554ms
2019/03/28 11:09:07 main.go:39 Running command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/1.socket 10.54.1.211 'id' '-u' '-n'
2019/03/28 11:09:07 main.go:39 Command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/1.socket 10.54.1.211 'id' '-u' '-n' took 27.181634ms
2019/03/28 11:09:07 main.go:39 Running command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/1.socket 10.54.1.211 'which' 'sudo'
2019/03/28 11:09:08 main.go:39 Command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/1.socket 10.54.1.211 'which' 'sudo' took 58.309171ms
2019/03/28 11:09:08 main.go:39 Running command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/1.socket 10.54.1.211 'sudo' '-n' '-k' '-l'
2019/03/28 11:09:08 main.go:39 Command /usr/bin/ssh -oBatchMode=yes -q -tt -oControlPath=/tmp/memsql-toolbox334967331/1.socket 10.54.1.211 'sudo' '-n' '-k' '-l' failed with exit code 1 in 64.671196ms
No input to prompt loop

Thank you for including the diagnostic information. I should have explained what I thought the problem was before offering a solution. I’ll do that here now.

Versions of memsql-toolbox less than 1.1.0 used sudo -n -k -v to check for passwordless sudo privileges, but using -v asked for a password anyway in some cases. The check was changed to sudo -n -k -l in version 1.1.0, which we expect to properly detect passwordless sudo.

It looks like userone is allowed to run any command through sudo, but I’m not sure that it can do so without entering a password. We can check a couple things to make sure:

  • Does it still prompt for a password when you run sudo -n -k -l?
  • For passwordless sudo, I would expect the output of sudo -k -l to include a NOPASSWD clause, like this:
[alice@efd962ab867d /]$ sudo -n -k -l
Matching Defaults entries for alice on this host:
    !visiblepw, always_set_home, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS
    LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/

User alice may run the following commands on this host:
    (ALL) ALL, (ALL) NOPASSWD: ALL

I suggest these next steps:

  1. Update the sudo configuration on all hosts to give userone passwordless sudo. If it already has passwordless sudo, check that sudo -n -k echo works properly.
  2. Run memsql-deploy install without -y and enter the sudo password (as in your original message). If this doesn’t work, double-check that the password is correct by running sudo -k -v as userone on x.x.x.x.