Bug 735618 - /dev/stderr: no such device
Summary: /dev/stderr: no such device
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: 16
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
: 735831 735832 739560 744461 (view as bug list)
Depends On:
Blocks: F16Betappc
TreeView+ depends on / blocked
Reported: 2011-09-04 08:36 UTC by nucleo
Modified: 2014-03-17 03:28 UTC (History)
17 users (show)

Fixed In Version: initscripts-9.32-2.fc16
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-09-30 18:32:25 UTC
Type: ---

Attachments (Terms of Use)

Description nucleo 2011-09-04 08:36:44 UTC
Description of problem:
After started network service appears error in /var/log/messages:
network: /etc/init.d/functions: line 58: /dev/stderr: No such device

Version-Release number of selected component (if applicable):

How reproducible:
Every time.

Steps to Reproduce:
1. Configure network with system-config-network
2. Disable NetworkManager and enable network service
3. Restart system
Actual results:
Error messages in /var/log/messages

Expected results:
No error messages.

Comment 1 nucleo 2011-09-04 08:53:57 UTC
At least this errors appears for me on minimal system installation.
But network works fine after network service started.

Comment 2 Bill Nottingham 2011-09-06 03:25:39 UTC
*** Bug 735831 has been marked as a duplicate of this bug. ***

Comment 3 Bill Nottingham 2011-09-06 03:25:52 UTC
*** Bug 735832 has been marked as a duplicate of this bug. ***

Comment 4 Adam Williamson 2011-09-17 22:18:52 UTC
This error comes from the sshd-keygen service, which tries to generate host keys for sshd. So with it failing, you don't have any host keys for sshd on a fresh install.

That service should be set to run after whatever brings up /dev/stderr . After=udev-settle.service ?

Comment 5 Adam Williamson 2011-09-17 22:19:31 UTC
cc mathieu, who did the systemd migration.

Comment 6 Mads Kiilerich 2011-09-17 23:18:32 UTC
I don't see any indication that this error has any real implications. The ssh keys are generated correctly here anyway.

The sysv library just fails to set the CONSOLETYPE environment variable and emits a warning that gets syslogged - that's all. I doubt anything depends on this variable - especially in this case.

Bash fails because systemd has connected stderr to a syslog socket which have permissions for being readable but isn't. Bash will thus fail when it try to execute the "consoletype < /dev/stderr".

It is bash that is failing, so there is no simple "2> /dev/null" "solution".

I suggest dropping the special handling for setting CONSOLETYPE based on stderr:

--- /etc/rc.d/init.d/functions	2011-09-18 01:04:14.303397362 +0200
+++ /etc/rc.d/init.d/functions	2011-09-18 01:06:53.663975555 +0200
@@ -54,11 +54,7 @@
 [ -z "${COLUMNS:-}" ] && COLUMNS=80
 if [ -z "${CONSOLETYPE:-}" ]; then
-  if [ -r "/dev/stderr" ]; then
-    CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
-  else
     CONSOLETYPE="$(/sbin/consoletype 2>/dev/null)"
-  fi

Alternatively it could be considered a systemd bug that a syslog socket isn't readable. It would however be strange if it was.

Comment 7 Adam Williamson 2011-09-17 23:27:00 UTC
okay, back to initscripts, then.

(the error does have at least one implication: the sshd-keygen service shows up as failed).

Comment 8 Bill Nottingham 2011-09-19 20:05:15 UTC
*** Bug 739560 has been marked as a duplicate of this bug. ***

Comment 10 Fedora Update System 2011-09-20 05:25:09 UTC
initscripts-9.32-2.fc16 has been submitted as an update for Fedora 16.

Comment 11 Fedora Update System 2011-09-20 19:04:02 UTC
Package initscripts-9.32-2.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing initscripts-9.32-2.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2011-09-30 18:32:17 UTC
initscripts-9.32-2.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Bill Nottingham 2011-10-10 17:38:05 UTC
*** Bug 744461 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.