Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access presto-admin commands on passwordless VPS #11393

Closed
bradatefi opened this issue Aug 30, 2018 · 8 comments
Closed

Cannot access presto-admin commands on passwordless VPS #11393

bradatefi opened this issue Aug 30, 2018 · 8 comments

Comments

@bradatefi
Copy link

Using Ubuntu 16.04 as either root or user with sudo access and PasswordAuthentication no

When typing a command such as

./presto-admin catalog add cassandra

OR

./presto-admin catalog add cassandra -p

OR

./presto-admin catalog add cassandra -I

(prompted for 'Initial value for env.password:')

Am always getting following response

Deploying cassandra.properties catalog configurations on: localhost

Fatal error: [localhost] Needed to prompt for a connection or sudo password (host: localhost), but input would be ambiguous in parallel mode

Aborting."

@kokosing
Copy link
Contributor

Does the user who is running presto-admin commands is able to do passwordless ssh connection to localhost?

@findepi
Copy link
Contributor

findepi commented Aug 31, 2018

@bradatefi please move this issue @ https://github.com/prestodb/presto-admin

@bradatefi
Copy link
Author

Was able to log in as a non root user on Ubuntu 16.04 only when I changed the following settings in 'sshd_config' file PasswordAuthentication yes, ChallengeResponseAuthentication yes and issued password (eg '-p ') or '-I' after presto-admin command. I have presto-server-0.149 in my user's home directory and have successfully run the commands '# bin/launcher start' and 'bin/launcher run'. I have also been able to run the CLI by typing a command such as './presto --server localhost:8080 --catalog cassandra --schema default'.

I have a Scylla keyspace called 'mk', however when I try to access it with a command like this
presto:default> select * from cassandra.mk.leads;
In response I get "Catalog cassandra does not exist"

When I go into prestoadmin and type the following,

./presto-admin catalog add cassandra -p

I get the following:
"Warning: [localhost] sudo() received nonzero return code 42 while executing '( getent passwd presto >/dev/null || exit 42 ) && mkdir -p /etc/presto/catalog && chown presto:presto /etc/presto/catalog && chmod 755 /etc/presto/catalog '!
Fatal error: User presto does not exist. Make sure the Presto server RPM is installed and try again"

running the following command below gives "Warning: [localhost] Presto is not installed."

./presto-admin server start -p

I feel like I am very close on this but I'm not quite able to connect Presto with my ScyllaDB keyspace and I'm not exactly sure which direction I need to go into. Would moving to CentOS help solve the issue or is it possible to run this in Ubuntu 16.04?

@kokosing
Copy link
Contributor

kokosing commented Sep 6, 2018

What do below commands return to you?

  • getent passwd presto
  • sudo rpm -qa | grep -i presto

@bradatefi
Copy link
Author

bradatefi commented Sep 6, 2018

When I type these nothing returns (see replica of terminal below)

username@host:~$ getent passwd presto

username@host:~$ sudo rpm -qa | grep -i presto

[sudo] password for username:

username@host:~$

@kokosing
Copy link
Contributor

kokosing commented Sep 7, 2018

What about getent passwd presto; echo $??

From what you said, it looks like presto-admin was right saying that: User presto does not exist. Make sure the Presto server RPM is installed and try again". Have you installed Presto via presto-admin (see https://prestodb.io/presto-admin/docs/current/installation/presto-server-installation.html)?

@bradatefi
Copy link
Author

bradatefi commented Sep 7, 2018

when I type "getent passwd presto; echo $?" I get a response of 2... when I try using presto-admin's installer I get the following response

user@host:~/prestoadmin$ ./presto-admin server install presto-server-rpm-0.203-e.0.7.x86_64.rpm -p
Using rpm_specifier as a local path
Fetching local presto rpm at path: presto-server-rpm-0.203-e.0.7.x86_64.rpm
Found existing rpm at: presto-server-rpm-0.203-e.0.7.x86_64.rpm
Deploying rpm on localhost...
[localhost] out: sudo password:
[localhost] out:
Package deployed successfully on: localhost
[localhost] out: sudo password:
[localhost] out: rpm: RPM should not be used directly install RPM packages, use Alien instead!
[localhost] out: rpm: However assuming you know what you are doing...
[localhost] out: error: Failed dependencies:
[localhost] out: python >= 2.4 is needed by presto-server-rpm-0:0.203.e.0.7-1.x86_64
[localhost] out: /usr/sbin/useradd is needed by presto-server-rpm-0:0.203.e.0.7-1.x86_64
[localhost] out: /usr/sbin/groupadd is needed by presto-server-rpm-0:0.203.e.0.7-1.x86_64
[localhost] out: /usr/bin/uuidgen is needed by presto-server-rpm-0:0.203.e.0.7-1.x86_64
[localhost] out:

Fatal error: [localhost] sudo() received nonzero return code 1 while executing!

Requested: rpm -i /opt/prestoadmin/packages/presto-server-rpm-0.203-e.0.7.x86_64.rpm
Executed: sudo -S -p 'sudo password:' /bin/bash -l -c "rpm -i /opt/prestoadmin/packages/presto-server-rpm-0.203-e.0.7.x86_64.rpm"

Aborting.


I found a thread from a user who had a similar issue (prestodb/presto-admin#345) and saw this response "Unfortunately, since you're on Ubuntu you won't be able to use presto-admin since presto-admin can only install Presto using the RPM utility which is a package manager that only works on RHEL/Centos Linux flavors. See the operating systems requirement in the docs https://prestodb.io/presto-admin/docs/current/software-requirements.html."

Basically, is it possible to install presto-server on Ubuntu 16.04 or should I just do it on centOS? I haven't seen much instruction for installing on Ubuntu but, with that being said, I was able to successfully install through Docker via these instructions, https://hub.docker.com/r/tzachl/scylla-and-presto-image/ however I would like to see how this is possible to achieve without Docker.

@kokosing
Copy link
Contributor

To install Presto on Ubuntu just follow the https://prestodb.io/docs/current/installation/deployment.html.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants