AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / dba / 问题 / 292013
Accepted
Kokizzu
Kokizzu
Asked: 2021-05-22 06:23:25 +0800 CST2021-05-22 06:23:25 +0800 CST 2021-05-22 06:23:25 +0800 CST

无法运行 Tarantool 复制

  • 772

我正在尝试从文档中重现 tarantool 主复制

所以我为每个目录制作了master/master.lua, rep1/rep1.lua, , cd 并运行它,但它显示了类似这样的内容(10 多分钟,没有进展):rep2/rep2.lua

@ /tmp/master
└─[0] <> tarantool master.lua
2021-05-21 21:12:43.941 [884153] main/103/master.lua C> Tarantool 2.7.2-14-ga308ba8e2
2021-05-21 21:12:43.941 [884153] main/103/master.lua C> log level 5
2021-05-21 21:12:43.941 [884153] main/103/master.lua I> wal/engine cleanup is paused
2021-05-21 21:12:43.941 [884153] main/103/master.lua I> mapping 268435456 bytes for memtx tuple arena...
2021-05-21 21:12:43.941 [884153] main/103/master.lua I> Actual slab_alloc_factor calculated on the basis of desired slab_alloc_factor = 1.044274
2021-05-21 21:12:43.941 [884153] main/103/master.lua I> mapping 134217728 bytes for vinyl tuple arena...
2021-05-21 21:12:43.942 [884153] main/103/master.lua I> instance uuid b78ffe3e-d8d3-4f98-b213-dae4ac0b6858
2021-05-21 21:12:43.942 [884153] iproto/101/main I> binary: bound to 0.0.0.0:13301
2021-05-21 21:12:43.942 [884153] main/103/master.lua I> connecting to 2 replicas
2021-05-21 21:12:43.942 [884153] main/111/applier/[email protected]:33301 I> can't connect to master
2021-05-21 21:12:43.942 [884153] main/111/applier/[email protected]:33301 coio.cc:108 !> SystemError connect, called on fd 17, aka 127.0.0.1:59352: Connection refused
2021-05-21 21:12:43.942 [884153] main/111/applier/[email protected]:33301 I> will retry every 1.00 second
2021-05-21 21:12:43.942 [884153] main/110/applier/[email protected]:23301 I> can't connect to master
2021-05-21 21:12:43.942 [884153] main/110/applier/[email protected]:23301 coio.cc:108 !> SystemError connect, called on fd 16, aka 127.0.0.1:49188: Connection refused
2021-05-21 21:12:43.942 [884153] main/110/applier/[email protected]:23301 I> will retry every 1.00 second
2021-05-21 21:12:45.944 [884153] main/110/applier/[email protected]:23301 I> remote master e242f602-6591-4eb5-9194-f64d7541ea67 at 127.0.0.1:23301 running Tarantool 2.7.2
2021-05-21 21:12:47.945 [884153] main/111/applier/[email protected]:33301 I> remote master 7d21d786-f0fa-440c-8b19-4c2f66fe47fe at 127.0.0.1:33301 running Tarantool 2.7.2
2021-05-21 21:12:47.945 [884153] main/103/master.lua I> connected to 2 replicas
2021-05-21 21:12:47.945 [884153] main/111/applier/[email protected]:33301 I> failed to authenticate
2021-05-21 21:12:47.945 [884153] main/111/applier/[email protected]:33301 box.cc:2381 E> ER_LOADING: Instance bootstrap hasn't finished yet
2021-05-21 21:12:47.945 [884153] main/111/applier/[email protected]:33301 I> will retry every 1.00 second

@ /tmp/rep1
└─[0] <> tarantool rep1.lua
2021-05-21 21:12:45.793 [884163] main/103/rep1.lua C> Tarantool 2.7.2-14-ga308ba8e2
2021-05-21 21:12:45.793 [884163] main/103/rep1.lua C> log level 5
2021-05-21 21:12:45.793 [884163] main/103/rep1.lua I> wal/engine cleanup is paused
2021-05-21 21:12:45.793 [884163] main/103/rep1.lua I> mapping 268435456 bytes for memtx tuple arena...
2021-05-21 21:12:45.793 [884163] main/103/rep1.lua I> Actual slab_alloc_factor calculated on the basis of desired slab_alloc_factor = 1.044274
2021-05-21 21:12:45.793 [884163] main/103/rep1.lua I> mapping 134217728 bytes for vinyl tuple arena...
2021-05-21 21:12:45.793 [884163] main/103/rep1.lua I> instance uuid e242f602-6591-4eb5-9194-f64d7541ea67
2021-05-21 21:12:45.793 [884163] iproto/101/main I> binary: bound to 0.0.0.0:23301
2021-05-21 21:12:45.793 [884163] main/103/rep1.lua I> connecting to 2 replicas
2021-05-21 21:12:45.794 [884163] main/111/applier/[email protected]:33301 I> can't connect to master
2021-05-21 21:12:45.794 [884163] main/111/applier/[email protected]:33301 coio.cc:108 !> SystemError connect, called on fd 17, aka 127.0.0.1:59388: Connection refused
2021-05-21 21:12:45.794 [884163] main/111/applier/[email protected]:33301 I> will retry every 1.00 second
2021-05-21 21:12:45.794 [884163] main/110/applier/[email protected]:13301 I> remote master b78ffe3e-d8d3-4f98-b213-dae4ac0b6858 at 127.0.0.1:13301 running Tarantool 2.7.2
2021-05-21 21:12:47.796 [884163] main/111/applier/[email protected]:33301 I> remote master 7d21d786-f0fa-440c-8b19-4c2f66fe47fe at 127.0.0.1:33301 running Tarantool 2.7.2
2021-05-21 21:12:47.796 [884163] main/103/rep1.lua I> connected to 2 replicas
2021-05-21 21:12:47.796 [884163] main/110/applier/[email protected]:13301 I> failed to authenticate
2021-05-21 21:12:47.796 [884163] main/110/applier/[email protected]:13301 box.cc:2381 E> ER_LOADING: Instance bootstrap hasn't finished yet
2021-05-21 21:12:47.796 [884163] main/110/applier/[email protected]:13301 I> will retry every 1.00 second

@ /tmp/rep2
└─[0] <> tarantool rep2.lua
2021-05-21 21:12:47.435 [884173] main/103/rep2.lua C> Tarantool 2.7.2-14-ga308ba8e2
2021-05-21 21:12:47.435 [884173] main/103/rep2.lua C> log level 5
2021-05-21 21:12:47.435 [884173] main/103/rep2.lua I> wal/engine cleanup is paused
2021-05-21 21:12:47.435 [884173] main/103/rep2.lua I> mapping 268435456 bytes for memtx tuple arena...
2021-05-21 21:12:47.435 [884173] main/103/rep2.lua I> Actual slab_alloc_factor calculated on the basis of desired slab_alloc_factor = 1.044274
2021-05-21 21:12:47.435 [884173] main/103/rep2.lua I> mapping 134217728 bytes for vinyl tuple arena...
2021-05-21 21:12:47.436 [884173] main/103/rep2.lua I> instance uuid 7d21d786-f0fa-440c-8b19-4c2f66fe47fe
2021-05-21 21:12:47.436 [884173] iproto/101/main I> binary: bound to 0.0.0.0:33301
2021-05-21 21:12:47.436 [884173] main/103/rep2.lua I> connecting to 2 replicas
2021-05-21 21:12:47.437 [884173] main/110/applier/[email protected]:13301 I> remote master b78ffe3e-d8d3-4f98-b213-dae4ac0b6858 at 127.0.0.1:13301 running Tarantool 2.7.2
2021-05-21 21:12:47.437 [884173] main/111/applier/[email protected]:23301 I> remote master e242f602-6591-4eb5-9194-f64d7541ea67 at 127.0.0.1:23301 running Tarantool 2.7.2
2021-05-21 21:12:47.437 [884173] main/103/rep2.lua I> connected to 2 replicas
2021-05-21 21:12:47.437 [884173] main/110/applier/[email protected]:13301 I> failed to authenticate
2021-05-21 21:12:47.437 [884173] main/110/applier/[email protected]:13301 box.cc:2381 E> ER_LOADING: Instance bootstrap hasn't finished yet
2021-05-21 21:12:47.437 [884173] main/110/applier/[email protected]:13301 I> will retry every 1.00 second

代码在这里:

master.lua

box.cfg{
  listen = 13301,
        replication = {'replicator:[email protected]:23301',  -- master URI
                 'replicator:[email protected]:33301'}, -- replica URI
  read_only = false
}
box.once("schema", function()
   box.schema.user.create('replicator', {password = 'password'})
   box.schema.user.grant('replicator', 'replication') -- grant replication role
   box.schema.space.create("test")
   box.space.test:create_index("primary")
   print('box.once executed on master')
end)

rep1.lua

box.cfg{
  listen = 23301,
  replication = {'replicator:[email protected]:13301',  -- master URI
                 'replicator:[email protected]:33301'}, -- replica URI
  read_only = true
}
box.once("schema", function()
   box.schema.user.create('replicator', {password = 'password'})
   box.schema.user.grant('replicator', 'replication') -- grant replication role
   box.schema.space.create("test")
   box.space.test:create_index("primary")
   print('box.once executed on replica 1')
end)

rep2.lua

box.cfg{
  listen = 33301,
  replication = {'replicator:[email protected]:13301',  -- master URI
                 'replicator:[email protected]:23301'}, -- replica URI
  read_only = true
}
box.once("schema", function()
   box.schema.user.create('replicator', {password = 'password'})
   box.schema.user.grant('replicator', 'replication') -- grant replication role
   box.schema.space.create("test")
   box.space.test:create_index("primary")
   print('box.once executed on replica 2')
end)

它出什么问题了?

replication tarantool
  • 1 1 个回答
  • 23 Views

1 个回答

  • Voted
  1. Best Answer
    Kokizzu
    2021-05-22T06:37:30+08:002021-05-22T06:37:30+08:00

    没关系,我不好,第一条复制线应该是主线,所以它应该是这样的:

            replication = {'replicator:[email protected]:13301',  -- master URI
                     'replicator:[email protected]:23301', -- replica URI
                     'replicator:[email protected]:33301'}, -- replica URI
    
    • 1

相关问题

  • 如何阻止 MySQL 从站将更改复制到“mysql”数据库?

  • 在同一台物理服务器上运行复制是不明智的吗?

  • 有没有办法以小于 1 秒的分辨率测量 MySQL 中的复制滞后?

  • 运行时间偏移延迟复制的最佳实践

  • PostgreSQL 9.0 Replication 和 Slony-I 有什么区别?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目

    • 12 个回答
  • Marko Smith

    如何让sqlplus的输出出现在一行中?

    • 3 个回答
  • Marko Smith

    选择具有最大日期或最晚日期的日期

    • 3 个回答
  • Marko Smith

    如何列出 PostgreSQL 中的所有模式?

    • 4 个回答
  • Marko Smith

    列出指定表的所有列

    • 5 个回答
  • Marko Smith

    如何在不修改我自己的 tnsnames.ora 的情况下使用 sqlplus 连接到位于另一台主机上的 Oracle 数据库

    • 4 个回答
  • Marko Smith

    你如何mysqldump特定的表?

    • 4 个回答
  • Marko Smith

    使用 psql 列出数据库权限

    • 10 个回答
  • Marko Smith

    如何从 PostgreSQL 中的选择查询中将值插入表中?

    • 4 个回答
  • Marko Smith

    如何使用 psql 列出所有数据库和表?

    • 7 个回答
  • Martin Hope
    Jin 连接到 PostgreSQL 服务器:致命:主机没有 pg_hba.conf 条目 2014-12-02 02:54:58 +0800 CST
  • Martin Hope
    Stéphane 如何列出 PostgreSQL 中的所有模式? 2013-04-16 11:19:16 +0800 CST
  • Martin Hope
    Mike Walsh 为什么事务日志不断增长或空间不足? 2012-12-05 18:11:22 +0800 CST
  • Martin Hope
    Stephane Rolland 列出指定表的所有列 2012-08-14 04:44:44 +0800 CST
  • Martin Hope
    haxney MySQL 能否合理地对数十亿行执行查询? 2012-07-03 11:36:13 +0800 CST
  • Martin Hope
    qazwsx 如何监控大型 .sql 文件的导入进度? 2012-05-03 08:54:41 +0800 CST
  • Martin Hope
    markdorison 你如何mysqldump特定的表? 2011-12-17 12:39:37 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 对 SQL 查询进行计时? 2011-06-04 02:22:54 +0800 CST
  • Martin Hope
    Jonas 如何从 PostgreSQL 中的选择查询中将值插入表中? 2011-05-28 00:33:05 +0800 CST
  • Martin Hope
    Jonas 如何使用 psql 列出所有数据库和表? 2011-02-18 00:45:49 +0800 CST

热门标签

sql-server mysql postgresql sql-server-2014 sql-server-2016 oracle sql-server-2008 database-design query-performance sql-server-2017

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve