tarantoolctl connpool.lua:316:尝试索引字段'配置'(零值)

时间:2016-05-03 17:32:49

标签: tarantool

我在开始分片时遇到错误

tarantool和os的版本: ubuntu-16.04 LTS上的box.cfg { listen = 3301; slab_alloc_arena = 0.5; slab_alloc_minimal = 16; slab_alloc_maximal = 1048576; slab_alloc_factor = 1.06; snapshot_period = 0; snapshot_count = 6; panic_on_snap_error = true; panic_on_wal_error = true; rows_per_wal = 5000000; snap_io_rate_limit = nil; wal_mode = "none"; wal_dir_rescan_delay = 2.0; io_collect_interval = nil; readahead = 16320; log_level = 5; logger_nonblock = true; too_long_threshold = 0.5; } local function bootstrap() local space = box.schema.create_space('test') space:create_index('primary') box.schema.user.grant('guest', 'read,write,execute', 'universe') box.schema.user.create('test', { password = 'test' }) box.schema.user.grant('test', 'replication') box.schema.user.grant('test', 'read,write,execute', 'universe') end box.once('test-1.0', bootstrap) local shard = require('shard') local shards = { servers = { { uri = [[127.0.0.1:3301]]; zone = [[0]]; }; { uri = [[127.0.0.1:3302]]; zone = [[1]]; }; }; login = 'test'; password = 'test'; redundancy = 1; binary = '127.0.0.1:3301'; monitor = false; } shard.init(cfg)

配置文件中的

roman @ zotac-pc:〜$ egrep -v“^ [[:space:]] * - | ^ $”/ etc / tarantool / instances.enabled / test.lua

main/101/test I> Sharding initialization started...
main/101/test tarantoolctl:422 E> Start failed: /usr/share/tarantool/connpool.lua:316: attempt to index field 'configuration' (a nil value)
main C> entering the event loop

罗马@索泰-PC:〜$ 日志文件中的示例错误:

{{1}}

1 个答案:

答案 0 :(得分:2)

来自ubuntu包函数shard.init(cfg)的/etc/tarantool/../example.lua中的

需要重放shard.init(分片) 下面的代码工作正常:

local shard = require('shard')
local shards = {
    servers = {
        { uri = [[127.0.0.1:3301]]; zone = [[0]]; };
        { uri = [[127.0.0.1:3302]]; zone = [[1]]; };
    };
    login = 'test';
    password = 'test';
    redundancy = 1;
    binary = '127.0.0.1:3301';
    monitor = false;
}
shard.init(shards)