apache / servicecomb-mesher

A high performance service mesh implementation written in go
Apache License 2.0
690 stars 71 forks source link

mode=edge网关调用失败 #135

Open wanzirong opened 3 years ago

wanzirong commented 3 years ago

mesher是master分支版本

mesher.yaml文件:

mesher:
  ingress:
    type: servicecomb
    rule:
      http: |
        - host: example.com
          apiPath: /sayhello/peter
          service:
            name: RESTServer

service:

{
  "serviceId": "df61d6a27f81b5d2d7e7a76948d6af34fc40cf2c",
  "appId": "default",
  "serviceName": "RESTServer",
  "version": "0.0.1",
  "level": "BACK",
  "schemas": [
    "RESTServer"
  ],
  "status": "UP",
  "timestamp": "1605178252",
  "alias": "default:RESTServer",
  "modTimestamp": "1605178252",
  "registerBy": "SDK",
  "framework": {
    "name": "Go-Chassis",
    "version": "v2.0.2"
  }
}

执行命令:

http_proxy=http://127.0.0.1:30101 curl 'http://example.com/sayhello/peter'
curl: (52) Empty reply from server

mesher日志:

{"level":"ERROR","timestamp":"2020-11-13 12:07:08.461 +08:00","file":"handler/transport_handler.go:53","msg":"call err [Get \"http://example.com/sayhello/peter\": http: Request.RequestURI can't be set in client requests]"}
2020/11/13 12:07:08 http: panic serving 127.0.0.1:54562: invalid WriteHeader code 0

不清楚是哪里设置不对,还是执行curl命令不对?

tianxiaoliang commented 2 years ago

edge模式下,不用设置proxy,因为他是个网关,不是代理