Mumble server does not accept connections when started at machine boot time, works when service is restarted manually
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mumble (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I have an Ubuntu 14.04 desktop machine that has mumble-server installed. I have configured it to start at boot time using "sudo dpkg-reconfigure mumble-server". However, the server seems to not accept any connections, even though it is running. If I do a "sudo service mumble-server restart", then it starts accepting connections.
I have taken a look at the mumble logs and I've noticed that when mumble-server is started at boot time, it doesn't show a line saying that it is listening for connections.
=======
<W>2014-07-21 02:41:12.732 Initializing settings from /etc/mumble-
<W>2014-07-21 02:41:12.734 OpenSSL: OpenSSL 1.0.1f 6 Jan 2014
<C>2014-07-21 02:41:12.735 Successfully switched to uid 118
<W>2014-07-21 02:41:12.857 ServerDB: Opened SQLite database /var/lib/
<W>2014-07-21 02:41:12.859 Resource limits were 0 0
<W>2014-07-21 02:41:12.859 Successfully dropped capabilities
<W>2014-07-21 02:41:12.861 DBus registration succeeded
<W>2014-07-21 02:41:12.866 MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" running
<W>2014-07-21 02:41:12.932 Murmur 1.2.4 (1.2.4-
<W>2014-07-21 02:41:12.964 1 => Announcing server via bonjour
<W>2014-07-21 02:41:12.994 1 => Not registering server as public
=======
However after I do a service restart, I see a "Server listening on [::]:64738" line in the logs. The server is able to accept connections when this line is present.
=======
<W>2014-07-21 02:44:49.614 MurmurIce: Shutdown complete
<W>2014-07-21 02:44:49.667 Initializing settings from /etc/mumble-
<W>2014-07-21 02:44:49.668 OpenSSL: OpenSSL 1.0.1f 6 Jan 2014
<C>2014-07-21 02:44:49.668 Successfully switched to uid 118
<W>2014-07-21 02:44:49.705 ServerDB: Opened SQLite database /var/lib/
<W>2014-07-21 02:44:49.706 Resource limits were 0 0
<W>2014-07-21 02:44:49.707 Successfully dropped capabilities
<W>2014-07-21 02:44:49.708 DBus registration succeeded
<W>2014-07-21 02:44:49.710 MurmurIce: Endpoint "tcp -h 127.0.0.1 -p 6502" running
<W>2014-07-21 02:44:49.750 Murmur 1.2.4 (1.2.4-
<W>2014-07-21 02:44:49.783 1 => Server listening on [::]:64738
<W>2014-07-21 02:44:49.810 1 => Announcing server via bonjour
<W>2014-07-21 02:44:49.844 1 => Not registering server as public
=======
This bug is really annoying because I have to make sure to do a service restart every time I reboot the machine. This machine is meant as a personal server and it needs to be up constantly. Sometimes I'll forget to do a mumble-server restart and mumble is basically unavailable to everyone who tries to connect.
My theory is that because I am using Network Manager to connect to the internet, maybe my interface isn't ready by the time mumble-server starts? I am using an SSD drive, so maybe mumble-server is starting up too fast and there is a race condition. Regardless, mumble-server should automatically start listening for connections when it detects that the network is up.
Steps to reproduce:
1.) Install mumble-server
2.) Do a "sudo dpkg-reconfigure mumble-server" and set it to start on boot with high priority privileges
3.) Restart the machine
4.) Try connecting to the server using a mumble client. This will not work.
5.) Do a "sudo service mumble-server restart".
6.) Connect again and verify that it works.
Expected behavior:
1.) Mumble server should accept connections when the service is started at boot time.
Current behavior:
1.) Mumble server does not accept connections when it is started at boot time. It starts working only after a manual service restart.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: mumble-server 1.2.4-0.2ubuntu1.1
ProcVersionSign
Uname: Linux 3.13.0-32-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
Date: Mon Jul 21 10:41:59 2014
InstallationDate: Installed on 2014-06-11 (40 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
ProcEnviron:
LANGUAGE=en_US
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: mumble
UpgradeStatus: No upgrade log present (probably fresh install)
modified.
mtime.conffile.
description: | updated |
I have managed to workaround the issue by creating a NetworkManager dispatcher.d script. It basically restarts the mumble-server when it detects that my connection is up.
Put this script into /etc/NetworkMan ager/dispatcher .d/90mumblerest art ======= ======= ======= ======= ======= ======= ======= =====
=======
#!/bin/sh -e
IF=$1
STATUS=$2
if [ "$IF" = "em1" ]
service mumble-server restart
then
case "$STATUS" in
up)
;;
*)
;;
esac
fi
======= ======= ======= ======= ======= ======= ======= ===
Of course, replace em1 with whatever network interface you're using. This script works around the problem for me and I am able to connect to the mumble-server whenever I restart. The only downside is that whenever you disconnect/ reconnect on your connection, the mumble server will get restarted, but I figured that if you're doing that all clients will be dropped anyways so it really makes no difference.
This is a workaround, but it is by no means a correct way to fix this bug.