threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

Discovering jumscaleX_threebot #320

Closed weynandkuijpers closed 4 years ago

weynandkuijpers commented 4 years ago

Installed jumpscale X_core and X_threebot (local - not docker container) and wanted to follow this example to start learning: https://github.com/threefoldtech/jumpscaleX_threebot/blob/development/ThreeBotPackages/zerobot/webinterface/wiki/chatbot/README.md

Installed and compiled all the module without issues, but when starting kosmos and executing the first command - the console is no longer usable - it does not come back from executing the command. See here:

3BOTDEVEL:happy:/: kosmos 
** START DATA PROCESSOR FOR :system
Sat 21 13:46:19 BCDB.py              -  74 - bcdb                               : BCDB INIT DONE:system
JSX> cl = j.servers.threebot.local_start_default()                                                                  
LOAD CONFIG BCDB
** START DATA PROCESSOR FOR :myjobs
HUP 26423
** START DATA PROCESSOR FOR :threebot_ZDB_threebot
** START DATA PROCESSOR FOR :threebot_REDIS_alerta

HUP 26423
*****************************
*** 3BOTSERVER IS RUNNING ***
*****************************

It's probably something simple that I am not aware of but would like to start digging deeper into the jumscale libraries... :-)

rkhamis commented 4 years ago

The threebot server, by design, now starts in the shell and stays running there.

weynandkuijpers commented 4 years ago

okay - but is I want to work the example I need: https://github.com/threefoldtech/jumpscaleX_threebot/blob/development/ThreeBotPackages/zerobot/webinterface/wiki/chatbot/README.md

so where / how do I get the other commands

PeterNashaat commented 4 years ago

@weynandkuijpers can you try running it like this :-

 cl = j.servers.threebot.local_start_default(background=True)
weynandkuijpers commented 4 years ago

Would have been great but this is the response:

JSX> cl = j.servers.threebot.local_start_default(background=True)                                                     
Mon 23 10:47:09 ot/ThreebotServer.py - 337 - start                              : EXCEPTION: 
    Could not start threebot server
--TRACEBACK------------------
<stdin> in <module>
    1    
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreeBotServersFactory.py in local_start_default
    98    client = self.default.start(background=background, packages=packages)
/sandbox/lib/jumpscale/Jumpscale/servers/threebot/ThreebotServer.py in start
    337    raise j.exceptions.Timeout("Could not start threebot server")
-----------------------------

None
JSX> 

And when executing the command without the background=True I get the same thing as the original ticket content:

JSX> cl = j.servers.threebot.local_start_default()                                                                    
LOAD CONFIG BCDB
** START DATA PROCESSOR FOR :myjobs
HUP 9880
** START DATA PROCESSOR FOR :threebot_ZDB_threebot
** START DATA PROCESSOR FOR :threebot_REDIS_alerta
HUP 9880
*****************************
*** 3BOTSERVER IS RUNNING ***
*****************************
weynandkuijpers commented 4 years ago

Peter suggested to run this:

cd  /sandbox/code/github/threefoldtech/
declare strs=('threebot' 'core' 'libs' 'builders' 'libs_extra') && for s in ${strs[@]}; do 
    rm -rf /sandbox/code/github/threefoldtech/jumpscaleX_$s && 
    git clone https://github.com/threefoldtech/jumpscaleX_$s.git --branch development; done

Which fixed the issue. But this has to be build into the original install process. Thinking about it - I guess by

curl https://raw.githubusercontent.com/threefoldtech/jumpscaleX_core/development/install/jsx.py?$RANDOM > /tmp/jsx;
chmod +x /tmp/jsx;

running this you get the master branch?

PeterNashaat commented 4 years ago
rkhamis commented 4 years ago

I think this is resolved