threefoldtecharchive / jumpscaleX_core

Apache License 2.0
1 stars 6 forks source link

After update to latest unstable, my package fails to start #705

Closed robvanmieghem closed 4 years ago

robvanmieghem commented 4 years ago

my service: https://github.com/threefoldfoundation/tft-stellar/tree/master/ThreeBotPackages/transactionfunding-service

gedis = j.clients.gedis.get("pm", port=8901, package_name="zerobot.packagemanager")
JSX> p.threefoldfoundation.transactionfunding_service.start()
Mon 06 07:32:07 ta/bcdb/BCDBModel.py - 388 - set                                : EXCEPTION:
    Could not insert object, unique constraint failed:UNIQUE constraint failed: index_jumpscale_openresty_location.name
--TRACEBACK------------------
<stdin> in <module>
    1
/sandbox/lib/jumpscale/Jumpscale/tools/threebot_package/ThreeBotPackage.py in start
    330    self._package_author.start()
/sandbox/code/github/threefoldfoundation/tft-stellar/ThreeBotPackages/transactionfunding-service/package.py in start
    12    locations = website.locations.get(name=f"transactionfunding_service_{port}_locations")
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in get
    120    jsconfig = self._create(name=name, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in _create
    96    jsconfig = jsconfig_klass(parent=self, jsxobject=jsxobject, **kwargs_to_class)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py in __init__
    52    self._init_jsconfig(**kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigBCDB.py in _init_jsconfig
    59    self._data.save()
/sandbox/lib/jumpscale/Jumpscale/data/schema/JSXObjectRoot.py in save
    96    obj = self._model.set(self)
/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBDecorator.py in wrapper_queue_method
    63    res = func(*args, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBModel.py in set
    388    raise j.exceptions.Input("Could not insert object, unique constraint failed:%s" % e, data=obj)
-----------------------------

--DATA-----------------------
  ## jumpscale.openresty.location
  id:128
   - name                : transactionfunding_service_443_locations
   - path                : /sandbox/var/web/default
   - locations_static    : []
   - locations_proxy     : []
   - locations_lapis     : []
   - locations_custom    : []
   - locations_spa       : []
   - mother_id           : 120
-----------------------------

Mon 06 07:32:08 ta/bcdb/BCDBModel.py - 388 - set                                : EXCEPTION:
    Could not insert object, unique constraint failed:UNIQUE constraint failed: index_jumpscale_openresty_location.name
--TRACEBACK------------------
<stdin> in <module>
    1
/sandbox/lib/jumpscale/Jumpscale/tools/threebot_package/ThreeBotPackage.py in start
    330    self._package_author.start()
/sandbox/code/github/threefoldfoundation/tft-stellar/ThreeBotPackages/transactionfunding-service/package.py in start
    12    locations = website.locations.get(name=f"transactionfunding_service_{port}_locations")
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in get
    120    jsconfig = self._create(name=name, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigsBCDB.py in _create
    96    jsconfig = jsconfig_klass(parent=self, jsxobject=jsxobject, **kwargs_to_class)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSBase.py in __init__
    52    self._init_jsconfig(**kwargs)
/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigBCDB.py in _init_jsconfig
    59    self._data.save()
/sandbox/lib/jumpscale/Jumpscale/data/schema/JSXObjectRoot.py in save
    96    obj = self._model.set(self)
/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBDecorator.py in wrapper_queue_method
    63    res = func(*args, **kwargs)
/sandbox/lib/jumpscale/Jumpscale/data/bcdb/BCDBModel.py in set
    388    raise j.exceptions.Input("Could not insert object, unique constraint failed:%s" % e, data=obj)
-----------------------------

--DATA-----------------------
  ## jumpscale.openresty.location
  id:128
   - name                : transactionfunding_service_443_locations
   - path                : /sandbox/var/web/default
   - locations_static    : []
   - locations_proxy     : []
   - locations_lapis     : []
   - locations_custom    : []
   - locations_spa       : []
   - mother_id           : 120
-----------------------------
robvanmieghem commented 4 years ago

3bot server also had major issues with bcdb. To get further, I executed bcdb delete --all && pkill -9 redis && rm -rf /sandbox/cfg/bcdb which is only a dev solution off course,

waleedhammam commented 4 years ago

locations have to have unique names, in some cases while bad upgrade or major changes we can just j.servers.openresty.default_openresty_threebot.delete() to start clean locations.

waleedhammam commented 4 years ago

can't reproduce anymore