Cocaine-runtime speaks: Unable to initialize the routing groups.

48 views
Skip to first unread message

Вячеслав Скрипка

unread,
May 28, 2015, 3:03:50 AM5/28/15
to rever...@googlegroups.com
Hi! Please explain me some trouble with cocained servers.
Seems Elleptics has started quite well.
Config:
{
       
"loggers": {
             
"type": "/dev/stderr",
             
"level": 4,
             
"root": [
                     
{
                             
"formatter": {
                                     
"type": "string",
                                     
"pattern": "[%(timestamp)s]: %(message)s [%(...L)s]"
                             
},
                             
"sink": {
                                     
"type": "files",
                                     
"path": "/dev/stdout",
                                     
"autoflush": true
                             
}
                     
}
           
],
           
"level": "debug"
       
},
       
"options": {
               
"join": true,
               
"flags": 20,
               
"address": [
                       
"localhost:1025:2-0",
                       
"10.0.84.122:1025:2-0"
               
],
               
"wait_timeout": 60,
               
"check_timeout": 60,
               
"io_thread_num": 16,
               
"nonblocking_io_thread_num": 16,
               
"net_thread_num": 4,
               
"daemon": false,
               
"auth_cookie": "qwerty",
               
"bg_ionice_class": 3,
               
"bg_ionice_prio": 0,
               
"server_net_prio": 1,
               
"client_net_prio": 6,
               
"cache": {
                       
"size": 68719476736
               
},
               
"indexes_shard_count": 2,
               
"monitor": {
                       
"port": 20000,
                       
"call_tree_timeout": 0
               
}
       
},
       
"backends": [
               
{
                       
"backend_id": 5,
                       
"cache": {
                               
"size": 0
                       
},
                       
"type": "blob",
                       
"group": 2,
                       
"history": "/opt/elliptics/history.1",
                       
"data": "/opt/elliptics/eblob.1/data",
                       
"sync": "-1",
                       
"blob_flags": "0",
                       
"blob_size": "10G",
                       
"records_in_blob": "1000000",
                       
"periodic_timeout": 15,
                       
"defrag_percentage": 10,
                       
"defrag_timeout": 3600
               
}
       
]
}
Output
2015-05-28 10:17:16.401679 0/3321/3321 ffffffff: Reopened log file
2015-05-28 10:17:16.402240 0/3321/3321 2: blob: start
2015-05-28 10:17:16.402407 0/3321/3321 2: blob: eblob_iterate_existing: finished.
2015-05-28 10:17:16.402872 0/3323/3321 2: blob: datasort_next_defrag: defrag: next datasort is sheduled to +18446744073709551615 seconds.
2015-05-28 10:17:16.402984 0/3321/3321 4: Stat: la: 0.000000 0.010000 0.050000, mem: total: 2049660, free: 1474188, cache: 0.
2015-05-28 10:17:16.403044 0/3321/3321 2: Elliptics starts
2015-05-28 10:17:16.403065 0/3321/3321 3: Using default check timeout (30 seconds).
2015-05-28 10:17:16.403075 0/3321/3321 3: Using default stall count (3 transactions).
2015-05-28 10:17:16.403935 0/3321/3321 2: Grew BLOCKING pool by: 0 -> 16 IO threads
2015-05-28 10:17:16.404653 0/3321/3321 2: Grew NONBLOCKING pool by: 0 -> 16 IO threads
2015-05-28 10:17:16.405139 0/3321/3321 4: New node has been created.
2015-05-28 10:17:16.405167 0/3321/3321 0: Monitor hasn't been initialized because monitor port is zero.
2015-05-28 10:17:16.405180 0/3321/3321 3: Stack size: 8388608 bytes
2015-05-28 10:17:16.405207 0/3321/3321 2: Successfully initialized notify hash table (256 entries).
2015-05-28 10:17:16.405230 0/3321/3321 3: No notify hash size provided, using default 256.
2015-05-28 10:17:16.405151 0/3362/3321 2: Started reconnection thread. Timeout: 60 seconds. Route table update every 60 seconds.
2015-05-28 10:17:16.407890 0/3321/3321 2: Server is now listening at 0.0.0.0:1025.
2015-05-28 10:17:16.407933 0/3321/3321 4: dnet_state_create: 0.0.0.0:1025: sockets: 9/10
2015-05-28 10:17:16.407952 0/3321/3321 2: 0.0.0.0:1025: client net TOS value set to 6
2015-05-28 10:17:16.407967 0/3321/3321 4: idc_create: group: 2: a885dddbee05 -> 0.0.0.0:1025
2015-05-28 10:17:16.407989 0/3321/3321 3: Initialized group: 2, total ids: 1, added ids: 1, received ids: 1, time-took: 25 usecs.
2015-05-28 10:17:16.408007 0/3321/3321 2: 0.0.0.0:1025: server net TOS value set to 1
2015-05-28 10:17:16.408019 0/3321/3321 3: 0.0.0.0:1025: copy addr: 127.0.0.1:1025, idx: -1
2015-05-28 10:17:16.408028 0/3321/3321 3: 0.0.0.0:1025: copy addr: 10.0.84.122:1025, idx: -1
2015-05-28 10:17:16.408036 0/3321/3321 2: srw: no config
2015-05-28 10:17:16.408046 0/3321/3321 4: New server node has been created at port 1025, ids: 1.

 

