无法从 yugabyte 数据库启动 redis-cli
Posted
技术标签:
【中文标题】无法从 yugabyte 数据库启动 redis-cli【英文标题】:unable to start redis-cli from yugabyte database 【发布时间】:2022-01-24 02:50:14 【问题描述】:我正在尝试通过关注https://docs.yugabyte.com/latest/yedis/quick-start/#linux 在 yugabyte 数据库上运行 redis/yedis。
我运行命令./bin/yb-ctl setup_redis
,但最终出现错误:
Setting up YugaByte DB support for Redis API.
Waiting for cluster to be ready.
Traceback (most recent call last):
File "./bin/yb-ctl", line 2104, in <module>
control.run()
File "./bin/yb-ctl", line 2081, in run
self.args.func()
File "./bin/yb-ctl", line 1967, in setup_redis_cmd_impl
self.wait_for_cluster_or_raise()
File "./bin/yb-ctl", line 1646, in wait_for_cluster_or_raise
if not self.wait_for_cluster():
File "./bin/yb-ctl", line 1591, in wait_for_cluster
cmd_list_tservers = self.yb_admin_cmd_list("list_all_tablet_servers")
File "./bin/yb-ctl", line 2036, in yb_admin_cmd_list
raise ValueError("Cannot form yb-admin command without knowing master addresses")
ValueError: Cannot form yb-admin command without knowing master addresses
Viewing file /tmp/tmpbg32mn95:
^^^ Encountered errors ^^^
2021-12-22 16:08:27,463 INFO: Waiting for master and tserver processes to come up.
运行命令后,我的 master 和 tserver 都在运行:
./bin/yb-master --flagfile master.conf >& /home/doug/mark/disk1/yb-master.out &
./bin/yb-tserver --flagfile tserver.conf >& /home/doug/mark/yb-tserver.out&
主配置文件:
--master_addresses=192.168.1.62:7100
--rpc_bind_addresses=192.168.1.62:7100
--fs_data_dirs=/home/doug/mark/disk1
tserver 配置文件:
--tserver_master_addrs=192.168.1.62:7100
--rpc_bind_addresses=192.168.1.62:9100
--start_pgsql_proxy
--pgsql_proxy_bind_address=192.168.1.62:5433
--cql_proxy_bind_address=192.168.1.62:9042
--fs_data_dirs=/home/doug/mark/disk1
在主日志中我可以看到:
I1223 00:08:03.023463 1527298 heartbeater.cc:340] P 419a60d5690945c8ad23c42f7ba758ba: Connected to a leader master server at 192.168.1.62:7100
I1223 00:08:03.023666 1527298 heartbeater.cc:388] P 419a60d5690945c8ad23c42f7ba758ba: Registering TS with master...
但是不知道为什么根据上面的教程链接无法启动redis-cli?
【问题讨论】:
【参考方案1】:由于您手动运行 yb-tserver 和 yb-master,请尝试运行以下命令:
./bin/yb-admin [-master_addresses server1:port,server2:port,server3:port,...] setup_redis_table
请注意,YEDIS API 不是焦点,它必须被视为用于新应用程序开发目的的已弃用 API。 (docs link)
【讨论】:
以上是关于无法从 yugabyte 数据库启动 redis-cli的主要内容,如果未能解决你的问题,请参考以下文章
如何将一个或多个节点添加到现有的YugaByte DB CE集群?