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

   ### Current Behavior
   
   config etcd http tls enabled。
   ```
                  ssl:
                    enable: true
                    listen:
                      - port: 9443
                        enable_http2: true
                    ssl_trusted_certificate: /usr/local/apisix/ssl/ca.pem
                deployment:
                  role: traditional
                  role_traditional:
                    config_provider: etcd
                  etcd:
                    host:                          # it's possible to define 
multiple etcd hosts addresses of the same etcd cluster.
                      - \"https://10.1.1.100:2379\";
                      - \"https://10.1.1.120:2379\";
                      - \"https://10.1.1.130:2379\";
                    prefix: \"/apisix\"    # configuration prefix in etcd
                    timeout: 30    # 30 seconds
                    tls:
                      cert: /etcd-ssl/tls.crt
                      key: /etcd-ssl/tls.key
   ```
   curl 
   ```
   curl -i "http://127.0.0.1:9180/apisix/admin/routes"; -X PUT -d '
   > {            
   >   "id": "getting-started-ip",
   >   "uri": "/ip",
   >   "upstream": {
   >     "type": "roundrobin",
   >     "nodes": {
   >       "httpbin.org:80": 1
   >     }
   >   }
   > }'
   HTTP/1.1 503 Service Temporarily Unavailable
   Date: Thu, 21 Sep 2023 04:41:05 GMT
   Content-Type: application/json
   Transfer-Encoding: chunked
   Connection: keep-alive
   Server: APISIX/3.5.0
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   Access-Control-Expose-Headers: *
   Access-Control-Max-Age: 3600
   X-API-VERSION: v3
   
   {"error_msg":"invalid response code: 503"}
   ```
   
   pod logs
   
   
   ### Expected Behavior
   
   ```
   curl -i "http://127.0.0.1:9180/apisix/admin/routes"; -X PUT -d '
   > {            
   >   "id": "getting-started-ip",
   >   "uri": "/ip",
   >   "upstream": {
   >     "type": "roundrobin",
   >     "nodes": {
   >       "httpbin.org:80": 1
   >     }
   >   }
   > }'
   OK
   ```
   
   ### Error Logs
   
   pod logs
   
[logs-from-apisix-in-apisix-f98dcb7d7-rls6h.log](https://github.com/apache/apisix/files/12680285/logs-from-apisix-in-apisix-f98dcb7d7-rls6h.log)
   
   
   ### Steps to Reproduce
   
   Kubernetes yaml
   [apisix.txt](https://github.com/apache/apisix/files/12680301/apisix.txt)
   
   etcd config
   ```
   cat /opt/etcd/cfg/etcd.conf 
   #[Member]
   ETCD_NAME="etcd-2"
   ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
   ETCD_LISTEN_PEER_URLS="https://10.1.1.130:2380";
   ETCD_LISTEN_CLIENT_URLS="https://10.1.1.130:2379,http://127.0.0.1:2379";
   
   #[Clustering]
   ETCD_INITIAL_ADVERTISE_PEER_URLS="https://10.1.1.130:2380";
   ETCD_ADVERTISE_CLIENT_URLS="https://10.1.1.130:2379,http://127.0.0.1:2379";
   
ETCD_INITIAL_CLUSTER="etcd-1=https://10.1.1.100:2380,etcd-2=https://10.1.1.130:2380,etcd-3=https://10.1.1.120:2380";
   ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster"
   ETCD_INITIAL_CLUSTER_STATE="new"
   ```
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.5.0
   - Operating system (run `uname -a`): Linux apisix-f98dcb7d7-vkcnm 
3.10.0-1160.el7.x86_64
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): openresty -V
   nginx version: openresty/1.21.4.2
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`): 
{"version":"3.5.0","etcd_version":"unknown","boot_time":1695270808,"hostname":"apisix-f98dcb7d7-vkcnm","id":"08a48b78-1a1f-460f-8f38-7b888d420316"}
   


-- 
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