Second server is gateway node(or at least I hope so)
Config
{
   
"version": 2,
   
"paths": {
       
"plugins": "/usr/lib/cocaine",
       
"runtime": "/var/run/cocaine",
       
"spool": "/var/spool/cocaine"
   
},
   
"network": {
       
"group": "10.0.87.123",
       
"gateway": {
             
"type": "ipvs"
       
}
   
},
   
"services": {
       
"logging": {
           
"type": "logging"
       
},
       
"storage": {
           
"type": "elliptics",
           
"args": {
                 
"backend": "core"
           
}
       
},
       
"node": {
           
"type": "node",
           
"args": {
               
"runlist": "default"
           
}
       
}
   
},
   
"storages": {
       
"core":
       
{
           
"type": "elliptics",
           
"args":
           
{
               
"nodes": ["10.0.87.122:1025:2-0"],
               
"io-thread-num" : 8,
               
"wait-timeout" : 30,
               
"check-timeout" : 60,
               
"net-thread-num" : 8,
               
"groups" : [2],
               
"verbosity" : 2
           
}
       
}
   
},
   
"loggers": {
       
"core": {
           
"type": "syslog",
           
"args": {
               
"identity": "cocaine",
               
"verbosity": "info"
           
}
       
}
   
}
}

 

#cocaine-runtime -c /etc/cocaine/cocaine-default.conf.test
ERROR: unable to initialize the context - unable to initialize the routing groups - indexes_find: can't read data: No such device or address: -6.

Section storages has excess?
 
Elleptics wrote to output this is:
2015-05-28 10:41:34.244881 0/3473/3437 4: dnet_state_create: 10.0.87.123:34861: sockets: 11/12
2015-05-28 10:41:34.244977 0/3473/3437 2: 10.0.87.123:34861: client net TOS value set to 6
2015-05-28 10:41:34.244997 0/3473/3437 2: Accepted client 10.0.87.123:34861, socket: 11, server address: 10.0.87.122:1025, idx: -1.
2015-05-28 10:41:34.245018 0/3474/3437 4: 0:020000001900...000000000000: received trans: 0 / 0x0, reply: 0, size: 0, flags: 0x18, status: 0.
2015-05-28 10:41:34.245045 0/3474/3437 4: 10.0.87.123:34861: 0:020000001900...000000000000: RECV: REVERSE_LOOKUP: nonblocking: 1, cmd-size: 0, cflags: 0x18, trans: 0, reply: 0
2015-05-28 10:41:34.245079 0/3474/3437 2: input io queue report: elapsed: 45.654 s, current size: 1, min: -1, max: 1, volume: 1, noneblocking: 1
2015-05-28 10:41:34.245155 0/3457/3437 4: 10.0.87.123:34861: 0:020000001900...000000000000: got IO event: 0x7f08b00008e0: hsize: 108, dsize: 0, mode: NONBLOCKING
2015-05-28 10:41:34.245184 0/3457/3437 1: 0:020000001900...000000000000: could not find network state for request
2015-05-28 10:41:34.245210 0/3457/3437 2: 10.0.87.123:34861: reverse lookup command: network version: 2.25.6.10, local version: 2.25.6.10
2015-05-28 10:41:34.245223 0/3457/3437 2: 10.0.87.123:34861: reverse lookup command: client indexes shard count: 16, server indexes shard count: 2
2015-05-28 10:41:34.245237 0/3457/3437 3: 0.0.0.0:1025: filling route table: addr-to-be-sent: 127.0.0.1:1025, st->addrs: 0xaa6210
2015-05-28 10:41:34.245246 0/3457/3437 3: 0.0.0.0:1025: filling route table: addr-to-be-sent: 10.0.84.122:1025, st->addrs: 0xaa6210
2015-05-28 10:41:34.245258 0/3457/3437 2: 2:020000001900...000000000000: sending address 10.0.87.122:1025 -> 10.0.87.123:34861, addr_num: 2, time-took: 23
2015-05-28 10:41:34.245273 0/3457/3437 4: Incrementing counter: 27, err: 0, value is: 1 0.
2015-05-28 10:41:34.245336 0/3457/3437 2: 2:020000001900...000000000000: REVERSE_LOOKUP: client: 10.0.87.123:34861, trans: 0, cflags: 0x18, time: 128 usecs, err: 0.
2015-05-28 10:41:34.245318 0/3474/3437 4: 2:020000001900...000000000000: REVERSE_LOOKUP: sending -> 10.0.87.123:34861: trans: 0, size: 132, cflags: 0x10, start-sent: 0/240.
2015-05-28 10:41:34.245381 0/3474/3437 4: 2:020000001900...000000000000: REVERSE_LOOKUP: sending -> 10.0.87.123:34861: trans: 0, size: 132, cflags: 0x10, finish-sent: 240/240.
2015-05-28 10:41:34.245670 0/3474/3437 1: 10.0.87.123:34861: peer has disconnected, socket: 11/12.
2015-05-28 10:41:34.245696 0/3474/3437 1: 2:a885dddbee05...f7b7dab70285: addr: 127.0.0.1:1025, resetting state: 0x7f08b80008e0
2015-05-28 10:41:34.245708 0/3474/3437 1: 2:a885dddbee05...f7b7dab70285: addr: 127.0.0.1:1025, resetting state: 10.0.87.123:34861
2015-05-28 10:41:34.245733 0/3474/3437 1: 10.0.87.123:34861: resetting state: Connection reset by peer [-104]
2015-05-28 10:41:34.245767 0/3474/3437 2: Do not add reconnection addr: 10.0.87.123:34861, join state: 0x0.
2015-05-28 10:41:34.245798 0/3474/3437 3: 2:a885dddbee05...f7b7dab70285: addr: 127.0.0.1:1025, closing socket: 11
2015-05-28 10:41:34.245811 0/3474/3437 3: 2:a885dddbee05...f7b7dab70285: addr: 127.0.0.1:1025, closing socket: 12
2015-05-28 10:41:34.245877 0/3474/3437 3: Cleaned state 10.0.87.123:34861, transactions freed: 0
2015-05-28 10:41:34.245903 0/3474/3437 3: Freeing state 10.0.87.123:34861, socket: 11/12, addr-num: 0.

