I tried the instructions to install cluster-in-a-box locally, but it fails at the deployment stage.
Specifically:
$ memsql-deploy cluster-in-a-box --license [MY_LICENSE]
Starting rollback
✓ Rollback succeeded
unknown package type for host 127.0.0.1: could not find dpkg or rpm
System info:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
$ uname -a
Linux [...] 4.18.0-10-generic #11-Ubuntu SMP Thu Oct 11 15:13:55 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Thanks for reporting this issue. We require access to either the dpkg or rpm command on the current machine. Can you confirm that you have access to either of those tools? It appears that you are running Ubuntu, so in theory you should have access to the dpkg command.
$ dpkg --version
Debian 'dpkg' package management program version 1.19.0.5 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
Ok, so I confirmed that I am able to install cluster-in-a-box from scratch in a Ubuntu 18.10 docker image, however I am not convinced that reproduces your environment. During the installation process we are exec’ing the which binary on your machine which in this case is returning an error. Can you send the output of this:
Ok, also was able to run this on a fresh Ubuntu 18.10 AMI on EC2. At this point I am convinced this is something to do with the environment. The leading ideas are:
what implementation of sh is on the machine
is the which binary installed on your machine? some shells provide it, which would explain which dpkg working in your environment but failing when we try to exec it.
Can you run man sh and determine which implementation of sh you are using. On my Ubuntu 18.10 system I am running dash. Also - do you have any interesting sudo restrictions on your machine?
Well, it doesn’t repro for me in tmux. Can you provide any additional notes about your tmux environment to help me reproduce this issue? Much appreciated.
Something funky is going on. I was able to install through memsql-deploy, but all the CLI commands return with unknown package type for host 127.0.0.1: could not find dpkg or rpm
For anyone else following the thread, we have taken this conversation offline to debug a bit faster. I will post a full explanation/resolution once we figure it out.
Sorry for the late update to this thread. In summary, we were able to repro the issue and released a fix in the memsql-toolbox package version 1.0.1. We are now on memsql-toolbox 1.0.3 and haven’t heard anyone else reporting this issue so I am going to mark this as solved.
For anyone interested, the issue was related to sudo saving temporary timed credentials in the user’s environment. This allowed the tools to incorrectly guess that sudo didn’t require a password which caused it to fail commands later on.
I got exactly the same error on your up to date version 1.0.6 19e4230c79a10192c6b947cb2b144fdb37cb3c0e when I try to deploy a in a box cluster locally on a debian 9 Linux lido 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 GNU/Linux.
memsql-deploy cluster-in-a-box --license XXXXXXXXXXXXXXXXXXXXXXXXXXXX
sudo password for user@127.0.0.1:
Starting rollback
✓ Rollback succeeded
unknown package type for host 127.0.0.1: Both dpkg and rpm package managers found on the system
rpm is a regular package for a debian system. Its better to search for the package manager tools by inspect the distribution not by checking dpkg and rpm together. Its not identify your system requirements.