我想知道执行cassandra -f是否有义务使用cassandra-cli或cqlsh?因为,我测试了到cassandra-cli --host 127.0.0.1 --port 9160或cqlsh的连接,并收到一条错误消息: connection failed to localhost/9160
发布于 2013-06-03 20:46:55
-f选项是一个标志,所以不需要在启动cassandra时提供它。
-f的用途是什么?
取决于操作系统,但它用于选择是否在前台/后台运行进程。
中的
-f意味着你将在后台运行进程。简单地调用cassandra.bat意味着进程在前台启动。例如:
cassandra.bat # cassandra runs in foreground (i.e.) you see logdata in the terminal
cassandra.bat -f # cassandra runs in background UNIX操作系统(linux / osx)中的
提供-f标志意味着您在前台运行进程。不提供它意味着进程将在后台启动。例如:
cassandra.bat # cassandra runs in background, you wont see anything in the terminal
cassandra.bat -f # cassandra runs in foreground返回到error
这意味着cassandra没有运行。启动任务管理器/活动监视器,并验证Cassandra是否作为进程/服务执行。此外,如果您想要将cqlsh / cassandra-cli连接到本地服务器,而不指定本地主机ip地址,则只需键入:
path/to/cassandra/bin/cqlsh -3 # the -3 means you use CQL3
path/to/cassandra/bin/cassandra-clihttps://stackoverflow.com/questions/16894398
复制相似问题