Open yongdi opened 6 years ago
2018/10/29 11:16:50 [error] 15232#0: *1462 [lua] utils.lua:32: dolog(): errcode : 200, errinfo : success redirect to upstream http://, client: 172...36, server: api-test.....com, request: "GET /1.0/phone/learn_more?uid=1003217&sig=77c2dd4c4eb5c8029ae795b6e473f89d%20HTTP/1.1 HTTP/1.1", host: "10....8"
比如这种,redirect to upstream http:// 啥也没有。 我用的是单层分流版本,就是uidsuffix,很简单的策略。
配置如下: ———————————————— `upstream tiny-stable { server 10....30:21110 max_fails=3 fail_timeout=30s; server 10...31:21110 max_fails=3 fail_timeout=30s; } upstream beta { server 10.....86:21110 max_fails=3 fail_timeout=30s; } ...
location /xxx/ { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; real_ip_header X-Real-IP; # proxy_set_header Connection ""; # proxy_http_version 1.1; rewrite /xxx/(.+)$ /$1 break; set $backend $default_backend; rewrite_by_lua_file '../diversion/diversion.lua'; proxy_pass http://$backend; }
`
你好,你的backend 应该是没有设置默认值。导致upstream是空
2018/10/29 11:16:50 [error] 15232#0: *1462 [lua] utils.lua:32: dolog(): errcode : 200, errinfo : success redirect to upstream http://, client: 172...36, server: api-test.....com, request: "GET /1.0/phone/learn_more?uid=1003217&sig=77c2dd4c4eb5c8029ae795b6e473f89d%20HTTP/1.1 HTTP/1.1", host: "10....8"
比如这种,redirect to upstream http:// 啥也没有。 我用的是单层分流版本,就是uidsuffix,很简单的策略。
当用一个新uid的时候,错误必现,redirect为空,nginx返回500
配置如下: ———————————————— `upstream tiny-stable { server 10....30:21110 max_fails=3 fail_timeout=30s; server 10...31:21110 max_fails=3 fail_timeout=30s; } upstream beta { server 10.....86:21110 max_fails=3 fail_timeout=30s; } ...
`