Closed despiegk closed 5 years ago
I've added a fix for j.servers.corex.test() still working on openresty test
i have error when get openresty to start it ( and test is fail j.servers.openresty.test()
)
jumpscaleX ( development_jumpscale)
DigitalMeX ( development_jumpscale)
i found these two errors on two different installation : old installation with latest changes give me this error :
system: jumpscale.openresty.website.1:29b92dfccd2d8285f9604bfa40dfe806
Tue 23 10:30:51 BCDBMeta.py - 106 - bcdbmeta : save meta:system
Tue 23 10:30:51 BCDB.py - 373 - bcdb : load model:jumpscale.openresty.website.1
Tue 23 10:30:51 BCDBMeta.py - 158 - bcdbmeta : schema set in BCDB:system meta:jumpscale.openres
Tue 23 10:30:51 JSBase.py - 103 - website : ***CLASS INIT 1: website
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/sandbox/lib/jumpscale/DigitalMe/servers/openresty/OpenRestyFactory.py", line 145, in test
tmux()
File "/sandbox/lib/jumpscale/DigitalMe/servers/openresty/OpenRestyFactory.py", line 116, in tmux
ws.configure()
File "/sandbox/lib/jumpscale/DigitalMe/servers/openresty/Website.py", line 81, in configure
j.sal.fs.writeFile("%s/servers/%s.conf" % (self._parent._parent._web_path, self.name), r)
File "/sandbox/lib/jumpscale/Jumpscale/sal/fs/SystemFSDecorators.py", line 211, in wrapper
return func(*args, **kwargs)
File "/sandbox/lib/jumpscale/Jumpscale/sal/fs/SystemFS.py", line 1279, in writeFile
fp = open(filename, "wb")
FileNotFoundError: [Errno 2] No such file or directory: '/sandbox/var/web/servers/test.conf'
[Errno 2] No such file or directory: '/sandbox/var/web/servers/test.conf'
on a fresh install container this error appeared :
Fixed openresty issues, please verify
i found this error when i try to test again after pull latest changes |:
{RESET}
Sun 28 08:41:01 JSConfig.py - 84 - startupcmd : trigger: corex_default:save_post
Sun 28 08:41:01 y - 332 - : iterator was empty for bcdb:system, will rebuild from backend, IS DANGEROUS
Sun 28 08:41:01 JSConfigs.py - 140 - corexclientfactory : get child:'default'from 'corexclientfactory'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/sandbox/lib/jumpscale/DigitalMe/servers/openresty/OpenRestyFactory.py", line 140, in test
corex()
File "/sandbox/lib/jumpscale/DigitalMe/servers/openresty/OpenRestyFactory.py", line 68, in corex
corex = j.servers.corex.default.client
File "/sandbox/lib/jumpscale/Jumpscale/servers/corex/CorexServer.py", line 33, in client
j.clients.corex.default.addr = "localhost"
File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 314, in __getattr__
% (name, self._key)
RuntimeError: try to get attribute: 'default', instance did not exist, was also not a method or property, was on 'corexclientfactory'
try to get attribute: 'default', instance did not exist, was also not a method or property, was on 'corexclientfactory'
JSX>
JSX> j.servers.openresty.test()
RuntimeError:
Could not execute: 'bash /tmp/builder_openresty.sh'stderr:
+ cd /tmp/
+ . /sandbox/env.sh
++ export LC_ALL=en_US.UTF-8
++ LC_ALL=en_US.UTF-8
++ export LUALIB=/sandbox/openresty/lualib
++ LUALIB=/sandbox/openresty/lualib
++ export LANG=en_US.UTF-8
++ LANG=en_US.UTF-8
++ export 'LUA_PATH=?.lua;/sandbox/openresty/lualib/?/init.lua;/sandbox/openresty/lualib/?.lua;/sandbox/openresty/lualib/?/?.lua;/sandbox/openresty/lualib/?/core.lua;/sandbox/openr
esty/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/la
pis/?.lua'
++ export PBASE=/sandbox
++ PBASE=/sandbox
++ export 'LUA_CPATH=/sandbox/openresty/lualib/?.so;./?.so'
++ LUA_CPATH='/sandbox/openresty/lualib/?.so;./?.so'
++ export PYTHONHTTPSVERIFY=0
++ PYTHONHTTPSVERIFY=0
++ export HOME=/root
++ HOME=/root
++ export HOST=3bot
++ HOST=3bot
++ export PYTHONPATH=/sandbox/lib:/sandbox/lib/jumpscale:/sandbox/lib:/sandbox/lib/jumpscale:
++ PYTHONPATH=/sandbox/lib:/sandbox/lib/jumpscale:/sandbox/lib:/sandbox/lib/jumpscale:
++ export PATH=/sandbox/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
++ PATH=/sandbox/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
++ export 'PS1=3BOTDEVEL:3bot:\W: '
++ PS1='3BOTDEVEL:3bot:\W: '
++ export LAPIS_OPENRESTY=/sandbox/bin/openresty
++ LAPIS_OPENRESTY=/sandbox/bin/openresty
+ ln -s /sandbox/openresty/bin/resty /sandbox/bin/resty
ln: failed to create symbolic link '/sandbox/bin/resty': File exists
Could not execute: 'bash /tmp/builder_openresty.sh'stderr:
JSX>
Verified
i found this error again when testing openresty :
{RESET}
Sun 28 08:41:01 JSConfig.py - 84 - startupcmd : trigger: corex_default:save_post
Sun 28 08:41:01 y - 332 - : iterator was empty for bcdb:system, will rebuild from backend, IS DANGEROUS
Sun 28 08:41:01 JSConfigs.py - 140 - corexclientfactory : get child:'default'from 'corexclientfactory'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/sandbox/lib/jumpscale/DigitalMe/servers/openresty/OpenRestyFactory.py", line 140, in test
corex()
File "/sandbox/lib/jumpscale/DigitalMe/servers/openresty/OpenRestyFactory.py", line 68, in corex
corex = j.servers.corex.default.client
File "/sandbox/lib/jumpscale/Jumpscale/servers/corex/CorexServer.py", line 33, in client
j.clients.corex.default.addr = "localhost"
File "/sandbox/lib/jumpscale/Jumpscale/core/BASECLASSES/JSConfigs.py", line 314, in __getattr__
% (name, self._key)
RuntimeError: try to get attribute: 'default', instance did not exist, was also not a method or property, was on 'corexclientfactory'
try to get attribute: 'default', instance did not exist, was also not a method or property, was on 'corexclientfactory'
and after adding this line
j.clients.corex.new("default")
after line 32 in file : /sandbox/code/github/threefoldtech/jumpscaleX/Jumpscale/servers/corex/CorexServer.py as recommended by @waleedhammam the test passed successfully.