Skip to content
This repository has been archived by the owner on Sep 11, 2019. It is now read-only.

most of jsx servers raise errors #759

Open
0xIslamTaha opened this issue Aug 5, 2019 · 16 comments
Open

most of jsx servers raise errors #759

0xIslamTaha opened this issue Aug 5, 2019 · 16 comments
Assignees
Labels

Comments

@0xIslamTaha
Copy link
Contributor

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 <[email protected]>
Date:   Sun Aug 4 18:32:50 2019 +0200

    add threebot builder
@0xIslamTaha 0xIslamTaha changed the title jsx servers testing status most of jsx servers raise errors Aug 5, 2019
@ranatrk ranatrk self-assigned this Aug 5, 2019
@ranatrk
Copy link
Contributor

ranatrk commented Aug 5, 2019

threefoldtecharchive/jumpscaleX_core@1b8344e

  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
Copy link
Contributor

Dinaamagdy commented Aug 7, 2019

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
Copy link
Contributor

ranatrk commented Aug 7, 2019

threefoldtecharchive/jumpscaleX_core@1b4fff3

  • etcd server : If etcd wasn't installed, no error is raised in shell but instead raised in tmux session. Added check to raise error when start/stop server in case it wasnt installed

  • corex server: (issue with @Dinaamagdy) peewee not installed on new installations as docker image was created with an older version that didn't include it in install requirements . Fix in installation to go over packages and install them if not installed in the new container

@ranatrk
Copy link
Contributor

ranatrk commented Aug 7, 2019

  • corex
  • mail_forwarder
  • errbot
  • etcd
  • flask
  • gedis_websocket
  • odoo
  • sanic
  • sockexec
  • tmux
  • zdb
  • capacity

@Pishoy
Copy link

Pishoy commented Aug 8, 2019

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
Copy link
Contributor

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
Copy link
Contributor

Dinaamagdy commented Aug 19, 2019

  • etcd server
    install/check /delete methods :missing

@Dinaamagdy
Copy link
Contributor

Dinaamagdy commented Aug 19, 2019

  • tmux server:
    - install, start, stop: missing
    - session : not clear at all as is there session inside servers j.tmux.servers

@Dinaamagdy
Copy link
Contributor

Dinaamagdy commented Aug 19, 2019

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
Copy link
Contributor

  • sanic server
    missing check method
  • sonic server
    missing check and install methods

@Dinaamagdy
Copy link
Contributor

  • startupcmd server
    • start method
     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
Copy link
Contributor

Dinaamagdy commented Aug 20, 2019

  • capacity server
    return the following error
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 327, in __getattr__
    or name in self._properties_names_get()
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py", line 659, in _properties_names_get
    others = self._children_names_get(filter=filter)
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 294, in _children_names_get
    x = self._cache.get(key="_children_names_get", method=do, expire=10)  # will redo every 10 sec
  File "/sandbox/lib/jumpscale/Jumpscale/core/cache/Cache.py", line 185, in get
    raise e
  File "/sandbox/lib/jumpscale/Jumpscale/core/cache/Cache.py", line 179, in get
    val = method(**kwargs)
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 289, in do
    for item in self._findData():
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 242, in _findData
    return self._model.find()
  File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 330, 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'

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
Copy link
Contributor

  • flask server
JSX> j.servers.flask.install()                                                                                                                                                                              
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/jumpscale_generated.py", line 1392, 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'
JSX>  

@Dinaamagdy
Copy link
Contributor

  • errbot server
    server doesn't have install or stop methods or get to get its client
    and 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'

@Dinaamagdy
Copy link
Contributor

Dinaamagdy commented Aug 20, 2019

  • gedis_websocket

start: doessn't doanything
stop :doesn't exist
install : doesn't exist

@Dinaamagdy
Copy link
Contributor

  • sockexec
    install doesn't work and can't get server client with get
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/sandbox/lib/jumpscale/Jumpscale/jumpscale_generated.py", line 1374, 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'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants