Search code examples
tarantool

How to get tarantool version from command line interface?


I can get tarantool client version using this command:

$ tarantool --version
Tarantool 2.5.2-50-g0cb9a4bba

but how can I get the tarantool server version inside the terminal?

tarantoolctl connect 3301                                          
connected to localhost:3301
localhost:3301>
---
- error: '[string "return version()"]:1: attempt to call global ''version'' (a nil
    value)'
...

Solution

  • There are several ways to obtain the version:

    tarantool> _TARANTOOL
    ---
    - 2.7.0-74-g71377c28e
    ...
    tarantool> require('tarantool').version
    ---
    - 2.7.0-74-g71377c28e
    ...
    tarantool> box.info.version -- only after box.cfg{<...>}
    ---
    - 2.7.0-74-g71377c28e
    ...