You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/12/12 06:53:12 UTC

[GitHub] [apisix] yunfhu opened a new issue #5775: request help: use stream-proxy as mysql proxy not work

yunfhu opened a new issue #5775:
URL: https://github.com/apache/apisix/issues/5775


   ### Issue description
   
   I checked the route config, found auto filled the schema with "http",is that lead to the proxy not work?
   `curl http://127.0.0.1:30080/apisix/admin/stream_routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X GET  | python -mjson.tool
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
   100   399    0   399    0     0  57000      0 --:--:-- --:--:-- --:--:-- 57000
   {
       "action": "get",
       "count": 1,
       "node": {
           "dir": true,
           "key": "/apisix/stream_routes",
           "nodes": [
               {
                   "createdIndex": 21164,
                   "key": "/apisix/stream_routes/1",
                   "modifiedIndex": 21164,
                   "value": {
                       "create_time": 1639291584,
                       "id": "1",
                       "server_addr": "10.1.2.177",
                       "server_port": 9100,
                       "update_time": 1639291584,
                       "upstream": {
                           "hash_on": "vars",
                           "nodes": {
                               "10.1.2.171:3306": 1
                           },
                           "pass_host": "pass",
                           "scheme": "http",
                           "type": "roundrobin"
                       }
                   }
               }
           ]
       }
   }`
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu closed issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu closed issue #5775:
URL: https://github.com/apache/apisix/issues/5775


   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] bisakhmondal commented on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-992198640


   @yunfhu Glad, it worked. You can also take a look at the documentation added at #5783
   Have a nice day!


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu edited a comment on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu edited a comment on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870


   login  apisix pod with kubectl exec command,I use the telnet command to check the stream proxy route, it shows able route to mysql host
   
   ```
   @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   sh-4.2# telnet localhost 9100
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   J
   5.7.36@1->t-::kmLEXU'7Lmysql_native_password
   ```
   but when I logout the pod and tried to request with the nodeport ,  the connection was closed
   
   ```
   @MacBook-Pro ~ % telnet localhost 30100
   Trying ::1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   and here is the service information:
   
   ```
   NAMESPACE     NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
   default       apisix       NodePort    10.111.193.248   <none>        9080:30080/TCP,9100:30100/TCP    39m
   ```
   


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu edited a comment on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu edited a comment on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870


   inside the apisix pod,I use the telnet command to check the stream proxy route, it shows able to route to mysql host
   
   ```
   @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   sh-4.2# telnet localhost 9100
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   J
   5.7.36@1->t-::kmLEXU'7Lmysql_native_password
   ```
   but when I use the nodeport to test proxy function,  the connection was closed
   
   ```
   @MacBook-Pro ~ % telnet localhost 30100
   Trying ::1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   and here is the service information:
   
   ```
   NAMESPACE     NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
   default       apisix       NodePort    10.111.193.248   <none>        9080:30080/TCP,9100:30100/TCP    39m
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu edited a comment on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu edited a comment on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870


   login  apisix pod with kubectl exec command,I use the telnet command to check the stream proxy route, it shows able route to mysql host
   
   ```
   @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   sh-4.2# telnet localhost 9100
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   J
   5.7.36@1->t-::kmLEXU'7Lmysql_native_password
   ```
   but when I logout the pod and tried to request with the nodeport ,  the connection was closed
   
   ```
   @MacBook-Pro ~ % telnet localhost 30100
   Trying ::1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   and here is the service information:
   
   ```
   NAMESPACE     NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
   default       apisix       NodePort    10.111.193.248   <none>        9080:30080/TCP,9100:30100/TCP    39m
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu commented on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu commented on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-992060431


   
   
   
   
   > @bisakhmondal
   > Could you check if MySQL can be proxied via APISIX? Thanks!
   pls read previous comments which described very clearly


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu edited a comment on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu edited a comment on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870


   login  apisix pod with kubectl exec command,I use the telnet command to check the stream proxy route, it shows able route to mysql host
   
   ```
   @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   sh-4.2# telnet localhost 9100
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   J
   5.7.36@1->t-::kmLEXU'7Lmysql_native_password
   ```
   but when I logout the pod and tried to request with the nodeport ,  the connection was closed
   
   ```
   @MacBook-Pro ~ % telnet localhost 30100
   Trying ::1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   and here is the service information:
   
   ```
   NAMESPACE     NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
   default       apisix       NodePort    10.111.193.248   <none>        9080:30080/TCP,9100:30100/TCP    39m
   ```
   
   it seems the issue similar to this link :https://issueexplorer.com/issue/apache/apisix-ingress-controller/652 described


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu edited a comment on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu edited a comment on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870


   inside the apisix pod,I use the telnet command to check the stream proxy route, it shows able route to mysql host
   
   ```
   @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   sh-4.2# telnet localhost 9100
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   J
   5.7.36@1->t-::kmLEXU'7Lmysql_native_password
   ```
   but when I use the nodeport to test proxy function,  the connection was closed
   
   ```
   @MacBook-Pro ~ % telnet localhost 30100
   Trying ::1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   and here is the service information:
   
   ```
   NAMESPACE     NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
   default       apisix       NodePort    10.111.193.248   <none>        9080:30080/TCP,9100:30100/TCP    39m
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu edited a comment on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu edited a comment on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870


   login  apisix pod with kubectl exec command,I use the telnet command to check the stream proxy route, it shows able route to mysql host
   
   ```
   @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   sh-4.2# telnet localhost 9100
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   J
   5.7.36@1->t-::kmLEXU'7Lmysql_native_password
   ```
   but when I logout the pod and tried to request with the nodeport ,  the connection was closed
   
   ```
   @MacBook-Pro ~ % telnet localhost 30100
   Trying ::1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   and here is the service information:
   
   ```
   NAMESPACE     NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
   default       apisix       NodePort    10.111.193.248   <none>        9080:30080/TCP,9100:30100/TCP    39m
   ```
   
   ```
   @MacBook-Pro ~ % kubectl describe service apisix
   Name:                     apisix
   Namespace:                default
   Labels:                   io.kompose.service=apisix
   Annotations:              kompose.cmd: kompose convert
                             kompose.version: 1.24.0 (HEAD)
   Selector:                 io.kompose.service=apisix
   Type:                     NodePort
   IP Families:              <none>
   IP:                       10.111.193.248
   IPs:                      <none>
   LoadBalancer Ingress:     localhost
   Port:                     http-proxy  9080/TCP
   TargetPort:               9080/TCP
   NodePort:                 http-proxy  30080/TCP
   Endpoints:                10.1.2.186:9080
   Port:                     tcp-proxy  9100/TCP
   TargetPort:               9100/TCP
   NodePort:                 tcp-proxy  30100/TCP
   Endpoints:                10.1.2.186:9100
   Session Affinity:         None
   External Traffic Policy:  Cluster
   Events:                   <none>
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu commented on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu commented on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870


   inside the apisix pod,I use the telnet command to check the stream proxy route, it shows ok
   
   ```
   @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   sh-4.2# telnet localhost 9100
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   J
   5.7.36@1->t-::kmLEXU'7Lmysql_native_passwordConne
   ```
   but when I use the nodeport to test proxy function, the connection was closed
   
   ```
   @MacBook-Pro ~ % telnet localhost 30100
   Trying ::1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   and here is the service information:
   
   ```
   NAMESPACE     NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
   default       apisix       NodePort    10.111.193.248   <none>        9080:30080/TCP,9100:30100/TCP    39m
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-992039348


   @bisakhmondal 
   Could you check if MySQL can be proxied via APISIX? Thanks!


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu edited a comment on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu edited a comment on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-991911870


   login  apisix pod with kubectl exec command,I use the telnet command to check the stream proxy route, it shows able route to mysql host
   
   ```
   @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   sh-4.2# telnet localhost 9100
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   J
   5.7.36@1->t-::kmLEXU'7Lmysql_native_password
   ```
   but when I logout the pod and tried to request with the nodeport ,  the connection was closed
   
   ```
   @MacBook-Pro ~ % telnet localhost 30100
   Trying ::1...
   Connected to localhost.
   Escape character is '^]'.
   Connection closed by foreign host.
   ```
   and here is the service information:
   
   ```
   NAMESPACE     NAME         TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)                          AGE
   default       apisix       NodePort    10.111.193.248   <none>        9080:30080/TCP,9100:30100/TCP    39m
   ```
   
   ```
   @MacBook-Pro ~ % kubectl describe service apisix
   Name:                     apisix
   Namespace:                default
   Labels:                   io.kompose.service=apisix
   Annotations:              kompose.cmd: kompose convert
                             kompose.version: 1.24.0 (HEAD)
   Selector:                 io.kompose.service=apisix
   Type:                     NodePort
   IP Families:              <none>
   IP:                       10.111.193.248
   IPs:                      <none>
   LoadBalancer Ingress:     localhost
   Port:                     http-proxy  9080/TCP
   TargetPort:               9080/TCP
   NodePort:                 http-proxy  30080/TCP
   Endpoints:                10.1.2.186:9080
   Port:                     tcp-proxy  9100/TCP
   TargetPort:               9100/TCP
   NodePort:                 tcp-proxy  30100/TCP
   Endpoints:                10.1.2.186:9100
   Session Affinity:         None
   External Traffic Policy:  Cluster
   Events:                   <none>
   ```
   and the apisix pod information:
   
   ```
   @MacBook-Pro ~ % kubectl describe pod apisix-557f5f646f-r69z9 
   Name:         apisix-557f5f646f-r69z9
   Namespace:    default
   Priority:     0
   Node:         docker-desktop/192.168.65.4
   Start Time:   Sun, 12 Dec 2021 22:39:14 +0800
   Labels:       io.kompose.network/apisix=true
                 io.kompose.service=apisix
                 pod-template-hash=557f5f646f
   Annotations:  kompose.cmd: kompose convert
                 kompose.version: 1.24.0 (HEAD)
   Status:       Running
   IP:           10.1.2.186
   IPs:
     IP:           10.1.2.186
   Controlled By:  ReplicaSet/apisix-557f5f646f
   Containers:
     apisix:
       Container ID:   docker://e9d11d0e8681b4bd18162fa7cb4cdf5288a172a3e4b78ccd0687ddfdbd1d685e
       Image:          apache/apisix:2.11-centos
       Image ID:       docker://sha256:f833f46f66c33d4b24e94944129024e6002724b147b701840c807aac9a0b38e7
       Ports:          9080/TCP, 9091/TCP, 9443/TCP, 9100/TCP
       Host Ports:     0/TCP, 0/TCP, 0/TCP, 0/TCP
       State:          Running
         Started:      Sun, 12 Dec 2021 22:39:15 +0800
       Ready:          True
       Restart Count:  0
       Environment:    <none>
       Mounts:
         /usr/local/apisix/conf/config.yaml from apisix-claim1 (ro,path="config.yaml")
         /usr/local/apisix/logs from apisix-claim0 (rw)
         /usr/local/apisix/third from third-plugins (rw)
         /var/run/secrets/kubernetes.io/serviceaccount from default-token-km5r5 (ro)
   Conditions:
     Type              Status
     Initialized       True 
     Ready             True 
     ContainersReady   True 
     PodScheduled      True 
   Volumes:
     apisix-claim0:
       Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
       ClaimName:  apisix-claim0
       ReadOnly:   false
     apisix-claim1:
       Type:      ConfigMap (a volume populated by a ConfigMap)
       Name:      apisix-config
       Optional:  false
     third-plugins:
       Type:          HostPath (bare host directory volume)
       Path:          /Users/hyunfei/IdeaProjects/APISIX/apisix-docker/example/apisix-lua
       HostPathType:  
     default-token-km5r5:
       Type:        Secret (a volume populated by a Secret)
       SecretName:  default-token-km5r5
       Optional:    false
   QoS Class:       BestEffort
   Node-Selectors:  <none>
   Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                    node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
   Events:
     Type    Reason     Age   From               Message
     ----    ------     ----  ----               -------
     Normal  Scheduled  32m   default-scheduler  Successfully assigned default/apisix-557f5f646f-r69z9 to docker-desktop
     Normal  Pulled     32m   kubelet            Container image "apache/apisix:2.11-centos" already present on machine
     Normal  Created    32m   kubelet            Created container apisix
     Normal  Started    32m   kubelet            Started container apisix
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] yunfhu commented on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
yunfhu commented on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-992194387


   @bisakhmondal thanks for your advice, the access works now


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] bisakhmondal commented on issue #5775: request help: stream-proxy as mysql proxy not work

Posted by GitBox <gi...@apache.org>.
bisakhmondal commented on issue #5775:
URL: https://github.com/apache/apisix/issues/5775#issuecomment-992123547


   Hi @yunfhu, thanks for the detailed analysis
    
   > login apisix pod with kubectl exec command,I use the telnet command to check the stream proxy route, it shows able route to mysql host
   > 
   > ```
   > @MacBook-Pro APISIX % kubectl exec -it apisix-557f5f646f-r69z9 sh
   > kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] -- [COMMAND] instead.
   > sh-4.2# telnet localhost 9100
   > Trying 127.0.0.1...
   > Connected to localhost.
   > Escape character is '^]'.
   > J
   > 5.7.36@1->t-::kmLEXU'7Lmysql_native_password
   > ```
   
   Yes, I also have tested locally, there is no issue from the APISIX side while proxying the request to the MySQL server with the correct route configuration. 
   
   > but when I logout the pod and tried to request with the node port, the connection was closed
   > 
   > ```
   > @MacBook-Pro ~ % telnet localhost 30100
   > Trying ::1...
   > Connected to localhost.
   > Escape character is '^]'.
   > Connection closed by foreign host.
   > ```
   
   Got your point. 
   >"value": {
   "create_time": 1639291584,
   "id": "1",
   "server_addr": "10.1.2.177",
   "server_port": 9100,
   "update_time": 1639291584,
   "upstream": {
   "hash_on": "vars",
   "nodes": {
   "10.1.2.171:3306": 1
   },
   "pass_host": "pass",
   "scheme": "http",
   "type": "roundrobin"
   }
   
   Just curious why do you have `server_addr` filter enabled for port `10.1.2.177` while from the kubectl I can see your APISIX server is running on `10.1.2.186`. (see [here](https://nginx.org/en/docs/http/ngx_http_core_module.html#var_server_addr))
   
   Could you please check if you can access the mysql through the k8s nodeport for this stream route config: 
   ```json
   {
       "upstream": {
           "nodes": {
               "10.1.2.171:3306": 1
           },
           "type": "roundrobin"
       }
   }
   ```
   assuming you can access the mysql at `10.1.2.171:3306`. Thanks. 


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org