Baoyuantop commented on issue #12381:
URL: https://github.com/apache/apisix/issues/12381#issuecomment-3026580270
I can't reproduce this problem locally. This is my configuration file:
```
version: "3"
services:
apisix:
image: apache/apisix:${APISIX_IMAGE_TAG:-3.9.1-debian}
restart: always
volumes:
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
depends_on:
- etcd
##network_mode: host
ports:
- "9180:9180/tcp"
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
networks:
apisix:
etcd:
image: bitnami/etcd:3.5.11
restart: always
volumes:
- etcd_data:/bitnami/etcd
environment:
ETCD_ENABLE_V2: "true"
ALLOW_NONE_AUTHENTICATION: "yes"
ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"
ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
ports:
- "2379:2379/tcp"
networks:
apisix:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.1
ports:
- "9200:9200"
- "9300:9300"
environment:
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- discovery.type=single-node
- xpack.security.enabled=false
networks:
apisix:
kibana:
image: docker.elastic.co/kibana/kibana:7.17.1
ports:
- "5601:5601"
environment:
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
networks:
apisix:
networks:
apisix:
driver: bridge
volumes:
etcd_data:
driver: local
```
create a route and global rule
```
{
"uri": "/ip",
"upstream": {
"nodes": {
"httpbin.org:80": 1
},
"type": "roundrobin"
}
}
```
```
{
"plugins": {
"elasticsearch-logger": {
"endpoint_addrs": [
"http://elasticsearch:9200"
],
"field": {
"index": "gateway",
"type": "logs"
},
"ssl_verify": false,
"timeout": 60,
"retry_delay": 1,
"buffer_duration": 60,
"max_retry_count": 0,
"batch_max_size": 5,
"inactive_timeout": 5
}
}
}
```
send a request like
```
curl -i
"127.0.0.1:9080/ip?projectCode=P4065&beginDate=2019-11-01%2000:00:00&endDate=2019-11-01%2000:00:00"
```
and
```
curl -i "127.0.0.1:9080/ip?projectCode=P4065&beginDate&endDate"
```
I can see the logs in kibana
```
apisix_latency:33 client_ip:192.168.148.1 latency:607
request.headers.accept:*/* request.headers.host:127.0.0.1:9080
request.headers.user-agent:curl/8.7.1 request.method:GET
request.querystring.beginDate:2019-11-01 00:00:00
request.querystring.beginDate.keyword:2019-11-01 00:00:00
request.querystring.endDate:2019-11-01 00:00:00
request.querystring.endDate.keyword:2019-11-01 00:00:00
request.querystring.projectCode:P4065
request.querystring.projectCode.keyword:P4065 request.size:159
request.uri:/ip?projectCode=P4065&beginDate=2019-11-01%2000:00:00&endDate=2019-11-01%2000:00:00
request.url:http://127.0.0.1:9080/ip?projectCode=P4065&beginDate=2019-11-01%2000:00:00&endDate=2019-11-01%2000:00:00
response.headers.access-control-allow-credentials:true
response.headers.access-control-allow-origin:*
response.headers.connection:close response.headers.content-length:46
response.headers.content-type:application/json response.headers.date:Wed, 02
Jul 2025 06:03:30 GMT
```
```
apisix_latency:106 client_ip:192.168.148.1 latency:588
request.headers.accept:*/* request.headers.host:127.0.0.1:9080
request.headers.user-agent:curl/8.7.1 request.method:GET
request.querystring.beginDate:true request.querystring.beginDate.keyword:true
request.querystring.endDate:true request.querystring.endDate.keyword:true
request.querystring.projectCode:P4065
request.querystring.projectCode.keyword:P4065 request.size:115
request.uri:/ip?projectCode=P4065&beginDate&endDate
request.url:http://127.0.0.1:9080/ip?projectCode=P4065&beginDate&endDate
response.headers.access-control-allow-credentials:true
response.headers.access-control-allow-origin:*
response.headers.connection:close response.headers.content-length:46
response.headers.content-type:application/json response.headers.date:Wed, 02
Jul 2025 06:05:05 GMT response.headers.server:APISIX/3.9.1 response.size:272
response.status:200 route_id:1 server.hostname:3f67f911a73a
```
--
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]