threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

runtime exception (in openresty?) when running tftexplorer test #85

Closed GlenDC closed 5 years ago

GlenDC commented 5 years ago

Branch Development Commit 66d19aa63df4afec52e07a664417f5e5db837006

Sandbox environment from a month ago, did pull now all to latest (as you can see on my commit hash), removed my docker container, did a fresh install, even tried to go into the container shell do delete all my BCDBs and redo the js_init generate, nothing allows me to run that test.

3BOTDEVEL:3bot:~:  kosmos -p 'j.threebot.package.tftexplorer.test()'
Tue 15 14:29:01 BCDBFactory.py       - 311 - bcdbfactory                        : new bcdb:tft_explorer
Tue 15 14:29:02 DBSQLite.py          -  91 - dbsqlite                           : RESET FOR KVS
Tue 15 14:29:02 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.circle.2
Tue 15 14:29:02 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.user.2
Tue 15 14:29:02 BCDB.py              -  87 - bcdb                               : BCDB INIT DONE:tft_explorer
Tue 15 14:29:02 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.transaction.1
Tue 15 14:29:02 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.wallet.1
Tue 15 14:29:02 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.chain.1
Tue 15 14:29:02 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.lock.1
Tue 15 14:29:02 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.transaction.1
Tue 15 14:29:02 BuilderBaseClass.py  - 288 - openresty                          : build profile path in:/tmp/builders/openresty/env.sh
Tue 15 14:29:02 lderSystemPackage.py -  64 - package                            : packages mdupdate
OK
+ cd /tmp/
+ . /sandbox/env.sh
++ export PBASE=/sandbox
++ PBASE=/sandbox
++ export PATH=/sandbox/bin:/bin:/usr/local/bin:/usr/bin:/bin:/root/.cargo/bin:/sandbox/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
++ PATH=/sandbox/bin:/bin:/usr/local/bin:/usr/bin:/bin:/root/.cargo/bin:/sandbox/bin:/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+++ uname
++ '[' Linux = Darwin ']'
+++ hostname
++ HOST=3bot
++ export HOST=3bot
++ HOST=3bot
++ '[' -e /sandbox/bin/python3.6 ']'
++ export PYTHONPATH=/sandbox/lib/jumpscale
++ PYTHONPATH=/sandbox/lib/jumpscale
++ unset PYTHONHOME
++ export 'PS1=3BOTDEVEL:3bot:\W: '
++ PS1='3BOTDEVEL:3bot:\W: '
++ export VIEWER=view
++ VIEWER=view
++ export LC_ALL=C.UTF-8
++ LC_ALL=C.UTF-8
++ export LANG=C.UTF-8
++ LANG=C.UTF-8
++ export LUALIB=/sandbox/openresty/lualib
++ LUALIB=/sandbox/openresty/lualib
++ export 'LUA_PATH=?.lua;/sandbox/openresty/lualib/?/init.lua;/sandbox/openresty/lualib/?.lua;/sandbox/openresty/lualib/?/?.lua;/sandbox/openresty/lualib/?/core.lua;/sandbox/openresty/lapis/?.lua'
++ LUA_PATH='?.lua;/sandbox/openresty/lualib/?/init.lua;/sandbox/openresty/lualib/?.lua;/sandbox/openresty/lualib/?/?.lua;/sandbox/openresty/lualib/?/core.lua;/sandbox/openresty/lapis/?.lua'
++ export 'LUA_CPATH=/sandbox/openresty/lualib/?.so;./?.so'
++ LUA_CPATH='/sandbox/openresty/lualib/?.so;./?.so'
++ export LAPIS_OPENRESTY=/sandbox/bin/openresty
++ LAPIS_OPENRESTY=/sandbox/bin/openresty
++ LC_ALL=en_US.UTF-8
++ export LC_ALL
++ LANG=en_US.UTF-8
++ export LANG
++ echo OK
+ apt-get update
Hit:1 http://ppa.launchpad.net/wireguard/wireguard/ubuntu bionic InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://mirror.unix-solutions.be/ubuntu bionic InRelease
Hit:5 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists...
Tue 15 14:29:05 BuilderBaseClass.py  - 288 - package                            : build profile path in:/tmp/builders/package/env.sh
Tue 15 14:29:05 lderSystemPackage.py - 121 - package                            : package install :build-essential libpcre3-dev libssl-dev zlib1g-dev
+ cd /tmp/
+ . /tmp/builders/package/env.sh
++ export LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export 'LDFLAGS=-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ LDFLAGS='-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ export CPPPATH=/usr/include
++ CPPPATH=/usr/include
++ export CPPFLAGS=-I/usr/include
++ CPPFLAGS=-I/usr/include
++ export PS1=PYTHONBUILDENV:
++ PS1=PYTHONBUILDENV:
++ export PYTHONHTTPSVERIFY=0
++ PYTHONHTTPSVERIFY=0
++ export LC_ALL=en_US.UTF-8
++ LC_ALL=en_US.UTF-8
++ export LANG=en_US.UTF-8
++ LANG=en_US.UTF-8
+ apt-get install build-essential libpcre3-dev libssl-dev zlib1g-dev -y
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version (12.4ubuntu1).
libpcre3-dev is already the newest version (2:8.39-9).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.4).
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
Tue 15 14:29:06 BuilderTools.py      - 216 - tools                              : curl -L 'https://openresty.org/download/openresty-1.13.6.2.tar.gz' -o '/tmp/jumpscale/openresty-1.13.6.2.tar.gz'   --connect-timeout 30 --retry 3 --retry-max-time 0
Tue 15 14:29:06 BuilderTools.py      - 751 - tools                              : curl -L 'https://openresty.org/download/openresty-1.13.6.2.tar.gz' -o '/tmp/jumpscale/openresty-1.13.6.2.tar.gz'   --connect-timeout 30 --retry 3 --retry-max-time 0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4527k  100 4527k    0     0   166k      0  0:00:27  0:00:27 --:--:--  154k
Tue 15 14:29:34 BuilderTools.py      - 248 - tools                              : file_expand:/tmp/jumpscale/openresty-1.13.6.2.tar.gz
Tue 15 14:29:34 BuilderTools.py      - 751 - tools                              : tar -C /tmp/builders/openresty/openresty -xzf /tmp/jumpscale/openresty-1.13.6.2.tar.gz
Tue 15 14:29:34 BuilderTools.py      - 751 - tools                              : cd /tmp/builders/openresty/openresty;find . -maxdepth 1 -type d
+ cd /tmp/
+ . /tmp/builders/openresty/env.sh
++ export LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export 'LDFLAGS=-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ LDFLAGS='-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ export CPPPATH=/usr/include
++ CPPPATH=/usr/include
++ export CPPFLAGS=-I/usr/include
++ CPPFLAGS=-I/usr/include
++ export PS1=PYTHONBUILDENV:
++ PS1=PYTHONBUILDENV:
++ export PYTHONHTTPSVERIFY=0
++ PYTHONHTTPSVERIFY=0
++ export LC_ALL=en_US.UTF-8
++ LC_ALL=en_US.UTF-8
++ export LANG=en_US.UTF-8
++ LANG=en_US.UTF-8
+ cd /tmp/builders/openresty/openresty
+ mkdir -p /sandbox/var/pid
+ mkdir -p /sandbox/var/log
+ ./configure '--with-cc-opt=-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/' '--with-ld-opt=-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/' --prefix=/sandbox/openresty --sbin-path=/sandbox/bin/openresty --modules-path=/sandbox/lib --pid-path=/sandbox/var/pid/openresty.pid --error-log-path=/sandbox/var/log/openresty.log --lock-path=/sandbox/var/nginx.lock --conf-path=/sandbox/cfg/nginx/openresty.cfg -j8
platform: linux (linux)
cp -rp bundle/ build
cd build
cd LuaJIT-2.1-20180420
INFO: found -msse4.2 in cc.
make -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/sandbox/openresty/luajit
==== Building LuaJIT 2.1.0-beta3 ====
make -C src
make[1]: Entering directory '/tmp/builders/openresty/openresty/build/LuaJIT-2.1-20180420/src'
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
make[1]: Leaving directory '/tmp/builders/openresty/openresty/build/LuaJIT-2.1-20180420/src'
Makefile:112: recipe for target 'default' failed
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
Makefile:268: *** Unsupported target architecture.  Stop.
make: *** [default] Error 2
ERROR: failed to run command: make -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/sandbox/openresty/luajit
Tue 15 14:29:35 core/InstallTools.py -2306 - execute                            : EXCEPTION: 

    Could not execute: 'bash /tmp/builder_openresty.sh'stdout:
        platform: linux (linux)
        cp -rp bundle/ build
        cd build
        cd LuaJIT-2.1-20180420
        INFO: found -msse4.2 in cc.
        make -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc
            PREFIX=/sandbox/openresty/luajit
        ==== Building LuaJIT 2.1.0-beta3 ====
        make -C src
        make[1]: Entering directory '/tmp/builders/openresty/openresty/build/LuaJIT-2.1-20180420/src'
        make[1]: Leaving directory '/tmp/builders/openresty/openresty/build/LuaJIT-2.1-20180420/src'
        Makefile:112: recipe for target 'default' failed

    stderr:
        + cd /tmp/
        + . /tmp/builders/openresty/env.sh
        ++ export LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
        ++ LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
        ++ export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
        ++ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
        ++ export 'LDFLAGS=-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
        ++ LDFLAGS='-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
        ++ export CPPPATH=/usr/include
        ++ CPPPATH=/usr/include
        ++ export CPPFLAGS=-I/usr/include
        ++ CPPFLAGS=-I/usr/include
        ++ export PS1=PYTHONBUILDENV:
        ++ PS1=PYTHONBUILDENV:
        ++ export PYTHONHTTPSVERIFY=0
        ++ PYTHONHTTPSVERIFY=0
        ++ export LC_ALL=en_US.UTF-8
        ++ LC_ALL=en_US.UTF-8
        ++ export LANG=en_US.UTF-8
        ++ LANG=en_US.UTF-8
        + cd /tmp/builders/openresty/openresty
        + mkdir -p /sandbox/var/pid
        + mkdir -p /sandbox/var/log
        + ./configure '--with-cc-opt=-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/' '--with-ld-
            opt=-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/' --prefix=/sandbox/openresty --sbin-
            path=/sandbox/bin/openresty --modules-path=/sandbox/lib --pid-path=/sandbox/var/pid/openresty.pid --error-log-
            path=/sandbox/var/log/openresty.log --lock-path=/sandbox/var/nginx.lock --conf-
        path=/sandbox/cfg/nginx/openresty.cfg
            -j8
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        Makefile:268: *** Unsupported target architecture.  Stop.
        make: *** [default] Error 2
        ERROR: failed to run command: make -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2'
        CC=cc
            PREFIX=/sandbox/openresty/luajit
