Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
441 views
in Technique[技术] by (71.8m points)

haproxy logs in a kubernetes container

I'm trying to run haproxy in a container deployed by kubernetes but it won't start from my entry script, when I logged into the container and tried to start it by hand I get:

[ALERT] 021/125902 (998) : sendto logger #1 failed: No such file or directory (errno=2)

The haproxy config I have for logging is:

log /dev/log    local2 debug

And in /etc/rsyslog.conf I have:

local2.* /etc/haproxy/logs/haproxy.log

I have /etc/haproxy as a shared volume mount in the container. So I want to send the logs to a file. The problem I have is that systemd-journald is not running in the container (from google searches seems like getting it to run is not straight forward). The error that haproxy is complained about is because there is no /dev/log in the container. So How do I get haproxy logs from my container?

question from:https://stackoverflow.com/questions/65845801/haproxy-logs-in-a-kubernetes-container

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...