You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "pronchakov (via GitHub)" <gi...@apache.org> on 2026/01/09 13:13:26 UTC
[I] bug: pulling env vars in yaml keys works, but results in error message in logs [apisix]
pronchakov opened a new issue, #12884:
URL: https://github.com/apache/apisix/issues/12884
### Current Behavior
When using ENV vars in yaml keys, for example in
```
upstream:
nodes:
"${{HOST}}": 1
```
The actual routing is works, but log messages appears:
> failed to parse domain: ${{HOST}}, error: failed to query the DNS server: dns server error: 3 name error
But the routing works even with this error message.
### Expected Behavior
Routing should work without error message referring failed dns query on unresolved variable name.
### Error Logs
2026/01/09 16:02:05 [error] 35#35: *798 [lua] resolver.lua:80: parse_domain(): failed to parse domain: ${{HOST}}, error: failed to query the DNS server: dns server error: 3 name error, client: 172.18.0.1, server: _, request: "GET /img/favicon.svg HTTP/2.0", host: "local.example.ru", referrer: "https://local.example.ru/"
2026/01/09 16:02:05 [error] 35#35: *798 [lua] upstream.lua:97: parse_domain_for_nodes(): dns resolver domain: ${{HOST}} error: failed to query the DNS server: dns server error: 3 name error, client: 172.18.0.1, server: _, request: "GET /img/favicon.svg HTTP/2.0", host: "local.example.ru", referrer: "https://local.example.ru/"
### Steps to Reproduce
1. Configure apisix in standalone mode.
2. Add route
```
routes:
- uri: /*
upstream:
nodes:
"${{HOST}}": 1
type: roundrobin
```
3. Add environment variable
`export HOST=localhost:8080`
4. Start apisix
5. Request resource that matches configured route.
6. Observe requested resource (routing works)
7. Observe log message with an error "failed to parse domain: ${{HOST}}"
### Environment
- APISIX version (run `apisix version`): 3.14.1
- Operating system (run `uname -a`): docker image apache/apisix:3.14.1-debian
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`): Not applicable
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): Not applicable
- APISIX Dashboard version, if relevant: Not applicable
- Plugin runner version, for issues related to plugin runners: Not applicable
- LuaRocks version, for installation issues (run `luarocks --version`): Not applicable
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] bug: pulling env vars in yaml keys works, but results in error message in logs [apisix]
Posted by "AlinsRan (via GitHub)" <gi...@apache.org>.
AlinsRan closed issue #12884: bug: pulling env vars in yaml keys works, but results in error message in logs
URL: https://github.com/apache/apisix/issues/12884
--
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
Re: [I] bug: pulling env vars in yaml keys works, but results in error message in logs [apisix]
Posted by "pronchakov (via GitHub)" <gi...@apache.org>.
pronchakov commented on issue #12884:
URL: https://github.com/apache/apisix/issues/12884#issuecomment-3728879371
The problem is in function `resolve_conf_var(conf)` inside `cli/file.lua`.
I'll write a PR
--
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