-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: can not get hostname in redhat #12267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Hi @xuruidong, can you create an issue first and include minimal steps to reproduce it? |
done |
location /t { | ||
content_by_lua_block { | ||
local core = require("apisix.core") | ||
local hostname = core.utils.gethostname() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the test environment contains /bin/hostname
, please use the old method and the new method to obtain the hostname and compare them here. This will help verify whether gethostname is being used correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Hi @xuruidong, please fix failed ci |
Description
I use docker image apache/apisix:3.11.0-redhat , and get an error from the log: "sh: /bin/hostname: No such file or directory"

Which issue(s) this PR fixes:
Fixes #12270
Checklist