连接远程 scylla 数据库服务器显示错误

Connect remote scylla db server shows error

我已经在 google 云服务器中安装了 scylla-db。

我遵循的步骤:

sudo yum install epel-release

sudo curl -o /etc/yum.repos.d/scylla.repo -L http://repositories.scylladb.com/scylla/repo/a2a0ba89d456770dfdc1cd70325e3291/centos/scylladb-2.0.repo

sudo yum install scylla

sudo scylla_setup

(Given yes to "verify supportable version" , " verify packages" , "core dump", " fstim ssd "
For remaining : Given NO)

IN  file :/etc/scylla.d/io.conf

SEASTAR_IO="--max-io-requests=12 --num-io-queues=1"
( edited this file manually )

sudo systemctl start scylla-server

它显示:无法读取 yaml 文件。然后 google 并将 yaml-cpp 版本从 0.5.3 版本降级到 0.5.1。 然后 scylla 服务器启动 运行 .

[root@scylla ~]# nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address    Load       Tokens       Owns    Host ID                               Rack
UN  127.0.0.1  208.69 KB  256          ?       888e91da-9385-4c61-8417-dd59c1a979b8  rack1
Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless


[root@scylla ~]# cat /etc/scylla/scylla.yaml | grep seeds:
          - seeds: "127.0.0.1"
[root@scylla ~]# cat /etc/scylla/scylla.yaml | grep rpc_address:
rpc_address: localhost
#broadcast_rpc_address: 
[root@scylla ~]# cat /etc/scylla/scylla.yaml | grep listen_address:
listen_address: localhost

[root@scylla ~]# cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.0.8 | CQL spec 3.3.1 | Native protocol v4]
Use HELP for help.
cqlsh> exit



[root@scylla ~]# netstat -tupln | grep LISTEN
tcp        0      0 127.0.0.1:10000         0.0.0.0:*               LISTEN      6387/scylla         
tcp        0      0 127.0.0.1:9042          0.0.0.0:*               LISTEN      6387/scylla         
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1105/sshd           
tcp        0      0 127.0.0.1:7000          0.0.0.0:*               LISTEN      6387/scylla         
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1119/master         
tcp        0      0 0.0.0.0:9180            0.0.0.0:*               LISTEN      6387/scylla         
tcp        0      0 127.0.0.1:9160          0.0.0.0:*               LISTEN      6387/scylla         
tcp6       0      0 :::80                   :::*                    LISTEN      5217/httpd          
tcp6       0      0 :::22                   :::*                    LISTEN      1105/sshd           
tcp6       0      0 :::35063                :::*                    LISTEN      6412/scylla-jmx     
tcp6       0      0 ::1:25                  :::*                    LISTEN      1119/master         
tcp6       0      0 127.0.0.1:7199          :::*                    LISTEN      6412/scylla-jmx     

scylla 服务器是 运行。

相同的设置是在另一台服务器上完成的 服务器名称 scylla-db-1

我需要从该服务器连接到服务器 scylla(IP:xx.xx.xxx)。

当我执行以下命令时:

[root@scylla-db-1 ~]# cqlsh xx.xx.xxx
Connection error: ('Unable to connect to any servers', {'xx.xx.xxx': error(111, "Tried connecting to [('xx.xx.xxx', 9042)]. Last error: Connection refused")})

如何从本服务器连接远程服务器?

还有 在浏览器中检查 http://xx.xx.xxx:10000 and http://xx.xx.xxx:10000/ui 时,我在加载页面时遇到问题。

注:

I have done editing the /etc/scylla.d/io.conf file for assigning the max-io-requests manually

端口 10000 是 scylla 的其余部分 api,通常被限制在 127.0.0.1 - 这就是您无法访问它的原因

要通过 cql 获得访问权限,您需要编辑 /etc/scylla/scylla.yaml 文件并设置 rpc_address

请按照说明为集群部署配置 scylla:单个 dc http://docs.scylladb.com/procedures/create_cluster/ or multi dc http://docs.scylladb.com/procedures/create_cluster_multidc/

您需要在 scylla.yaml 上设置 rpc_address 并在通过 cql 连接时给您的 rpc_address 以及 cqlsh xx.xxx.xxx.xx 和 user/pass 如果启用。