[systemd-devel] [systemd-nspawn] nginx: [emerg] open() "/dev/stderr" failed (6: No such device or address)

Lennart Poettering lennart at poettering.net
Fri Apr 24 07:40:07 PDT 2015


On Fri, 24.04.15 17:33, Mantas Mikulėnas (grawity at gmail.com) wrote:

> >> > Any idea what the precise syscall is that triggers that? i.e. what
> >> > strace says?
> >>
> >> It kind of makes sense when stdout is a socket, since
> >> open(/dev/stdout) or open(/proc/self/fd/*) doesn't just dup that fd,
> >> it tries to open the file anew (including permission checks and
> >> everything). A bit annoying.
> >
> > Well, but it's not a socket here, is it? Peter?
> 
> Hmm, I'm pretty sure the default StandardOutput=journal means stdout
> will be a socket connection to journald, doesn't it?

Ah, true!

> (And since it's a process-specific thing, "echo "asdf" > /dev/stdout"
> from an interactive shell will merely test the shell's stdout (which
> is a tty), not nginx's stdout...)

Indeed.

I figure /dev/stderr is simply not compatible with sockets, regardless
if nspawn is in the mix or not... WHich actually came up before, and I
think is someething to accept...

People should really use the shell construct "2>" instead of ">
/dev/stderr" if they want the redirect to work always.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list