灰度发布时无法访问主页
来源:4-32 Nginx与Lua的开发_实战场景灰度发布场景演示2
江湖你力哥
2017-08-27
Nginx配置文件如下
/opt/lua/dep.lua文件内容如下
相关报错信息如下
2017/08/27 17:27:54 [error] 16716#16716: *506 lua entry thread aborted: runtime error: /opt/lua/dep.lua:30: attempt to call ngx.exec after sending out response headers
stack traceback:
coroutine 0:
[C]: in function 'exec'
/opt/lua/dep.lua:30: in function </opt/lua/dep.lua:1>, client: 192.168.31.70, server: localhost, request: "GET / HTTP/1.1", host: "192.168.31.100"
2017/08/27 17:28:00 [error] 16716#16716: *507 lua entry thread aborted: runtime error: /opt/lua/dep.lua:30: attempt to call ngx.exec after sending out response headers
stack traceback:
coroutine 0:
[C]: in function 'exec'
/opt/lua/dep.lua:30: in function </opt/lua/dep.lua:1>, client: 192.168.31.70, server: localhost, request: "GET / HTTP/1.1", host: "192.168.31.100"
2回答
-
慕用8338351
2018-02-04
把 --ngx.say("value key: ",res,clientIP) 注释掉,亲测。
00 -
Jeson
2017-08-29
你好,看了你提供的错误中,无法给你定位到最终的原因,你可以尝试如下:
1、看下脚本dep.lua中的30行内容是什么?“ /opt/lua/dep.lua:30”
2、看看后端服务是否都正常,可以访问。可以用curl http://127.0.0.1:8080/+请求路径,curl http://127.0.0.1:9090/+请求路径 分别测试下,是否正常返回。
00
相似问题