Closed Ostico closed 4 years ago
I tried with a fallback, this installation works:
luarocks install lua-resty-jwt 0.2.0
but it crashes:
2020/03/19 22:04:08 [warn] 7#7: *10 [lua] _G write guard:12: writing a global lua variable ('crypto') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables
stack traceback:
[C]: at 0x7fa096ec3030
[C]: in function 'require'
/usr/local/share/lua/5.1/resty/hmac.lua:4: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/resty/jwt.lua:5: in main chunk
[C]: in function 'require'
...l/openresty/lualib/lua_scripts/covid19/update_device.lua:3: in main chunk, client: 172.28.0.1, server: _, request: "PUT /device HTTP/1.1", host: "localhost"
2020/03/19 22:04:08 [warn] 7#7: *10 [lua] _G write guard:12: __newindex(): writing a global lua variable ('enc') which may lead to race conditions between concurrent requests, so prefer the use of 'local' variables
stack traceback:
/usr/local/share/lua/5.1/resty/hmac.lua:9: in main chunk
[C]: in function 'require'
/usr/local/share/lua/5.1/resty/jwt.lua:5: in main chunk
[C]: in function 'require'
...l/openresty/lualib/lua_scripts/covid19/update_device.lua:3: in main chunk, client: 172.28.0.1, server: _, request: "PUT /device HTTP/1.1", host: "localhost"
2020/03/19 22:04:09 [error] 7#7: *10 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/resty/jwt.lua:494: attempt to index field 'ALGOS' (a nil value)
stack traceback:
coroutine 0:
/usr/local/share/lua/5.1/resty/jwt.lua: in function 'sign'
...l/openresty/lualib/lua_scripts/covid19/update_device.lua:33: in main chunk, client: 172.28.0.1, server: _, request: "PUT /device HTTP/1.1", host: "localhost"
hmac installed by luarocks was in conflict with the one in this package. I removed the luarock package. Now it works đź‘Ť
@Ostico sounds like you're all set?
Closing now. If you need anything else please feel free to reach out!
hmac installed by luarocks was in conflict with the one in this package. I removed the luarock package. Now it works +1
hi can u tell me more about the solution to this problem?
what is the hmac package i have to delete?
@Ostico ?
Hi @peterDitrih
this version
luarocks install lua-resty-jwt 0.2.0
works with
luarocks: 2.4.2+dfsg-1
Hi @peterDitrih
this version
luarocks install lua-resty-jwt 0.2.0
works with
luarocks: 2.4.2+dfsg-1
do you mean you couldn’t setup version 0.2.3?
root@peter-dell:/# luarocks install lua-resty-jwt
Installing https://luarocks.org/lua-resty-jwt-0.2.3-0.src.rock
Error: Rockspec format 3.0 is not supported, please upgrade LuaRocks.
I just have the same problem and i couldn't resolve it (0.2.0 is working, but maybe i could install last version? :) )
These are the the os/server/package info. Tell me if you need more info.