xuruidong opened a new issue, #12270: URL: https://github.com/apache/apisix/issues/12270
### Current Behavior apisix.core.utils.gethostname returns "" in apache/apisix:3.11.o-redhat, not the hostname or string “unknow” ### Expected Behavior apisix.core.utils.gethostname returns the right hostname ### Error Logs ``` 2025/05/30 02:35:24 [warn] 51#51: *1 [lua] plugin.lua:957: decrypt_conf(): failed to get schema for plugin: zero-trust-auth, context: init_worker_by_lua* 2025/05/30 02:35:24 [warn] 51#51: *1 [lua] plugin.lua:957: decrypt_conf(): failed to get schema for plugin: idaas-cas, context: init_worker_by_lua* 2025/05/30 02:35:24 [warn] 51#51: *1 [lua] plugin.lua:957: decrypt_conf(): failed to get schema for plugin: zero-trust-auth, context: init_worker_by_lua* sh: /bin/hostname: No such file or directory ``` ### Steps to Reproduce 1. `git clone https://github.com/apache/apisix-docker.git` 2. `cd apisix-docker/example` 3. modify apisix docker image to apache/apisix:3.11.0-redhat in apisix-docker/example/docker-compose.yml ``` services: apisix: image: apache/apisix:${APISIX_IMAGE_TAG:-3.11.0-redhat} ``` BTW, the "apache/apisix:3.12.0-redhat" does not exist. 3. `docker-compose -p apisix up -d` 4. `docker logs -f apisix-apisix-1` , you will see 'sh: /bin/hostname: No such file or directory' in the log 5. `curl http://127.0.0.1:9092/v1/server_info` , you will see the hostname is "" ``` {"boot_time":1748572529,"etcd_version":"3.5.0","id":"eb7f4459-4920-4555-9fe9-833a4babb889","version":"3.11.0","hostname":""} ``` ### Environment - APISIX version (run `apisix version`): 3.11.0 - Operating system (run `uname -a`): - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): - APISIX Dashboard version, if relevant: - Plugin runner version, for issues related to plugin runners: - LuaRocks version, for installation issues (run `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-unsubscr...@apisix.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org