apisix-docker
apisix-docker copied to clipboard
help: 使用example项目创建的服务,启动后 apisix_log/error.log 一直warn
使用的是 example 目录,创建的docker 服务,error.log 一直 warn. 这个关系大吗,需要额外处理吗。
` 2022/09/05 14:11:32 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:19:37 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:20:02 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:20:12 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:20:47 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:36:02 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:37:22 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:37:27 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:44:37 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091" 2022/09/05 14:49:02 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091"
`
Please read your error logs carefully, it already tells you the fact. You should check why the ETCD cluster domain cannot be resolved.
部署在一个ECS上,

1.docker-compose.yml ` version: "3"
services: apisix-dashboard: image: apache/apisix-dashboard:2.13-alpine restart: always volumes: - ./dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml ports: - "9000:9000" environment: - TZ=Asia/Shanghai networks: apisix:
apisix: image: apache/apisix:2.15.0-alpine restart: always volumes: - ./apisix_log:/usr/local/apisix/logs - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro environment: - TZ=Asia/Shanghai depends_on: - etcd ##network_mode: host ports: - "80:9080/tcp" - "9091:9091/tcp" - "443:9443/tcp" - "9092:9092/tcp" networks: apisix:
etcd: image: bitnami/etcd:3.4.15 restart: always volumes: - etcd_data:/bitnami/etcd environment: ETCD_ENABLE_V2: "true" ALLOW_NONE_AUTHENTICATION: "yes" ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379" ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379" TZ: "Asia/Shanghai" ports: - "2379:2379/tcp" networks: apisix:
web2: image: nginx:1.19.0-alpine restart: always volumes: - ./upstream/web2.conf:/etc/nginx/nginx.conf ports: - "9082:80/tcp" environment: - NGINX_PORT=80 - TZ=Asia/Shanghai networks: apisix:
prometheus: image: prom/prometheus:v2.25.0 restart: always volumes: - ./prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml environment: - TZ=Asia/Shanghai ports: - "9090:9090" networks: apisix:
grafana: image: grafana/grafana:7.3.7 restart: always ports: - "3000:3000" volumes: - "./grafana_conf/provisioning:/etc/grafana/provisioning" - "./grafana_conf/dashboards:/var/lib/grafana/dashboards" - "./grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini" environment: - TZ=Asia/Shanghai networks: apisix:
networks: apisix: driver: bridge
volumes: etcd_data: driver: local `
2.apisix_config/config.yml ` apisix: node_listen: 9080 # APISIX listening port enable_ipv6: false
allow_admin: # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow - 0.0.0.0/0 # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
admin_key: - name: "admin" #key: xx key: admin role: admin # admin: manage all configuration data # viewer: only can view configuration data - name: "viewer" key: dsf! role: viewer
enable_control: true control: ip: "0.0.0.0" port: 9092
etcd: host: # it's possible to define multiple etcd hosts addresses of the same etcd cluster. - "http://etcd:2379" # multiple etcd address prefix: "/apisix" # apisix configurations prefix timeout: 30 # 30 seconds
plugin_attr:
prometheus:
export_addr:
ip: "0.0.0.0"
port: 9091
3.warn信息 error.log
2022/09/06 08:18:09 [warn] 45#45: *1123430 [lua] v3.lua:213: _request_uri(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.27.0.4, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091"
2022/09/06 08:18:54 [warn] 45#45: *1123430 [lua] v3.lua:213: _request_uri(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.27.0.4, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091"
`
@tokers 还能帮忙再看下吗,配置文件和服务都启动,上方截图。apisix 资料太少都是官网资料,kong的资料网上就多一些。
Please read your error logs carefully, it already tells you the fact. You should check why the ETCD cluster domain cannot be resolved.
I already tell you the way.
2022/09/05 14:11:32 [warn] 44#44: *10989114 [lua] v3.lua:213: version(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.25.0.5, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091"
This error log reminded me of this question: https://github.com/apache/apisix/issues/7715
In fact, if you have an environment that can be consistently reproduced, I would track it.
ECS centos7.6
使用这个项目中的 example 中创建的服务 ,在两台ECS上,都是这种错误。你们可以docker创建试下。另外还需要提供什么资料。
ECS centos7.6
使用这个项目中的例子中创建的服务,在两台ECS上,都是错误的。你们可以创建下docker。另外还需要提供什么资料。
Can you provide an online reproduction environment and send it to me via email? I don't have such an environment locally (I've started it many times via the example of the apisix-docker project without this problem)
要改为容器内的ip才行,域名解析有问题
This issue has been marked as stale due to 30 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.
This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.