rider
rider copied to clipboard
求助 curl -v http://127.0.0.1:8002/static-to-header 返回Head中 无< x-echo-foo: Lua is awesome!
启动日志: proxy_1 | [2022-03-28 18:01:46.954][7][debug][upstream] [external/envoy/source/common/upstream/strict_dns_cluster.cc:167] DNS refresh rate reset for web_service, refresh rate 5000 ms
curl -v http://127.0.0.1:8002/static-to-header
[root@k8s-master ~]# curl -v http://127.0.0.1:8002/static-to-header
- About to connect() to 127.0.0.1 port 8002 (#0)
- Trying 127.0.0.1...
- Connected to 127.0.0.1 (127.0.0.1) port 8002 (#0)
GET /static-to-header HTTP/1.1 User-Agent: curl/7.29.0 Host: 127.0.0.1:8002 Accept: /
< HTTP/1.1 200 OK < x-powered-by: Express < content-type: application/json; charset=utf-8 < content-length: 542 < etag: W/"21e-f89/FNAikln2H1PTo6DTuvtnrDY" < date: Mon, 28 Mar 2022 17:55:14 GMT < x-envoy-upstream-service-time: 22 < server: envoy < { "path": "/static-to-header", "headers": { "host": "127.0.0.1:8002", "user-agent": "curl/7.29.0", "accept": "/", "x-forwarded-proto": "http", "x-request-id": "4f0c50fb-55d4-465d-a5f3-654a295e59d4", "x-envoy-expected-rq-timeout-ms": "15000", "content-length": "0" }, "method": "GET", "body": "", "fresh": false, "hostname": "127.0.0.1", "ip": "::ffff:172.19.0.2", "ips": [], "protocol": "http", "query": {}, "subdomains": [], "xhr": false, "os": { "hostname": "8b9dc5e3f1f0" }
- Connection #0 to host 127.0.0.1 left intact
Sorry for late reply, it has been fixed in this pr #11
I tried the fix, but it seems still not working. I tried to add some log into echoHandler:on_response method in the echo.lua, but log didn't show up either. It seems the echo.lua didn't load successfully.
I saw some error log in log of envoy, please help to check the logic.
proxy_1 | [2022-06-04 09:57:04.762][16][debug][conn_handler] [external/envoy/source/server/connection_handler_impl.cc:501] [C2] new connection
proxy_1 | [2022-06-04 09:57:04.764][16][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:254] [C2] new stream
proxy_1 | [2022-06-04 09:57:04.765][16][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:886] [C2][S5250065885639306501] request headers complete (end_stream=true):
proxy_1 | ':authority', '127.0.0.1:8002'
proxy_1 | ':path', '/static-to-header'
proxy_1 | ':method', 'GET'
proxy_1 | 'user-agent', 'curl/7.64.1'
proxy_1 | 'accept', '*/*'
proxy_1 |
proxy_1 | [2022-06-04 09:57:04.765][16][debug][http] [external/envoy/source/common/http/filter_manager.cc:755] [C2][S5250065885639306501] request end stream
proxy_1 | --------lookupPerFilterConfig RouteConfig Address: 0x1d7cbf423090
proxy_1 | --------------lookupPerFilterConfig: echo
proxy_1 | ----------equal
`proxy_1 | [2022-06-04 09:57:04.766][16][error][lua] [source/filters/http/rider/filter.cc:269] script log: runtime error: /usr/local/lib/rider/rider/httpstream.lua:381: /usr/local/bin/envoy: undefined symbol: envoy_http_lua_ffi_get_metadata(2)`
proxy_1 | [2022-06-04 09:57:04.766][16][debug][router] [external/envoy/source/common/router/router.cc:425] [C2][S5250065885639306501] cluster 'web_service' match for URL '/static-to-header'
proxy_1 | [2022-06-04 09:57:04.766][16][debug][router] [external/envoy/source/common/router/router.cc:582] [C2][S5250065885639306501] router decoding headers:
proxy_1 | ':authority', '127.0.0.1:8002'
proxy_1 | ':path', '/static-to-header'
proxy_1 | ':method', 'GET'
proxy_1 | ':scheme', 'http'
proxy_1 | 'user-agent', 'curl/7.64.1'
proxy_1 | 'accept', '*/*'
proxy_1 | 'x-forwarded-proto', 'http'
proxy_1 | 'x-request-id', '3f3e2d11-5590-41ba-8270-11b9c7ed05ab'
proxy_1 | 'x-envoy-expected-rq-timeout-ms', '15000'
@jk-tonycui it works in my test, could you show me your response headers?