threefoldtecharchive / jumpscaleX_archived

Apache License 2.0
1 stars 6 forks source link

most of jsx servers raise errors #759

Open 0xIslamTaha opened 4 years ago

0xIslamTaha commented 4 years ago

1-

JSX> j.servers.corex.start()                                                                                                                                                                                         
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 334, in __getattr__
    % (name, self._key)
RuntimeError: try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'corexfactory'

try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'corexfactory'

2-

JSX> j.servers.mail_forwarder.start()                                                                     
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 334, in __getattr__
    % (name, self._key)
RuntimeError: try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'jsmailforwarderfactory'

try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'jsmailforwarderfactory'

3-

JSX> j.servers.errbot.start()                                                                             
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/servers/errbot/ErrBotFactory.py", line 28, in start
    import errbot
ModuleNotFoundError: No module named 'errbot'

No module named 'errbot'

4-

JSX> j.servers.etcd.start()                                                                               
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/servers/etcd/EtcdServer.py", line 18, in start
    return j.servers.tmux.execute(cmd, window="etcd", pane="etcd", reset=True)
  File "/sandbox/lib/jumpscale/Jumpscale/servers/tmux/Tmux.py", line 111, in execute
    p = self.pane_get(window=window, pane=pane, reset=reset)
  File "/sandbox/lib/jumpscale/Jumpscale/servers/tmux/Tmux.py", line 101, in pane_get
    w = self.window_get(window=window)
  File "/sandbox/lib/jumpscale/Jumpscale/servers/tmux/Tmux.py", line 105, in window_get
    s = self.session
  File "/sandbox/lib/jumpscale/Jumpscale/servers/tmux/Tmux.py", line 30, in session
    session1 = self.server.new_session("main")
  File "/sandbox/lib/jumpscale/Jumpscale/servers/tmux/Tmux.py", line 59, in server
    rc, out, err = j.core.tools.execute("tmux ls", die=False)
  File "/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py", line 1305, in execute
    executable="/bin/bash",
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1288, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
AttributeError: 'NoneType' object has no attribute 'fork_exec'

'NoneType' object has no attribute 'fork_exec'
JSX>  

5-

JSX> j.servers.flask.start()                                                                              
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/jumpscale_generated.py", line 48, in flask
    from Jumpscale.servers.flaskserver.JSWebServers import JSWebServers
  File "/sandbox/lib/jumpscale/Jumpscale/servers/flaskserver/JSWebServers.py", line 2, in <module>
    from .JSWebServer import JSWebServer
  File "/sandbox/lib/jumpscale/Jumpscale/servers/flaskserver/JSWebServer.py", line 9, in <module>
    from flask_sockets import Sockets
ModuleNotFoundError: No module named 'flask_sockets'

No module named 'flask_sockets'

6-

JSX> j.servers.gedis_websocket.start()                                                                    
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 334, in __getattr__
    % (name, self._key)
RuntimeError: try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'gediswebsocketfactory'

try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'gediswebsocketfactory'

7-

JSX> j.servers.odoo.start()                                                                               
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 334, in __getattr__
    % (name, self._key)
RuntimeError: try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'odoofactory'

try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'odoofactory'

8-

JSX> j.servers.sanic.start()                                                                              
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 334, in __getattr__
    % (name, self._key)
RuntimeError: try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'sanicfactory'

try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'sanicfactory'

9-

JSX> j.servers.sockexec.start()                                                                           
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/jumpscale_generated.py", line 90, in sockexec
    from Jumpscale.servers.sockexec.SockExec import SockExec
  File "/sandbox/lib/jumpscale/Jumpscale/servers/sockexec/SockExec.py", line 8, in <module>
    class SockExec(j.application.JSBaseDataObjClass):
AttributeError: 'Application' object has no attribute 'JSBaseDataObjClass'

'Application' object has no attribute 'JSBaseDataObjClass'

10-

JSX> j.servers.tmux.start()                                                                               
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'Tmux' object has no attribute 'start'

'Tmux' object has no attribute 'start'

11-

JSX> j.servers.zdb.start()                                                                                
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 334, in __getattr__
    % (name, self._key)
RuntimeError: try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'zdbservers'

try to get attribute: 'start', instance did not exist, was also not a method or property, was on 'zdbservers'

Env

commit fc9d3ecd84cb33876c8e5985e5f0ed53253de348 (HEAD -> development_jumpscale, origin/development_jumpscale)
Author: Waleed Hammam <waleed.hammam@gmail.com>
Date:   Sun Aug 4 18:32:50 2019 +0200

    add threebot builder
ranatrk commented 4 years ago

https://github.com/threefoldtech/jumpscaleX/commit/1b8344e846339a8c5bd5f2b19d2bb8688b98bba1

  1. (fixed) j.servers.corex.default.start()
  2. j.servers.mail_forwarder.get(......).start()
  3. do pip3 install errbot
  4. (fixed) j.servers.etcd.start()
  5. pip3 install flask flask_sockets
  6. j.servers.gedis_websocket.get("test").start()
  7. (fixed)j.servers.odoo.get("test_odoo").start() + fix in builder
  8. j.servers.sanic.get("test_sanic").start() current error : no module named encodings
  9. current error: error installing sockexec
  10. command: j.servers.tmux.server
  11. j.servers.zdb.get().start() or j.servers.zdb.default.start()
Dinaamagdy commented 4 years ago

capacity server

