I can use presto-cli to execute queries like this:
$ presto-cli
presto> show catalogs;
Catalog
---------
hive
system
(2 rows)
However, if I try with:
$ presto-cli --server localhost:8080
presto> show catalogs;
Error running command: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8080
How can I know the host/port configuration of the server to explicitly pass it as parameter?
presto-cli prints defaults when invoked with --help:
$ presto-cli --version
Presto CLI 334
$ presto-cli --help | grep -A2 -e --server
...
--
--server <server>
Presto server location (default: localhost:8080)
On EMR, however, presto-cli is a wrapper script. See #Peque answer for details.
On AWS EMR, the configuration could be loaded from:
/etc/presto/conf/config.properties
In particular, the port is being set as http-server.http.port in that file.
Related
I have installed cassandra 3.11.4 as per the below link http://cassandra.apache.org/download/ and when I'm trying to run cqlsh and nodetool command its showing command not found.
when run sudo service cassandra status,cassandra is running.
Please help
First, you need to verify that the service is healthy and operational
verify that the process is running:
ps -efa | grep cassandra
The expected outcome is a valid java process being executed
verify the log file as defined in $CASSANDRA_HOME/conf/logback.xml
tail -n 100 cassandra/system.log
The expected outcome is to not find errors
Try to replicate the issue in a new instance of the command line
You need to verify the services whether it is running or not in the configured port and IPs.
Also, you can check the system.log for any error. if still issue and data is not important you can delete the /data /commitlog /savedcache and restart the cassandra services again.
once started just check
ps -ef | grep cassandra
I am new to ansible and trying to deploy cassandra using ansible.
So far I was able to set up a 3 node cassandra cluster and start up cassandra services, but I want the errors/warnings in cassandra logs to be printed on console.
Is there any module that I can use? Or should I register the logs in a variable and display it?
Details: ansible version - ansible 2.5.3 and cassandra version is - apache-cassandra-2.1.16
by this command you can seen ERROE log in log file of cassandra:
for debug.log
ansible cassandrahosts -u userCanSeeLogs -m shell -a 'cat /path/to/debug.log | grep ERROR'
for system.log
ansible cassandrahosts -u userCanSeeLogs -m shell -a 'cat /path/to/system.log | grep ERROR'
I want to connect to Cassandra installed in a remote server from my dev environment. Dev Environment doesn't have cassandra installed and hence it is not allowing me to do the below for connecting to my cassandra server running on a different machine.
Client System - Dev System without Cassandra
Destination System - Prod Environment where Cassandra is installed
I am trying the below command over my dev terminal to connect to Prod Cassandra.
/opt/cassandra/dse-4.8.7/bin/cqlsh -e "select * from
/"IasService/"./"Table/" limit 10"
remote.stress.py1.s.com 9160 -u test-p test2;
Any leads would be helpful.
tldr;
Remove the 9160 from your command.
It would be easier to help you if you provided the error message or result of your command.
That being said, DSE 4.8.7 has Cassandra 2.1.14 at its core. As of Cassandra 2.1, cqlsh connects using the native binary protocol on port 9042. So forcing it to 9160 (as you are) will definitely not work.
$ cqlsh -e "SELECT release_version FROM system.local" 192.168.6.5 9042
-u cassdba -p superSecret
release_version
-----------------
2.1.13
(1 rows)
And since 9042 is the default port used by cqlsh now, you don't need to specify it at all.
I am new to cassandra but it seems the nodetool bootstrap command is not working.
huangg#cassandra-mpsre01-sjc1:~$ nodetool help bootstrap
Unknown command bootstrap
huangg#cassandra-mpsre01-sjc1:~$ nodetool bootstrap resume
nodetool: Found unexpected parameters: [bootstrap, resume]
See 'nodetool help' or 'nodetool help <command>'.
huangg#cassandra-mpsre01-sjc1:~$ nodetool help |grep bootstrap
rebuild Rebuild data by streaming from other nodes (similarly to bootstrap)
Is it a version issue?
[cqlsh 5.0.1 | Cassandra 2.1.9 | CQL spec 3.2.0 | Native protocol v3]
I want to use it because I want to resume a node after I decommission it. Right now, after I decommission a node, I have to stop cassandra service and then restart the cassandra service. I guess bootstrap can be used after the decommission command, to commission the node.
nodetool join is a different thing.
So there are two things here
1. First the commands which you specified don't seem correct.
For Bootstrap you can probably use the following link and see the correct syntax.
https://docs.datastax.com/en/cassandra/2.2/cassandra/tools/toolsBootstrap.html
Now after the node is decommissioned, you would want to rebuild it from another node and then work with it as the other nodes are working.
For that you can use nodetool rebuild.
https://docs.datastax.com/en/cassandra/2.1/cassandra/tools/toolsRebuild.html
Both are similar commands, but you can see which suits your scenario best and use accordingly.
nodetool bootstrap doesn't exist in c* 2.1.9. nodetool rebuild is the closest command
$ nodetool help rebuild NAME
nodetool rebuild - Rebuild data by streaming from other nodes (similarly
to bootstrap)
SYNOPSIS
nodetool [(-h | --host )] [(-p | --port )]
[(-pw | --password )]
[(-pwf | --password-file )]
[(-u | --username )] rebuild [--]
OPTIONS
-h , --host
Node hostname or ip address
-p <port>, --port <port>
Remote jmx agent port number
-pw <password>, --password <password>
Remote jmx agent password
-pwf <passwordFilePath>, --password-file <passwordFilePath>
Path to the JMX password file
-u <username>, --username <username>
Remote jmx agent username
--
This option can be used to separate command-line options from the
list of argument, (useful when arguments might be mistaken for
command-line options
<src-dc-name>
Name of DC from which to select sources for streaming. By default,
pick any DC
While launching Presto CLI it is throwing permission denide error.
I used to launch PrestoCLI by using the following command,
Presto$ /home/reddy/presto/presto --server localhost:8080 --catalog hive --schema default
Before launching PrestoCLI, I Install Presto and Discovery Service.
Can anyone assist me on this issue is appreciated.
Per the installation instructions for the CLI, it needs to be made executable by running chmod +x, just like any other UNIX executable.
Try running it as administrator like this:
su <yourpassword>
./presto --server localhost:8080 --catalog hive --schema default