Please help me to configure, we really want to have your cacaine with elleptics and docer.
 




Evgeniy Polyakov

unread,
May 28, 2015, 11:13:28 AM5/28/15
to Вячеслав Скрипка, rever...@googlegroups.com
Hi

28.05.2015, 10:03, "Вячеслав Скрипка" <v.s.s...@gmail.com>:
> Hi! Please explain me some trouble with cocained servers.
> Seems Elleptics has started quite well.
> Config:
> {
>        "loggers": {
>               "type": "/dev/stderr",
>               "level": 4,
>               "root": [
>                      {
>                               "formatter": {
>                                       "type": "string",
>                                       "pattern": "[%(timestamp)s]: %(message)s [%(...L)s]"
>                               },
>                               "sink": {
>                                       "type": "files",
>                                       "path": "/dev/stdout",
>                                       "autoflush": true
>                              }
>                      }
>             ],
>             "level": "debug"
>         },
>         "options": {
>                 "join": true,
>                 "flags": 20,
>                 "address": [
>                         "localhost:1025:2-0",
>                         "10.0.84.122:1025:2-0"

These have to have different indexes, i.e.
localhost:1025:2-0
10.0.84.122:1025:2-1

otherwise only one address is used and cocaine can not connect to the second address,
thus following error occures

Вячеслав Скрипка

unread,
May 29, 2015, 2:58:58 AM5/29/15
to rever...@googlegroups.com, z...@ioremap.net
Thanks for You advice.
Has made the following changes:
                "address": [
                       
"10.0.84.122:1025:2-0"
               
],

10.0.84.122 it`s elleptics server adr and I want to connect standalone cocaine node from 10.0.84.123

Has made little change to cocaine-runtime conf at 10.0.84.123:
Remove section "network" and change "node" at storages/core section
    "storages": {
        "core":
        {
            "type": "elliptics",
            "args":
            {
                "nodes": ["10.0.87.122:1025:2-0"],
                "io-thread-num" : 8,
                "wait-timeout" : 30,
                "check-timeout" : 60,
                "net-thread-num" : 8,
                "groups" : [2],
                "verbosity" : 2
            }
        }
    },

I attach full conf, if you needed.

Same error has occurred.
ERROR: unable to initialize the context - unable to initialize the routing groups - indexes_find: can't read data: No such device or address: -6.

Elleptics told: 10.0.87.123:34903: resetting state: Connection reset by peer [-104]

You can tell where I was wrong?

четверг, 28 мая 2015 г., 19:13:28 UTC+4 пользователь Evgeniy Polyakov написал:
cocaine-runtime.txt
elleptics.txt

Evgeniy Polyakov

unread,
May 29, 2015, 3:59:48 AM5/29/15
to Вячеслав Скрипка, rever...@googlegroups.com
Hi

29.05.2015, 09:59, "Вячеслав Скрипка" <v.s.s...@gmail.com>:
> Thanks for You advice.
> Has made the following changes:
>                 "address": [
>                         "10.0.84.122:1025:2-0"
>                 ],
>
> 10.0.84.122 it`s elleptics server adr and I want to connect standalone cocaine node from 10.0.84.123
>
> Has made little change to cocaine-runtime conf at 10.0.84.123:
> Remove section "network" and change "node" at storages/core section
>     "storages": {
>         "core":
>         {
>             "type": "elliptics",
>             "args":
>             {
>                 "nodes": ["10.0.87.122:1025:2-0"],

This is elliptics address to connect, it is different from what you use in elliptics config above,
but it must be the same. Also, do not use '-0' here, it is only needed in elliptics config.
Reply all
Reply to author
Forward
0 new messages