第一种情况是,使用rewrite组件ngx.req.set_uri(ngx.ctx.targetPath)
failed to run balancer_by_lua*: /Users/tietang/openresty/lua/lib/plugins/eureka/handler.lua:259: attempt to index local 'balancer' (a userdata value)
第二种情况是,不使用ngx.req.set_uri(ngx.ctx.targetPath)
-- failed to run balancer_by_lua*: /Users/tietang/openresty/lualib/ngx/balancer.lua:5: attempt to call field 'allows_subsystem' (a nil value)
但无论哪种方法,只要屏蔽ngx.balancer第5行代码即能正确运行:
base.allows_subsystem('http', 'stream')
注释这行代码是否会有影响?或者有没有其他解决方法。