Repository navigation
[BUGFIX] Let syslog-ng take the messages of the services on Alpine - #623
Merged
Kanti merged 1 commit intoNov 15, 2026
Merged
Conversation
syslog-ng listened on /dev/log as a stream socket. syslog() of musl, and so cron, Postfix and logger on Alpine, sends datagrams only, so their messages were lost: they reached neither the container log nor the file of LOG_STDOUT. A datagram socket takes them; glibc tries datagrams first too, so nothing changes on Debian and Ubuntu. The image tests send a message with logger and check that it arrives, and that cron logs a job at the level of SERVICE_CRON_OPTS.
|
Kanti
marked this pull request as ready for review
November 15, 2026 15:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
syslog-ng listened on
/dev/logas a stream socket.syslog()of musl sends datagrams only, so on Alpine the messages of cron, Postfix andloggerwere lost: they reached neither the container log nor the file ofLOG_STDOUT. syslog-ng now listens on a datagram socket. glibc tries datagrams first, so Debian and Ubuntu behave as before.Related issues: none found.
Changes
provisioning/base/general/etc/syslog-ng/syslog-ng.conf:unix-dgram("/dev/log")instead ofunix-stream;make generate.testSyslogMessagesReachTheFileFromTheEnvironment: a message sent withloggerarrives in the file ofLOG_STDOUT. syslog-ng is started where the image does not start it.testCronRunsJobsInTheTimeZoneFromTheEnvironment: cron also logs the job at the level ofSERVICE_CRON_OPTS(-L 15on Debian logs its end,-l 0on Alpine its start). This replaces the check intestServiceOptionsFromTheEnvironment, which only looked for the option in the command line of cron.docs/environment-variables.mdare removed.How it was verified
php-nginx:8.5-alpineloggermessage are missingbase:alpineloggermessage is missingphp-nginx-dev:8.5(Debian)"With the fix" is the published image with the new
syslog-ng.confin place of the old one. The two files differ only in the/dev/logline.The runs of
base:alpineandphp-nginx-dev:8.5are from before the rebase onto the current master; the change and its tests are the same. GrumPHP passes, andci/console generatechanges nothing.Not verified: a full build of the images, a GitHub Actions run, arm64.