Comments (5)
from haproxy.
The wrapper adds the (undocumented) -Ds
flag to haproxy, which is specific to systemd.
from haproxy.
From https://manpages.debian.org/stretch/haproxy/haproxy.1.en.html:
-Ds
Start in systemd daemon mode, keeping a process in foreground.
Keeping a process in the foreground is exactly what we need -- they added it for systemd, because that's how one normally runs processes in systemd, but it's useful for Docker as well (because Docker requires that processes run in the same "foregrounded daemon" way). Even if we weren't using the haproxy-systemd-wrapper
, we'd still be using -Ds
.
Also, it's our entrypoint script which adds this, and only does so conditionally based on the intended command being simply haproxy
, so it should be trivial to bypass at runtime. If you wanted something hacky, you could go as simple as something like the following: (as discussed over in #39)
$ docker run -dit haproxy bash -c 'syslogd -O /proc/1/fd/1 -S -D; exec haproxy -f /usr/local/etc/haproxy/haproxy.cfg -Ds'
from haproxy.
@tianon, thanks for the help. I've done some poking around and I see that haproxy seems to ignore signals unless you're using that wrapper. The thing I don't understand is why logging doesn't work when I start haproxy via the wrapper. I've tried adding syslogd -O /proc/1/fd/1
to the entrypoint script and it doesn't give me any logs. Is this a known bug, or is my configuration wrong somehow?
from haproxy.
Sorry for the delay -- that's a quirk of HAProxy: it will only log to syslog. I'm not sure why your starting syslogd
didn't work, but there's more discussion of that over in #39.
Closing since the original question here seems to be resolved. 👍
from haproxy.
Related Issues (20)
- I'm using this: HOT 2
- Release haproxy image with lua version >= 5.4.2 HOT 2
- High CPU usage with 2.6.3 (latest) docker image HOT 4
- Cannot open configuration file /usr/local/etc/haproxy/haproxy.cfg: No such file or directory HOT 6
- Memory exhaustion using haproxy image HOT 3
- OOM killed using haproxy image HOT 5
- core dumps not being stored HOT 7
- Use /var/run/docker.sock as backend server HOT 2
- Why build from source code? HOT 2
- [ALERT] (1) : [haproxy.main()] Cannot create pidfile /var/run/haproxy.pid HOT 2
- If you have a new enough kernel (`4.11`), then adding `--sysctl net.ipv4.ip_unprivileged_port_start=0` to the `docker run` should allow it to use "privileged" ports (https://github.com/moby/moby/issues/8460). HOT 1
- CVE-2023-25725 HOT 6
- How to deal with "Failed to drop supplementary groups"? HOT 2
- Vulnerable component detection issue HOT 3
- "ltime" converter does not reflect container timezone HOT 4
- Haproxy not reloading config in docker HOT 1
- Crtitical/high vulnerabilities in all haproxy:bullseye images HOT 3
- HAProxy crashing on start, thread 2 is about to kill the process. HOT 11
- Images contain `*-dev` packages that are used to build HAProxy but which are useless at runtime
- Use multi-stage build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haproxy.