задача: поставить модуль http для Tarantool.
у нас же замечательная официльная документация, да?
https://github.com/tarantool/http#installation делаем раз:
root@plvm-ptr:~# tarantoolctl rocks install tarantool-http
...
http scm-1 is now installed in /root/.rocks (license: BSD)
делаем два:
копипастим официальный пример
https://github.com/tarantool/http#working-with-stashesделаем три:
root@plvm-ptr:~# tarantool httpd.tnt
LuajitError: builtin/box/load_cfg.lua:512: Please call box.cfg{} first
stack traceback:
builtin/box/load_cfg.lua:512: in function '__index'
httpd.tnt:10: in main chunk
fatal error, exiting the event loop
ай, ну ладно.
наверное, в самую лучшую официальную документацию забыли добавить box.cfg{}. ничего, бывает. добавим. не страшно.
делаем четыре:
root@plvm-ptr:~# tarantool httpd.tnt
2020-09-23 14:54:57.790 [28153] main/101/httpd.tnt I> systemd: NOTIFY_SOCKET variable is empty, skipping
2020-09-23 14:54:57.791 [28153] main/101/httpd.tnt C> Tarantool 1.10.7-23-gbce52b355
2020-09-23 14:54:57.791 [28153] main/101/httpd.tnt C> log level 5
2020-09-23 14:54:57.792 [28153] main/101/httpd.tnt I> mapping 268435456 bytes for memtx tuple arena...
2020-09-23 14:54:57.792 [28153] main/101/httpd.tnt I> mapping 134217728 bytes for vinyl tuple arena...
2020-09-23 14:54:57.807 [28153] main/101/httpd.tnt I> instance uuid b290752f-b75c-43bf-ab17-190135c65e99
2020-09-23 14:54:57.807 [28153] main/101/httpd.tnt I> initializing an empty data directory
2020-09-23 14:54:57.809 [28153] main/101/httpd.tnt I> assigned id 1 to replica b290752f-b75c-43bf-ab17-190135c65e99
2020-09-23 14:54:57.810 [28153] main/101/httpd.tnt I> cluster uuid 306ec989-5bd3-441a-af54-ca6980b3c55f
2020-09-23 14:54:57.810 [28153] snapshot/101/main I> saving snapshot `./00000000000000000000.snap.inprogress'
2020-09-23 14:54:57.866 [28153] snapshot/101/main I> done
2020-09-23 14:54:57.867 [28153] main/101/httpd.tnt I> ready to accept requests
2020-09-23 14:54:57.867 [28153] main/107/checkpoint_daemon I> started
2020-09-23 14:54:57.867 [28153] main/107/checkpoint_daemon I> scheduled the next snapshot at Wed Sep 23 16:21:19 2020
2020-09-23 14:54:57.868 [28153] main utils.c:973 E> LuajitError: httpd.tnt:12: attempt to index field 'httpd' (a nil value)
2020-09-23 14:54:57.868 [28153] main F> fatal error, exiting the event loop