JSX> j.servers.capacity.get().start()                                                                
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 124, in get
    jsconfig = self._get(name=name, die=needexist)
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 163, in _get
    res = self.find(name=name)
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 206, in find
    for jsxobject in self._findData(**kwargs):
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 235, in _findData
    item.name for item in self._model.schema.properties_index_keys if item.name in propnames
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 328, in __getattr__
    return self.__getattribute__(name)  # else see if we can from the factory find the child object
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 69, in _model
    s = self.__class__._CHILDCLASS._SCHEMATEXT
AttributeError: type object 'CapacityFactory' has no attribute '_CHILDCLASS'

type object 'CapacityFactory' has no attribute '_CHILDCLASS'
ranatrk commented 4 years ago

https://github.com/threefoldtech/jumpscaleX/commit/1b4fff37461cdf869ff419baf19328011c50be18

ranatrk commented 4 years ago
Pishoy commented 4 years ago

1,2 are started successfully 4- etcd is working but when check tmux is giving error

3BOTDEVEL:jumpscaletest:~:  /sandbox/bin/etcd
-bash: /sandbox/bin/etcd: No such file or directory

6 - gedis_webscoket started after i used j.servers.openresty.test() 7 - works j.servers.odoo.get("test_odoo").start()`

10- works 11 - run successfully but need to build zdb first

j.builders.db.zdb.install()
j.servers.zdb.get().start()
Dinaamagdy commented 4 years ago

zdb and mail_fowarder give me he following error now

JSX> j.servers.zdb.install()                                                                         
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 332, in __getattr__
    r = self._get(name=name, die=False)
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 156, in _get
    res = self.find(name=name)
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 201, in find
    for jsxobject in self._findData(**kwargs):
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 234, in _findData
    return self._model.find(**kwargs)
  File "/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBModel.py", line 276, in find
    ids = self.index._key_index_find(nid=nid, **args)
  File "/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBModelIndex.py", line 318, in _key_index_find
    ids = self._key_index_getids(key, nid=nid)
  File "/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBModelIndex.py", line 268, in _key_index_getids
    r = j.clients.credis_core.hget(self._key_index_hsetkey_get(nid=nid).encode() + b":" + hash[0:2], hash[2:])
  File "/sandbox/lib/jumpscale/Jumpscale/jumpscale_generated.py", line 973, in credis_core
    self._credis_core =  RedisCoreClient()
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py", line 73, in __init__
    self._init(**kwargs)
  File "/sandbox/lib/jumpscale/Jumpscale/clients/redis/RedisCoreClient.py", line 20, in _init
    self._client = j.clients.redis.core_get()
  File "/sandbox/lib/jumpscale/Jumpscale/clients/redis/RedisFactory.py", line 194, in core_get
    j.core.myenv.db = RedisTools.core_get(reset=reset, tcp=tcp)
  File "/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py", line 192, in core_get
    MyEnv.init()
  File "/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py", line 2516, in init
    configdir = self._cfgdir_get()
  File "/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py", line 2608, in _cfgdir_get
    return "%s/cfg" % self._basedir_get()
  File "/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py", line 2593, in _basedir_get
    rc, out, err = Tools.execute("whoami", showout=False, die=False)
  File "/sandbox/lib/jumpscale/Jumpscale/core/InstallTools.py", line 1773, in execute
    executable="/bin/bash",
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1288, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
AttributeError: 'NoneType' object has no attribute 'fork_exec'

'NoneType' object has no attribute 'fork_exec'
JSX>  
Dinaamagdy commented 4 years ago
Dinaamagdy commented 4 years ago
Dinaamagdy commented 4 years ago

odoo server:

start


Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/servers/odoo/OdooServer.py", line 173, in start
    self.startupcmd.start()
  File "/sandbox/lib/jumpscale/Jumpscale/servers/startupcmd/StartupCMD.py", line 610, in start
    running = self.wait_running(die=True)
  File "/sandbox/lib/jumpscale/Jumpscale/servers/startupcmd/StartupCMD.py", line 477, in wait_running
    return self._error_raise("could not start")
  File "/sandbox/lib/jumpscale/Jumpscale/servers/startupcmd/StartupCMD.py", line 90, in _error_raise
    raise j.exceptions.Base(msg)
Jumpscale.core.InstallTools.BaseJSException: {RED}EXCEPTION: 
    error in startupcmd :odoo
    could not start{RESET}

{RED}EXCEPTION: 
    error in startupcmd :odoo
    could not start{RESET}
JSX>                        

missing check option

Dinaamagdy commented 4 years ago
Dinaamagdy commented 4 years ago
     File "<stdin>", line 1, in <module>
    File "/sandbox/lib/jumpscale/Jumpscale/servers/startupcmd/StartupCMD.py", line 505, in start
    raise j.exceptions.Value("please make sure self.cmd_start has been specified")
    Jumpscale.core.InstallTools.JSExceptions.__init__.<locals>.Value1: {RED}EXCEPTION: 
     please make sure self.cmd_start has been specified{RESET}

     {RED}EXCEPTION: 
     please make sure self.cmd_start has been specified{RESET} 
    JSX>  
Dinaamagdy commented 4 years ago

type object 'CapacityFactory' has no attribute '_CHILDCLASS'


and I can see that code of it has only start option 
https://github.com/threefoldtech/jumpscaleX/blob/development_jumpscale/Jumpscale/servers/grid_capacity/CapacityFactory.py
Dinaamagdy commented 4 years ago

No module named 'flask_sockets' JSX>

Dinaamagdy commented 4 years ago

No module named 'errbot'

Dinaamagdy commented 4 years ago
Dinaamagdy commented 4 years ago

'Application' object has no attribute 'JSBaseDataObjClass'