--TRACEBACK------------------
<string> in <module>
    1    
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in test
    36    gedis_cli = self.client_get()
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in client_get
    15    self.client = j.servers.threebot.local_start_default()
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreeBotServersFactory.py in local_start_default
    57    self.install()
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreeBotServersFactory.py in install
    35    j.servers.openresty.install()
/sandbox/lib/jumpscale/Jumpscale/servers/openresty/OpenRestyFactory.py in install
    33    j.builders.web.openresty.install()
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in wrapper_action
    163    builder.build()
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in wrapper_action
    178    res = self.apply_method(func, kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in apply_method
    93    return func(**kwargs)
/sandbox/lib/jumpscale/JumpscaleBuilders/web/BuilderOpenResty.py in build
    47    self._execute(C)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in _execute
    387    retry=retry,
/sandbox/lib/jumpscale/Jumpscale/sal/process/SystemProcess.py in execute
    110    retry=retry,
/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py in execute
    2306    raise Tools.exceptions.Base(msg)
-----------------------------

Tue 15 14:29:36 BCDB.py              - 338 - bcdb                               : DATAPROCESSOR & SQLITE STOPPED OK
zgorizzo69 commented 5 years ago

can't reproduce but I have a different error ... Step to reproduce on my ubuntu 18

netstat -ldp get me that image

image

zgorizzo69 commented 5 years ago

same with

echo "CLEARING ALL BCDB"
kosmos 'j.data.bcdb.destroy_all()'
pkill redis -9
pkill redis-server -9
kosmos 'j.application.bcdb_system_destroy()'
echo "CLEARING OK
GlenDC commented 5 years ago

I tried to follow the advice of @zgorizzo69.

First:

$ pip3 install bottle_websocket
Requirement already satisfied: bottle_websocket in /usr/local/lib/python3.6/dist-packages
Requirement already satisfied: gevent-websocket in /usr/local/lib/python3.6/dist-packages (from bottle_websocket)
Requirement already satisfied: bottle in /usr/local/lib/python3.6/dist-packages (from bottle_websocket)
Requirement already satisfied: gevent in /usr/local/lib/python3.6/dist-packages (from gevent-websocket->bottle_websocket)
Requirement already satisfied: greenlet>=0.4.14; platform_python_implementation == "CPython" in /usr/local/lib/python3.6/dist-packages (from gevent->gevent-websocket->bottle_websocket)

Clearly that was not needed, as all was satisfied already.

Secondly:

3BOTDEVEL:3bot:~: kosmos 'j.data.bcdb.destroy_all()'
Tue 15 20:06:09 DBSQLite.py          -  91 - dbsqlite                           : RESET FOR KVS
3BOTDEVEL:3bot:~: pkill redis -9
3BOTDEVEL:3bot:~: pkill redis-server -9
3BOTDEVEL:3bot:~: kosmos 'j.application.bcdb_system_destroy()'
Reading package lists...
Building dependency tree...
Reading state information...
redis-server is already the newest version (5:4.0.9-1ubuntu0.2).
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
sysctl: setting key "vm.overcommit_memory": Read-only file system
5468:C 15 Oct 20:06:31.118 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5468:C 15 Oct 20:06:31.118 # Redis version=4.0.9, bits=64, commit=00000000, modified=0, pid=5468, just started
5468:C 15 Oct 20:06:31.118 # Configuration loaded
Tue 15 20:06:31 DBSQLite.py          -  91 - dbsqlite                           : RESET FOR KVS
Tue 15 20:06:31 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.circle.2
Tue 15 20:06:31 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.user.2
Tue 15 20:06:31 BCDB.py              -  87 - bcdb                               : BCDB INIT DONE:system
Tue 15 20:06:31 BCDB.py              - 394 - bcdb                               : STOP BCDB
Tue 15 20:06:31 BCDB.py              - 338 - bcdb                               : DATAPROCESSOR & SQLITE STOPPED OK
Tue 15 20:06:31 DBSQLite.py          -  91 - dbsqlite                           : RESET FOR KVS

Sadly, running kosmos -p 'j.threebot.package.tftexplorer.test()' still results in the same error:

3BOTDEVEL:3bot:~:  kosmos -p 'j.threebot.package.tftexplorer.test()'
Tue 15 20:06:41 BCDBFactory.py       - 311 - bcdbfactory                        : new bcdb:tft_explorer
Tue 15 20:06:41 DBSQLite.py          -  91 - dbsqlite                           : RESET FOR KVS
Tue 15 20:06:42 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.circle.2
Tue 15 20:06:42 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.user.2
Tue 15 20:06:42 BCDB.py              -  87 - bcdb                               : BCDB INIT DONE:tft_explorer
Tue 15 20:06:42 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.transaction.1
Tue 15 20:06:42 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.wallet.1
Tue 15 20:06:42 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.chain.1
Tue 15 20:06:42 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.lock.1
Tue 15 20:06:42 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.transaction.1
Tue 15 20:06:42 BuilderBaseClass.py  - 288 - openresty                          : build profile path in:/tmp/builders/openresty/env.sh
Tue 15 20:06:42 BuilderBaseClass.py  - 147 - package                            : no need to do: package:{}, was already done
Tue 15 20:06:42 BuilderBaseClass.py  - 147 - package                            : no need to do: package:{'packages': 'build-essential libpcre3-dev libssl-dev zlib1g-dev'}, was already done
Tue 15 20:06:42 BuilderTools.py      - 216 - tools                              : curl -L 'https://openresty.org/download/openresty-1.13.6.2.tar.gz' -o '/tmp/jumpscale/openresty-1.13.6.2.tar.gz'   --connect-timeout 30 --retry 3 --retry-max-time 0
Tue 15 20:06:42 BuilderTools.py      - 751 - tools                              : curl -L 'https://openresty.org/download/openresty-1.13.6.2.tar.gz' -o '/tmp/jumpscale/openresty-1.13.6.2.tar.gz'   --connect-timeout 30 --retry 3 --retry-max-time 0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4527k  100 4527k    0     0  2048k      0  0:00:02  0:00:02 --:--:-- 2048k
Tue 15 20:06:44 BuilderTools.py      - 248 - tools                              : file_expand:/tmp/jumpscale/openresty-1.13.6.2.tar.gz
Tue 15 20:06:45 BuilderTools.py      - 751 - tools                              : tar -C /tmp/builders/openresty/openresty -xzf /tmp/jumpscale/openresty-1.13.6.2.tar.gz
Tue 15 20:06:45 BuilderTools.py      - 751 - tools                              : cd /tmp/builders/openresty/openresty;find . -maxdepth 1 -type d
+ cd /tmp/
+ . /tmp/builders/openresty/env.sh
++ export LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export 'LDFLAGS=-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ LDFLAGS='-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ export CPPPATH=/usr/include
++ CPPPATH=/usr/include
++ export CPPFLAGS=-I/usr/include
++ CPPFLAGS=-I/usr/include
++ export PS1=PYTHONBUILDENV:
++ PS1=PYTHONBUILDENV:
++ export PYTHONHTTPSVERIFY=0
++ PYTHONHTTPSVERIFY=0
++ export LC_ALL=en_US.UTF-8
++ LC_ALL=en_US.UTF-8
++ export LANG=en_US.UTF-8
++ LANG=en_US.UTF-8
+ cd /tmp/builders/openresty/openresty
+ mkdir -p /sandbox/var/pid
+ mkdir -p /sandbox/var/log
+ ./configure '--with-cc-opt=-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/' '--with-ld-opt=-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/' --prefix=/sandbox/openresty --sbin-path=/sandbox/bin/openresty --modules-path=/sandbox/lib --pid-path=/sandbox/var/pid/openresty.pid --error-log-path=/sandbox/var/log/openresty.log --lock-path=/sandbox/var/nginx.lock --conf-path=/sandbox/cfg/nginx/openresty.cfg -j8
platform: linux (linux)
cp -rp bundle/ build
cd build
cd LuaJIT-2.1-20180420
INFO: found -msse4.2 in cc.
make -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/sandbox/openresty/luajit
==== Building LuaJIT 2.1.0-beta3 ====
make -C src
make[1]: Entering directory '/tmp/builders/openresty/openresty/build/LuaJIT-2.1-20180420/src'
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
make[1]: Leaving directory '/tmp/builders/openresty/openresty/build/LuaJIT-2.1-20180420/src'
Makefile:112: recipe for target 'default' failed
In file included from lj_arch.h:9:0:
lua.h:12:10: fatal error: stdarg.h: No such file or directory
 #include <stdarg.h>
          ^~~~~~~~~~
compilation terminated.
Makefile:268: *** Unsupported target architecture.  Stop.
make: *** [default] Error 2
ERROR: failed to run command: make -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc PREFIX=/sandbox/openresty/luajit
Tue 15 20:06:46 core/InstallTools.py -2306 - execute                            : EXCEPTION: 

    Could not execute: 'bash /tmp/builder_openresty.sh'stdout:
        platform: linux (linux)
        cp -rp bundle/ build
        cd build
        cd LuaJIT-2.1-20180420
        INFO: found -msse4.2 in cc.
        make -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2' CC=cc
            PREFIX=/sandbox/openresty/luajit
        ==== Building LuaJIT 2.1.0-beta3 ====
        make -C src
        make[1]: Entering directory '/tmp/builders/openresty/openresty/build/LuaJIT-2.1-20180420/src'
        make[1]: Leaving directory '/tmp/builders/openresty/openresty/build/LuaJIT-2.1-20180420/src'
        Makefile:112: recipe for target 'default' failed

    stderr:
        + cd /tmp/
        + . /tmp/builders/openresty/env.sh
        ++ export LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
        ++ LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
        ++ export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
        ++ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
        ++ export 'LDFLAGS=-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
        ++ LDFLAGS='-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
        ++ export CPPPATH=/usr/include
        ++ CPPPATH=/usr/include
        ++ export CPPFLAGS=-I/usr/include
        ++ CPPFLAGS=-I/usr/include
        ++ export PS1=PYTHONBUILDENV:
        ++ PS1=PYTHONBUILDENV:
        ++ export PYTHONHTTPSVERIFY=0
        ++ PYTHONHTTPSVERIFY=0
        ++ export LC_ALL=en_US.UTF-8
        ++ LC_ALL=en_US.UTF-8
        ++ export LANG=en_US.UTF-8
        ++ LANG=en_US.UTF-8
        + cd /tmp/builders/openresty/openresty
        + mkdir -p /sandbox/var/pid
        + mkdir -p /sandbox/var/log
        + ./configure '--with-cc-opt=-I/usr/local/opt/openssl/include/ -I/usr/local/opt/pcre/include/' '--with-ld-
            opt=-L/usr/local/opt/openssl/lib/ -L/usr/local/opt/pcre/lib/' --prefix=/sandbox/openresty --sbin-
            path=/sandbox/bin/openresty --modules-path=/sandbox/lib --pid-path=/sandbox/var/pid/openresty.pid --error-log-
            path=/sandbox/var/log/openresty.log --lock-path=/sandbox/var/nginx.lock --conf-
        path=/sandbox/cfg/nginx/openresty.cfg
            -j8
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        In file included from lj_arch.h:9:0:
        lua.h:12:10: fatal error: stdarg.h: No such file or directory
         #include <stdarg.h>
                  ^~~~~~~~~~
        compilation terminated.
        Makefile:268: *** Unsupported target architecture.  Stop.
        make: *** [default] Error 2
        ERROR: failed to run command: make -j8 TARGET_STRIP=@: CCDEBUG=-g XCFLAGS='-DLUAJIT_ENABLE_LUA52COMPAT -msse4.2'
        CC=cc
            PREFIX=/sandbox/openresty/luajit
--TRACEBACK------------------
<string> in <module>
    1    
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in test
    36    gedis_cli = self.client_get()
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in client_get
    15    self.client = j.servers.threebot.local_start_default()
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreeBotServersFactory.py in local_start_default
    57    self.install()
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreeBotServersFactory.py in install
    35    j.servers.openresty.install()
/sandbox/lib/jumpscale/Jumpscale/servers/openresty/OpenRestyFactory.py in install
    33    j.builders.web.openresty.install()
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in wrapper_action
    163    builder.build()
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in wrapper_action
    178    res = self.apply_method(func, kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in apply_method
    93    return func(**kwargs)
/sandbox/lib/jumpscale/JumpscaleBuilders/web/BuilderOpenResty.py in build
    47    self._execute(C)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/BuilderBaseClass.py in _execute
    387    retry=retry,
/sandbox/lib/jumpscale/Jumpscale/sal/process/SystemProcess.py in execute
    110    retry=retry,
/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py in execute
    2306    raise Tools.exceptions.Base(msg)
-----------------------------

Tue 15 20:06:47 BCDB.py              - 338 - bcdb                               : DATAPROCESSOR & SQLITE STOPPED OK
xmonader commented 5 years ago

@GlenDC Sure you libclang-dev deps?

GlenDC commented 5 years ago

I am what now? It's a container creater by JSX to run JSX, for sure you would expect it configures and install everything...

xmonader commented 5 years ago

I am what now? It's a container creater by JSX to run JSX, for sure you would expect it configures and install everything...

Indeed it should be bundled and everything to work out of the box, I'm asking if it's already installed or not, because there was a problem with libclang yesterday and I'm suspecting that it might be the reason.

execute find / -name 'stdarg.h' in the container and if it's not there try apt install libclang-dev

GlenDC commented 5 years ago

Installed it already based on your previous comment.

Did indeed still need to install it. Yet I am still stuck on the same error.

xmonader commented 5 years ago

I just ran your package

...
Tue 15 20:23:31 Capnp.py             - 127 - systemfs                           : Write file /sandbox/var/capnp/schema_fec98f15f264a907.capnp
Tue 15 20:23:31 JSBase.py            - 142 - d.02630ccb4c462a5346babeec4616d90f : ***CLASS INIT 1: jsxobject2
Tue 15 20:23:32 FTExplorerFactory.py -  19 - client_get                         : EXCEPTION: 
    TypeError("package_add() got multiple values for argument 'git_url'",)
--TRACEBACK------------------
<string> in <module>
    1    
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in test
    36    gedis_cli = self.client_get()
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in client_get
    19    git_url="https://github.com/threefoldtech/jumpscaleX_threebot/tree/master/ThreeBotPackages/threefold/tft_explorer",
-----------------------------

but my installation is bit old, Indeed it's a problem on your installation. Please make sure you have pulled all of jumpscaleX repos, clear your bcdb, jsx generate and try again if the problem still happens I can help you in the morning

GlenDC commented 5 years ago

I did all of that already, didn't help. Also it's not my package.

Seems like it is also broken on your install though, despite being for a different reason.

rkhamis commented 5 years ago

Issue was that it was an old config in /sandbox/var/containers/3bot/docker_config.toml, after deleting this file or using --scratch the new image is used.

I also updated the package itself. and seems the tests pass. @GlenDC please confirm that all is well

GlenDC commented 5 years ago

Did the following three steps:

  1. pull latest on development of all repos
  2. run ./install/jsx.py containers-reset
  3. run ./install/jsx.py container-install --scratch

Afterwards I went into the kosmos using ./install/jsx.py container-kosmos and confirmed a successful installation.

Finally I went into the shell using ./install/jsx.py container-shell and ran the test again which started this issue, kosmos -p 'j.threebot.package.tftexplorer.test()'. It gets a lot further, but now I am blocked on a redis related error.

Here is the last part of the output I received from running the test command:

...

resty/auto-ssl/ssl_providers/lets_encrypt.lua
resty/auto-ssl/storage_adapters/
resty/auto-ssl/storage_adapters/file.lua
resty/auto-ssl/storage_adapters/redis.lua
resty/auto-ssl/utils/
resty/auto-ssl/utils/parse_openssl_time.lua
resty/auto-ssl/utils/random_seed.lua
resty/auto-ssl/utils/shell_execute.lua
resty/auto-ssl/utils/shuffle_table.lua
resty/auto-ssl/utils/start_sockproc.lua
resty/auto-ssl/vendor/
resty/auto-ssl/vendor/shell.lua
resty/redis/
resty/redis/connector.lua
resty/redis/sentinel.lua
resty/repl/
resty/repl/binding.lua
resty/repl/compiler.lua
resty/repl/completer.lua
resty/repl/formatter.lua
resty/repl/readline.lua
resty/repl/readline_stub.lua
resty/repl/readline_utils.lua
resty/repl/sources.lua
resty/repl/ui.lua
resty/session/
resty/session/ciphers/
resty/session/ciphers/aes.lua
resty/session/ciphers/none.lua
resty/session/encoders/
resty/session/encoders/base16.lua
resty/session/encoders/base64.lua
resty/session/encoders/hex.lua
resty/session/hmac/
resty/session/hmac/sha1.lua
resty/session/identifiers/
resty/session/identifiers/random.lua
resty/session/serializers/
resty/session/serializers/json.lua
resty/session/storage/
resty/session/storage/cookie.lua
resty/session/storage/memcache.lua
resty/session/storage/memcached.lua
resty/session/storage/redis.lua
resty/session/storage/shm.lua
resty/session/strategies/
resty/session/strategies/default.lua
resty/session/strategies/regenerate.lua
socket/
socket/ftp.lua
socket/headers.lua
socket/http.lua
socket/smtp.lua
socket/tp.lua
socket/url.lua

sent 1,913,242 bytes  received 6,712 bytes  3,839,908.00 bytes/sec
total size is 1,888,556  speedup is 0.98
Wed 16 20:08:42 BuilderTools.py      - 751 - tools                              : rsync -rav /sandbox/openresty/luarocks/lib/lua/5.1/  /sandbox/openresty/lualib/
sending incremental file list
_openssl.so
cjson.so
geoip.so
lfs.so
libcppjwt.so
lpeg.so
geoip/
geoip/city.so
geoip/country.so
mime/
mime/core.so
socket/core.so
socket/serial.so
socket/unix.so

sent 846,027 bytes  received 257 bytes  1,692,568.00 bytes/sec
total size is 844,920  speedup is 1.00
/sandbox/openresty/luarocks/lib/luarocks/rocks-5.1/lapis/1.7.0-1/bin /tmp
/tmp
/sandbox/openresty/luarocks/lib/luarocks/rocks-5.1/moonscript/0.5.0-1/bin /tmp
/tmp
+ cd /tmp/
+ . /tmp/builders/lua/env.sh
++ export LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export 'LDFLAGS=-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ LDFLAGS='-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ export CPPPATH=/usr/include
++ CPPPATH=/usr/include
++ export CPPFLAGS=-I/usr/include
++ CPPFLAGS=-I/usr/include
++ export PS1=PYTHONBUILDENV:
++ PS1=PYTHONBUILDENV:
++ export PYTHONHTTPSVERIFY=0
++ PYTHONHTTPSVERIFY=0
++ export LC_ALL=en_US.UTF-8
++ LC_ALL=en_US.UTF-8
++ export LANG=en_US.UTF-8
++ LANG=en_US.UTF-8
++ export LUALIB=/sandbox/openresty/lualib
++ LUALIB=/sandbox/openresty/lualib
++ export 'LUA_PATH=?.lua;/sandbox/openresty/lualib/?/init.lua;/sandbox/openresty/lualib/?.lua;/sandbox/openresty/lualib/?/?.lua;/sandbox/openresty/lualib/?/core.lua;/sandbox/openresty/lapis/?.lua;/tmp/builders/lua/luarocks/lua_modules/share/lua/5.1/?.lua;/sandbox/openresty/luarocks/share/lua/5.1/?.lua;/sandbox/openresty/luarocks/share/lua/5.1/?/init.lua;./?.lua;/sandbox/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/sandbox/openresty/luajit/share/lua/5.1/?.lua;/sandbox/openresty/luajit/share/lua/5.1/?/init.lua;'
++ LUA_PATH='?.lua;/sandbox/openresty/lualib/?/init.lua;/sandbox/openresty/lualib/?.lua;/sandbox/openresty/lualib/?/?.lua;/sandbox/openresty/lualib/?/core.lua;/sandbox/openresty/lapis/?.lua;/tmp/builders/lua/luarocks/lua_modules/share/lua/5.1/?.lua;/sandbox/openresty/luarocks/share/lua/5.1/?.lua;/sandbox/openresty/luarocks/share/lua/5.1/?/init.lua;./?.lua;/sandbox/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/sandbox/openresty/luajit/share/lua/5.1/?.lua;/sandbox/openresty/luajit/share/lua/5.1/?/init.lua;'
++ export 'LUA_CPATH=/sandbox/openresty/lualib/?.so/tmp/builders/lua/luarocks/lua_modules/lib/lua/5.1/?.so;/sandbox/openresty/luarocks/lib/lua/5.1/?.so;/sandbox/openresty/lualib/?.so;./?.so'
++ LUA_CPATH='/sandbox/openresty/lualib/?.so/tmp/builders/lua/luarocks/lua_modules/lib/lua/5.1/?.so;/sandbox/openresty/luarocks/lib/lua/5.1/?.so;/sandbox/openresty/lualib/?.so;./?.so'
++ export LUA_INCDIR=/sandbox/openresty/luajit/include/luajit-2.1
++ LUA_INCDIR=/sandbox/openresty/luajit/include/luajit-2.1
++ export PATH=/tmp/builders/lua/luarocks/lua_modules/bin:/root/.luarocks/bin:/sandbox/openresty/luarocks/bin:/sandbox/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
++ PATH=/tmp/builders/lua/luarocks/lua_modules/bin:/root/.luarocks/bin:/sandbox/openresty/luarocks/bin:/sandbox/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
+ ln -sf /sandbox/openresty/luarocks/bin/resty-auto-ssl/ /sandbox/openresty/resty-auto-ssl
+ ln -sf /sandbox/openresty/luarocks/bin/resty-auto-ssl/ /bin/resty-auto-ssl
+ mkdir -p /etc/resty-auto-ssl/storage/file
Wed 16 20:08:43 Unix.py              - 429 - unixsystem                         : Group [www] does not exist, creating an entry
Wed 16 20:08:43 Unix.py              - 394 - unixsystem                         : User [www] does not exist, creating an entry
+ cd /tmp/
+ . /tmp/builders/lua/env.sh
++ export LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib:/usr/local/lib:/usr/lib
++ export 'LDFLAGS=-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ LDFLAGS='-L/lib/x86_64-linux-gnu -L/lib -L/usr/local/lib -L/usr/lib'
++ export CPPPATH=/usr/include
++ CPPPATH=/usr/include
++ export CPPFLAGS=-I/usr/include
++ CPPFLAGS=-I/usr/include
++ export PS1=PYTHONBUILDENV:
++ PS1=PYTHONBUILDENV:
++ export PYTHONHTTPSVERIFY=0
++ PYTHONHTTPSVERIFY=0
++ export LC_ALL=en_US.UTF-8
++ LC_ALL=en_US.UTF-8
++ export LANG=en_US.UTF-8
++ LANG=en_US.UTF-8
++ export LUALIB=/sandbox/openresty/lualib
++ LUALIB=/sandbox/openresty/lualib
++ export 'LUA_PATH=?.lua;/sandbox/openresty/lualib/?/init.lua;/sandbox/openresty/lualib/?.lua;/sandbox/openresty/lualib/?/?.lua;/sandbox/openresty/lualib/?/core.lua;/sandbox/openresty/lapis/?.lua;/tmp/builders/lua/luarocks/lua_modules/share/lua/5.1/?.lua;/sandbox/openresty/luarocks/share/lua/5.1/?.lua;/sandbox/openresty/luarocks/share/lua/5.1/?/init.lua;./?.lua;/sandbox/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/sandbox/openresty/luajit/share/lua/5.1/?.lua;/sandbox/openresty/luajit/share/lua/5.1/?/init.lua;'
++ LUA_PATH='?.lua;/sandbox/openresty/lualib/?/init.lua;/sandbox/openresty/lualib/?.lua;/sandbox/openresty/lualib/?/?.lua;/sandbox/openresty/lualib/?/core.lua;/sandbox/openresty/lapis/?.lua;/tmp/builders/lua/luarocks/lua_modules/share/lua/5.1/?.lua;/sandbox/openresty/luarocks/share/lua/5.1/?.lua;/sandbox/openresty/luarocks/share/lua/5.1/?/init.lua;./?.lua;/sandbox/openresty/luajit/share/luajit-2.1.0-beta3/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/sandbox/openresty/luajit/share/lua/5.1/?.lua;/sandbox/openresty/luajit/share/lua/5.1/?/init.lua;'
++ export 'LUA_CPATH=/sandbox/openresty/lualib/?.so/tmp/builders/lua/luarocks/lua_modules/lib/lua/5.1/?.so;/sandbox/openresty/luarocks/lib/lua/5.1/?.so;/sandbox/openresty/lualib/?.so;./?.so'
++ LUA_CPATH='/sandbox/openresty/lualib/?.so/tmp/builders/lua/luarocks/lua_modules/lib/lua/5.1/?.so;/sandbox/openresty/luarocks/lib/lua/5.1/?.so;/sandbox/openresty/lualib/?.so;./?.so'
++ export LUA_INCDIR=/sandbox/openresty/luajit/include/luajit-2.1
++ LUA_INCDIR=/sandbox/openresty/luajit/include/luajit-2.1
++ export PATH=/tmp/builders/lua/luarocks/lua_modules/bin:/root/.luarocks/bin:/sandbox/openresty/luarocks/bin:/sandbox/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
++ PATH=/tmp/builders/lua/luarocks/lua_modules/bin:/root/.luarocks/bin:/sandbox/openresty/luarocks/bin:/sandbox/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
+ openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 -subj /CN=sni-support-required-for-valid-ssl -keyout /sandbox/cfg/ssl/resty-auto-ssl-fallback.key -out /sandbox/cfg/ssl/resty-auto-ssl-fallback.crt
Can't load /root/.rnd into RNG
140378995507648:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=/root/.rnd
Generating a RSA private key
..................................................................................................+++++
......+++++
writing new private key to '/sandbox/cfg/ssl/resty-auto-ssl-fallback.key'
-----
Wed 16 20:08:43 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{}, was already done
Wed 16 20:08:43 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{}, was already done
Wed 16 20:08:43 BCDB.py              - 446 - bcdb                               : load model:jumpscale.openresty.server.1
Wed 16 20:08:43 99aa9ab6c282bc932.py -  31 - 1_76f6215e7a241d899aa9ab6c282bc932 : init index:jumpscale.openresty.server.1
grep: /root/.ssh/known_hosts: No such file or directory
# github.com:22 SSH-2.0-babeld-003ebee6
# github.com:22 SSH-2.0-babeld-003ebee6
# github.com:22 SSH-2.0-babeld-003ebee6
Wed 16 20:08:44 GitFactory.py        - 173 - gitfactory                         : None:pull:ssh://git@github.com/threefoldtech/jumpscale_weblibs.git ->/sandbox/code/github/threefoldtech/jumpscale_weblibs
Wed 16 20:08:44 GitFactory.py        - 245 - gitfactory                         : git clone ssh://git@github.com/threefoldtech/jumpscale_weblibs.git -> /sandbox/code/github/threefoldtech/jumpscale_weblibs (branch:None)
Wed 16 20:08:44 GitFactory.py        - 287 - gitfactory                         : mkdir -p /sandbox/code/github/threefoldtech;cd /sandbox/code/github/threefoldtech;git -c http.sslVerify=false clone   ssh://git@github.com/threefoldtech/jumpscale_weblibs.git /sandbox/code/github/threefoldtech/jumpscale_weblibs
Cloning into '/sandbox/code/github/threefoldtech/jumpscale_weblibs'...
Warning: Permanently added the RSA host key for IP address '140.82.118.3' to the list of known hosts.
Checking out files: 100% (960/960), done.
Wed 16 20:08:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.zdb.client.1
Wed 16 20:08:57 1c77f4579afba29aa.py -  31 - 1_f5b081f1ef927551c77f4579afba29aa : init index:jumpscale.zdb.client.1
Wed 16 20:08:57 /redis/connection.py - 544 - connect                            : EXCEPTION: 
    ConnectionError('Error 99 connecting to localhost:9900. Cannot assign requested address.',)
--TRACEBACK------------------
<string> in <module>
    1    
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in test
    30    gedis_cli = self.client_get()
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in client_get
    15    self.install()
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/ThreeBotFactoryBase.py in install
    36    package.prepare()
/sandbox/lib/jumpscale/Jumpscale/tools/threebot_package/ThreeBotPackage.py in prepare
    72    self._init_before_action()
/sandbox/lib/jumpscale/Jumpscale/tools/threebot_package/ThreeBotPackage.py in _init_before_action
    53    self._package_author = klass(package=self)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py in __init__
    63    self._init(**kwargs)
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/package.py in _init
    6    self.db = self._package.threebot_server.bcdb_get("tft_explorer")
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreebotServer.py in bcdb_get
    65    zdb_admin = j.clients.zdb.client_admin_get()
/sandbox/lib/jumpscale/Jumpscale/clients/stor_zdb/ZDBClientFactory.py in client_admin_get
    65    cl = self.get(name=name, nsname=name, addr=addr, port=port, secret_=secret, mode=mode, admin=True)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in get
    113    jsconfig = self._new(name=name, autosave=autosave, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in _new
    93    jsconfig = jsconfig_klass(parent=self, jsxobject=jsxobject, **kwargs_to_class)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py in __init__
    63    self._init(**kwargs)
/sandbox/lib/jumpscale/Jumpscale/clients/stor_zdb/ZDBClientBase.py in _init
    30    self.redis.execute_command("AUTH", self.secret_)
/usr/local/lib/python3.6/dist-packages/redis/client.py in execute_command
    836    conn = self.connection or pool.get_connection(command_name, **options)
/usr/local/lib/python3.6/dist-packages/redis/connection.py in get_connection
    1073    connection.connect()
/usr/local/lib/python3.6/dist-packages/redis/connection.py in connect
    544    raise ConnectionError(self._error_message(e))
-----------------------------

Wed 16 20:08:58 BCDB.py              - 338 - bcdb                               : DATAPROCESSOR & SQLITE STOPPED OK
Wed 16 20:08:59 BCDB.py              - 338 - bcdb                               : DATAPROCESSOR & SQLITE STOPPED OK
GlenDC commented 5 years ago

@rkhamis suggested me to remove the config file /Users/glendc/sandbox/var/containers/3bot/docker_config.toml and try another installation but this time without using the --scratch flag. As I was doing the first 2 steps:

  1. pull latest on development of all repos
  2. run ./install/jsx.py containers-reset

I noticed that step (2) already had deleted the above mentioned config file, so that was no longer needed. I than continued with step (3) and (4):

  1. run ./install/jsx.py container-install
  2. afterwards I went into the kosmos using ./install/jsx.py container-kosmos and confirmed a successful installation.

Note indeed in step (3) I no longer use the --scratch flag as suggested.

However, still getting the same Redis-related issue when trying to run the test (kosmos -p 'j.threebot.package.tftexplorer.test()'):

./install/jsx.py container-shell
# Host [localhost]:9000 found: line 5
/Users/glendc/.ssh/known_hosts updated.
Original contents retained as /Users/glendc/.ssh/known_hosts.old
Warning: Permanently added '[localhost]:9000' (ECDSA) to the list of known hosts.
OK
3BOTDEVEL:3bot:~: kosmos -p 'j.threebot.package.tftexplorer.test()'
Thu 17 12:32:11 BCDBFactory.py       - 311 - bcdbfactory                        : new bcdb:tft_explorer
Thu 17 12:32:11 DBSQLite.py          -  91 - dbsqlite                           : RESET FOR KVS
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.circle.2
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.user.2
Thu 17 12:32:11 BCDB.py              -  87 - bcdb                               : BCDB INIT DONE:tft_explorer
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.transaction.1
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.wallet.1
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.chain.1
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.lock.1
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:tft.explorer.transaction.1
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.circle.2
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.user.2
Thu 17 12:32:11 BCDB.py              -  87 - bcdb                               : BCDB INIT DONE:system
Thu 17 12:32:11 BCDB.py              - 446 - bcdb                               : load model:jumpscale.threebot_server.1
Thu 17 12:32:11 db39ba5615b225d6b.py -  31 - 1_a2ceb60df57b6ecdb39ba5615b225d6b : init index:jumpscale.threebot_server.1
Thu 17 12:32:12 BCDB.py              - 446 - bcdb                               : load model:jumpscale.threebot.package.1
Thu 17 12:32:12 adb60367236085428.py -  31 - 1_e65b143683ae0fdadb60367236085428 : init index:jumpscale.threebot.package.1
Thu 17 12:32:12 BCDB.py              - 446 - bcdb                               : load model:jumpscale.gedis.server
Thu 17 12:32:12 554491cc4784debd0.py -  31 - r_d62bc1899d73f8c554491cc4784debd0 : init index:jumpscale.gedis.server
Thu 17 12:32:12 BuilderBaseClass.py  - 147 - openresty                          : no need to do: openresty:{'kwargs': <class 'inspect._empty'>}, was already done
Thu 17 12:32:12 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{'deps_reset': False}, was already done
Thu 17 12:32:12 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{}, was already done
Thu 17 12:32:12 BCDB.py              - 446 - bcdb                               : load model:jumpscale.openresty.server.1
Thu 17 12:32:12 99aa9ab6c282bc932.py -  31 - 1_76f6215e7a241d899aa9ab6c282bc932 : init index:jumpscale.openresty.server.1
Thu 17 12:32:19 BCDB.py              - 446 - bcdb                               : load model:jumpscale.zdb.client.1
Thu 17 12:32:19 1c77f4579afba29aa.py -  31 - 1_f5b081f1ef927551c77f4579afba29aa : init index:jumpscale.zdb.client.1
Thu 17 12:32:19 /redis/connection.py - 544 - connect                            : EXCEPTION: 
    ConnectionError('Error 99 connecting to localhost:9900. Cannot assign requested address.',)
--TRACEBACK------------------
<string> in <module>
    1    
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in test
    30    gedis_cli = self.client_get()
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/TFTExplorerFactory.py in client_get
    15    self.install()
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/ThreeBotFactoryBase.py in install
    36    package.prepare()
/sandbox/lib/jumpscale/Jumpscale/tools/threebot_package/ThreeBotPackage.py in prepare
    72    self._init_before_action()
/sandbox/lib/jumpscale/Jumpscale/tools/threebot_package/ThreeBotPackage.py in _init_before_action
    53    self._package_author = klass(package=self)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py in __init__
    63    self._init(**kwargs)
/sandbox/lib/jumpscale/threebot_packages/threefold/tft_explorer/package.py in _init
    6    self.db = self._package.threebot_server.bcdb_get("tft_explorer")
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreebotServer.py in bcdb_get
    65    zdb_admin = j.clients.zdb.client_admin_get()
/sandbox/lib/jumpscale/Jumpscale/clients/stor_zdb/ZDBClientFactory.py in client_admin_get
    65    cl = self.get(name=name, nsname=name, addr=addr, port=port, secret_=secret, mode=mode, admin=True)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in get
    113    jsconfig = self._new(name=name, autosave=autosave, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in _new
    93    jsconfig = jsconfig_klass(parent=self, jsxobject=jsxobject, **kwargs_to_class)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py in __init__
    63    self._init(**kwargs)
/sandbox/lib/jumpscale/Jumpscale/clients/stor_zdb/ZDBClientBase.py in _init
    30    self.redis.execute_command("AUTH", self.secret_)
/usr/local/lib/python3.6/dist-packages/redis/client.py in execute_command
    836    conn = self.connection or pool.get_connection(command_name, **options)
/usr/local/lib/python3.6/dist-packages/redis/connection.py in get_connection
    1073    connection.connect()
/usr/local/lib/python3.6/dist-packages/redis/connection.py in connect
    544    raise ConnectionError(self._error_message(e))
-----------------------------

Thu 17 12:32:20 BCDB.py              - 338 - bcdb                               : DATAPROCESSOR & SQLITE STOPPED OK
Thu 17 12:32:21 BCDB.py              - 338 - bcdb                               : DATAPROCESSOR & SQLITE STOPPED OK
rkhamis commented 5 years ago

@GlenDC you need to start threebot first.

Can you try with these steps?

  1. kosmos -p 'j.servers.threebot.local_start_default()'
  2. kosmos -p 'j.threebot.package.tftexplorer.test()'
GlenDC commented 5 years ago

Fails on step (1):

./install/jsx.py container-shell
# Host [localhost]:9000 found: line 5
/Users/glendc/.ssh/known_hosts updated.
Original contents retained as /Users/glendc/.ssh/known_hosts.old
Warning: Permanently added '[localhost]:9000' (ECDSA) to the list of known hosts.
OK
3BOTDEVEL:3bot:~: kosmos -p 'j.servers.threebot.local_start_default()'
Mon 21 18:58:56 BuilderBaseClass.py  - 147 - openresty                          : no need to do: openresty:{'kwargs': <class 'inspect._empty'>}, was already done
Mon 21 18:58:56 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{'deps_reset': False}, was already done
Mon 21 18:58:56 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{}, was already done
Mon 21 18:58:56 BuilderBaseClass.py  - 147 - openresty                          : no need to do: openresty:{'kwargs': <class 'inspect._empty'>}, was already done
Mon 21 18:58:56 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{'deps_reset': False}, was already done
Mon 21 18:58:56 BuilderBaseClass.py  - 147 - zdb                                : no need to do: zdb:{}, was already done
Mon 21 18:58:56 BuilderBaseClass.py  - 147 - sonic                              : no need to do: sonic:{'kwargs': <class 'inspect._empty'>}, was already done
Mon 21 18:58:56 BuilderBaseClass.py  - 147 - sonic                              : no need to do: sonic:{}, was already done
Mon 21 18:58:56 BotServersFactory.py -  40 - threebotserversfactory             : install done for threebot server.
Mon 21 18:58:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.circle.2
Mon 21 18:58:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.bcdb.acl.user.2
Mon 21 18:58:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.gedis.server
Mon 21 18:58:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.openresty.server.1
Mon 21 18:58:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.threebot.package.1
Mon 21 18:58:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.threebot_server.1
Mon 21 18:58:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.zdb.client.1
Mon 21 18:58:57 BCDB.py              -  87 - bcdb                               : BCDB INIT DONE:system
Mon 21 18:58:57 db39ba5615b225d6b.py -  31 - 1_a2ceb60df57b6ecdb39ba5615b225d6b : init index:jumpscale.threebot_server.1
Mon 21 18:58:57 BCDB.py              - 446 - bcdb                               : load model:jumpscale.startupcmd.1
Mon 21 18:58:57 09aa584ed5df75f46.py -  31 - 1_9faa8cee419d47709aa584ed5df75f46 : init index:jumpscale.startupcmd.1
Mon 21 18:58:57 StartupCMD.py        - 276 - startupcmd_threebot_default        : refresh: threebot_default
Mon 21 18:58:58 StartupCMD.py        - 301 - startupcmd_threebot_default        : stop: threebot_default
no server running need to start
++ '[' start == kill ']'
++ tmux -f /sandbox/cfg/.tmux.conf has-session -t main
error connecting to /tmp/tmux-0/default (No such file or directory)
++ '[' 1 -eq 1 ']'
++ echo 'no server running need to start'
++ tmux -f /sandbox/cfg/.tmux.conf new -s main -d 'bash --rcfile /sandbox/bin/env_tmux_detach.sh'
++ '[' start '!=' start ']'
Mon 21 18:58:58 Tmux.py              -  58 - tmux                               : tmux server is running
Mon 21 18:58:58 BuilderBaseClass.py  - 147 - openresty                          : no need to do: openresty:{'kwargs': <class 'inspect._empty'>}, was already done
Mon 21 18:58:58 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{'deps_reset': False}, was already done
Mon 21 18:58:58 BuilderBaseClass.py  - 147 - lua                                : no need to do: lua:{}, was already done
Mon 21 18:58:58 99aa9ab6c282bc932.py -  31 - 1_76f6215e7a241d899aa9ab6c282bc932 : init index:jumpscale.openresty.server.1
Mon 21 18:58:58 OpenRestyServer.py   - 147 - yserver_default_openresty_threebot : Starting Lapis Server
Mon 21 18:58:58 StartupCMD.py        - 276 - startupcmd_lapis                   : refresh: lapis
Mon 21 18:58:59 StartupCMD.py        - 301 - startupcmd_lapis                   : stop: lapis
Mon 21 18:59:26 BCDB.py              - 446 - bcdb                               : load model:jumpscale.gedis.client
Mon 21 18:59:26 3b380bdd704da6e8d.py -  31 - t_f870d416e3720c73b380bdd704da6e8d : init index:jumpscale.gedis.client
Mon 21 18:59:26 GedisClient.py       -  72 - gedisclient_threebot               : reload
Mon 21 18:59:26 GedisClient.py       - 160 - gedisclient_threebot               : redisclient: 127.0.0.1:8901
Mon 21 18:59:26 edis/RedisFactory.py - 143 - get                                : EXCEPTION: 
    Redis on 127.0.0.1:8901 did not answer
--TRACEBACK------------------
<string> in <module>
    1    
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreeBotServersFactory.py in local_start_default
    61    client = self.default.start(background=True, web=web)
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreebotServer.py in start
    189    self.client = j.clients.gedis.get(name="threebot", port=8901, namespace="default")
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in get
    113    jsconfig = self._new(name=name, autosave=autosave, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in _new
    93    jsconfig = jsconfig_klass(parent=self, jsxobject=jsxobject, **kwargs_to_class)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py in __init__
    63    self._init(**kwargs)
/sandbox/lib/jumpscale/Jumpscale/clients/gedis/GedisClient.py in _init
    44    self.reload()
/sandbox/lib/jumpscale/Jumpscale/clients/gedis/GedisClient.py in reload
    74    assert self.ping()
/sandbox/lib/jumpscale/Jumpscale/clients/gedis/GedisClient.py in ping
    55    test = self._redis.execute_command("ping")
/sandbox/lib/jumpscale/Jumpscale/clients/gedis/GedisClient.py in _redis
    161    self._redis_ = j.clients.redis.get(ipaddr=addr, port=port, password=secret, ping=True, fromcache=False)
/sandbox/lib/jumpscale/Jumpscale/clients/redis/RedisFactory.py in get
    143    raise j.exceptions.Base("Redis on %s:%s did not answer" % (ipaddr, port))
-----------------------------

Mon 21 18:59:28 BCDB.py              - 338 - bcdb                               : DATAPROCESSOR & SQLITE STOPPED OK

Perhaps the redis-servers are not running? As that seems to be the issue popping up for all things I try...

xmonader commented 5 years ago

@GlenDC Can you check tmux for errors specially the threebot window?

GlenDC commented 5 years ago

Can I do what now? Sorry, you'll have to be clear with more detailed instructions.

xmonader commented 5 years ago

Here's a complete session on my container, seems to be working fine

JSX> cl = j.servers.threebot.local_start_default()                                                                                                                 
no server running need to start
++ '[' start == kill ']'
++ tmux -f /sandbox/cfg/.tmux.conf has-session -t main
no server running on /tmp/tmux-0/default
++ '[' 1 -eq 1 ']'
++ echo 'no server running need to start'
++ tmux -f /sandbox/cfg/.tmux.conf new -s main -d 'bash --rcfile /sandbox/bin/env_tmux_detach.sh'
++ '[' start '!=' start ']'
JSX> cl.actors.package_manager.package_add("/sandbox/code/github/threefoldtech/jumpscaleX_threebot/ThreeBotPackages/threefold/tft_explorer")                       
b'OK'

JSX> cl.actors.package_manager.package_start("tft_explorer")                                                                                   
JSX> j.threebot.package.tftexplorer.test()                                                                                                     
*****************************************:0
*****************************************:1
*****************************************:2
*****************************************:3
*****************************************:4
*****************************************:5
*****************************************:6
*****************************************:7
*****************************************:8
*****************************************:9
test ok
GlenDC commented 5 years ago

@xmonader helped me to get the test up and running. Thanks. Here is what I did.

Run:

tmux at

Within tmux do:

Run:

exit

Afterwards still within the 3Bot container:

echo "CLEARING ALL BCDB"
kosmos 'j.data.bcdb.destroy_all()'
pkill redis -9
pkill redis-server -9
kosmos 'j.application.bcdb_system_destroy()'
echo "CLEARING OK"

Run kosmos:

kosmos -p

Than run:

JSX> cl = j.servers.threebot.local_start_default() 
JSX> cl.actors.package_manager.package_add("/sandbox/code/github/threefoldtech/jumpscaleX_threebot/ThreeBotPackages/threefold/tft_explorer")
JSX> cl.actors.package_manager.package_start("tft_explorer")
JSX> j.threebot.package.tftexplorer.test()

Now my test runs successfully:

j.threebot.package.tftexplorer.test()                                                                                                         
*****************************************:0
*****************************************:1
*****************************************:2
*****************************************:3
*****************************************:4
*****************************************:5
*****************************************:6
*****************************************:7
*****************************************:8
*****************************************:9
test ok
'OK'
GlenDC commented 5 years ago

I also got linked this documentation about threebot packages:

https://github.com/threefoldtech/jumpscaleX_threebot/blob/development/docs/quickstart.md

GlenDC commented 5 years ago

So let's say I have a clean installation from scratch, and didn't do anything yet. I suppose I just would need to do the following steps (right after starting kosmos for the first time and still being in kosmos):

  1. cl = j.servers.threebot.local_start_default()
  2. cl.actors.package_manager.package_add("/sandbox/code/github/threefoldtech/jumpscaleX_threebot/ThreeBotPackages/threefold/tft_explorer")
  3. cl.actors.package_manager.package_start("tft_explorer")

Such than I can run the test:

  1. j.threebot.package.tftexplorer.test()

I suppose that is correct. Or am I missing something?

rkhamis commented 5 years ago

@xmonader I started from a brand new container and I didn't need to add the package or start it to get the tests running. perhaps this is something we need to check seperately? will close this issue and open another