Bug 1001834 - mediatomb could not find Ethernet interface at system startup
mediatomb could not find Ethernet interface at system startup
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mediatomb (Show other bugs)
19
Unspecified Linux
unspecified Severity medium
: ---
: ---
Assigned To: Gwyn Ciesla
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 17:29 EDT by Jürgen
Modified: 2013-09-06 21:28 EDT (History)
1 user (show)

See Also:
Fixed In Version: mediatomb-0.12.1-31.fc18.20120403gitb66dc1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-06 21:24:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jürgen 2013-08-27 17:29:32 EDT
Description of problem:
If mediatomb is enabled via systemctl and started automatically at system boot, there might be a race condition between the NetworkManager and mediatomb. Sometimes when the system is started, mediatomb fails with the messages:

ERROR: Could not determine interface address: Cannot assign requested address
ERROR: Could not find interface: em1

When doing a "systemctl restart mediatomb.service", mediatomb starts normally.

Version-Release number of selected component (if applicable):
mediatomb-0.12.1-29.fc19.20120403gitb66dc1.x86_64

How reproducible:
On my machine, mediatomb does not start in 9 of 10 times. It depends on how fast the NetworkManager is able to activate the Ethernet interface.

Actual results:
I managed to fix the problem by changing the file
/usr/lib/systemd/system/mediatomb.service. Here, the "After" statement has to be modified:
< After=network.target
> After=NetworkManager-wait-online.service
In addition, the NetworkManager-wait-online.service has to be enabled:
systemctl enable NetworkManager-wait-online.service

Additional info:
If mediatomb is enabled in the original configuration on my machine, the Ethernet interface is generally not enabled at system startup by the Network Manager. In /var/log/messages the following messages appear:
NetworkManager[752]: <warn> (em1): device not up after timeout!
NetworkManager[752]: <info> (em1): deactivating device (reason 'managed') 
The Ethernet interface comes up normally at system startup, if mediatomb is not enabled or mediatomb.service is modified as described above.
Comment 1 Gwyn Ciesla 2013-08-28 09:09:55 EDT
Instead of NetworkManager-wait-online.service, does network-online.target work, which seems to be enabled by default?
Comment 2 Jürgen 2013-08-29 09:44:32 EDT
(In reply to Jon Ciesla from comment #1)
> Instead of NetworkManager-wait-online.service, does network-online.target
> work, which seems to be enabled by default?

No, it does not work.
Changing the line from
"After=NetworkManager-wait-online.service" to "After=network-online.target" results in the error messages "ERROR: Could not determine interface address: Cannot assign requested address, ERROR: Could not find interface: em1"
However, I am not sure if network-online.target is really used on my system. I'm using a fresh fc19 installation. The command "systemctl | grep network" only delivers "network.target              loaded active active    Network"
Comment 3 Gwyn Ciesla 2013-08-29 10:10:59 EDT
Hmm.  What if you have both After= lines in place?  That way it could work whether people are using NetworkManager or the older network service.
Comment 4 Jürgen 2013-08-29 10:39:46 EDT
(In reply to Jon Ciesla from comment #3)
> Hmm.  What if you have both After= lines in place?  That way it could work
> whether people are using NetworkManager or the older network service.

If I change the line to "After=NetworkManager-wait-online.service network-online.target" mediatomb is activated. (The NetworkManager-wait-online.service is still enabled)
Comment 5 Gwyn Ciesla 2013-08-29 10:45:06 EDT
Ok, cool, I'll get an update out.  Thanks!
Comment 6 Fedora Update System 2013-08-29 11:09:19 EDT
mediatomb-0.12.1-31.fc19.20120403gitb66dc1 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/mediatomb-0.12.1-31.fc19.20120403gitb66dc1
Comment 7 Fedora Update System 2013-08-29 11:10:05 EDT
mediatomb-0.12.1-31.fc18.20120403gitb66dc1 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mediatomb-0.12.1-31.fc18.20120403gitb66dc1
Comment 8 Fedora Update System 2013-08-29 18:20:34 EDT
Package mediatomb-0.12.1-31.fc19.20120403gitb66dc1:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mediatomb-0.12.1-31.fc19.20120403gitb66dc1'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-15493/mediatomb-0.12.1-31.fc19.20120403gitb66dc1
then log in and leave karma (feedback).
Comment 9 Fedora Update System 2013-09-06 21:24:48 EDT
mediatomb-0.12.1-31.fc19.20120403gitb66dc1 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2013-09-06 21:28:44 EDT
mediatomb-0.12.1-31.fc18.20120403gitb66dc1 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

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