luarocks / luarocks-site

LuaRocks website and module host
http://luarocks.org
175 stars 38 forks source link

Lapis Error: Don't know how to write: (boolean) false #156

Closed zhongweikang closed 4 years ago

zhongweikang commented 4 years ago

Hi, I could run lapis server after installed all independencies and lua modules. However, any request for the home page will get 500 error code. Have no idea what happens as found no similar issues.

error info: 2020/05/10 22:48:45 [error] 10757#0: *3 lua entry thread aborted: runtime error: /home/work/openresty/luajit/share/lua/5.1/lapis/request.lua:94: Don't know how to write: (boolean) false

stack traceback: coroutine 0: [C]: in function 'error' /home/work/openresty/luajit/share/lua/5.1/lapis/request.lua:94: in function 'write' ...ork/openresty/luajit/share/lua/5.1/lapis/application.lua:141: in function 'render_error_request' ...ork/openresty/luajit/share/lua/5.1/lapis/application.lua:177: in function 'dispatch' /home/work/openresty/luajit/share/lua/5.1/lapis/nginx.lua:230: in function 'serve' content_by_lua(nginx.conf.compiled:39):1: in main chunk, client: 10.10.24.2, server: , request: "GET / HTTP/1.1", host: "10.10.40.21:8080"

version info: lapis: 1.8.1-1 openresty: 1.15.8.2 (with luajit-2.1.0-beta3)

I saw the same problem on ISSUES Lapis Error #119 , but found no solution.

zhongweikang commented 4 years ago

I tried openresty versions 1.9.7.4, 1.11.2.1, 1.15.8.2, lapis version 1.6.0-1, 1.8.1-1,

and they all reported the same error, it should not be an openresty or lapis problem

zhongweikang commented 4 years ago

I solved this problem, the root cause of the problem is that the password of the postgres database is missing. just make the following changes https://github.com/luarocks/luarocks-site/blob/master/config.moon#L19 Add a new line like: password: "xxxx"