Bug 735618 - /dev/stderr: no such device
/dev/stderr: no such device
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Bill Nottingham
Fedora Extras Quality Assurance
:
: 735831 735832 739560 744461 (view as bug list)
Depends On:
Blocks: F16Betappc
  Show dependency treegraph
 
Reported: 2011-09-04 04:36 EDT by nucleo
Modified: 2014-03-16 23:28 EDT (History)
17 users (show)

See Also:
Fixed In Version: initscripts-9.32-2.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-09-30 14:32:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description nucleo 2011-09-04 04:36:44 EDT
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):
initscripts-9.31-3.fc16.i686

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 04:53:57 EDT
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-05 23:25:39 EDT
*** Bug 735831 has been marked as a duplicate of this bug. ***
Comment 3 Bill Nottingham 2011-09-05 23:25:52 EDT
*** Bug 735832 has been marked as a duplicate of this bug. ***
Comment 4 Adam Williamson 2011-09-17 18:18:52 EDT
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 18:19:31 EDT
cc mathieu, who did the systemd migration.
Comment 6 Mads Kiilerich 2011-09-17 19:18:32 EDT
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
 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 19:27:00 EDT
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 16:05:15 EDT
*** Bug 739560 has been marked as a duplicate of this bug. ***
Comment 10 Fedora Update System 2011-09-20 01:25:09 EDT
initscripts-9.32-2.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/initscripts-9.32-2.fc16
Comment 11 Fedora Update System 2011-09-20 15:04:02 EDT
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:
https://admin.fedoraproject.org/updates/initscripts-9.32-2.fc16
then log in and leave karma (feedback).
Comment 12 Fedora Update System 2011-09-30 14:32:17 EDT
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 13:38:05 EDT
*** 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.