wxbty opened a new issue, #9624:
URL: https://github.com/apache/apisix/issues/9624

   ### Description
   
   When I use the guidelines of 
https://apisix.apache.org/zh/docs/apisix/stream-proxy/, I opened the tcp stream 
proxy. When I create the following route, redis works fine.
   curl http://127.0.0.1:9180/apisix/admin/stream_routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
        "remote_addr": "127.0.0.1",
        "upstream": {
            "nodes": {
                "127.0.0.1:6379": 1
            },
            "type": "roundrobin"
        }
   }'
   
   redis-cli -p 9100
   127.0.0.1:9100> get name
   "zhangsan"
   127.0.0.1:9100>
   
   However, when I update stream_routes/1 and change the port 6379 to dubbo's 
20881, dubbo returns failure.
   The steps to reproduce are as follows:
   1. Start dubbo provider
   2. Configure dubbo consumer, access provider by url
   @DubboReference(url="dubbo://127.0.0.1:20881")
        private GameService gameService;
   3. The consumer access is successful
   4. Replace the port with the stream port of apisix
   @DubboReference(url="dubbo://127.0.0.1:9100")
        private GameService gameService;
   6. The consumer reports an error
   org.apache.dubbo.rpc.RpcException: Failed to invoke the method play in the 
service site.zfei.api.GameService. No provider available ...
   
   In the above example, redis is normal, but dubbo reports an error. Turn on 
the access_log switch as follows.
      stream:
        enable_access_log: true
        access_log: logs/access_stream.log
   Regardless of redis or dubbo requests, no logs are seen in access_stream.log 
or error.log
   
   ### Environment
   
   APISIX version (run apisix version): master latest
   Operating system (run uname -a): centos7
   OpenResty / Nginx version (run openresty -V or nginx -V): openresty/1.21.4.1
   etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info): 
3.5.0
   APISIX Dashboard version, if relevant:
   Plugin runner version, for issues related to plugin runners:
   LuaRocks version, for installation issues (run luarocks --version):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to