audio/murmur won't start

Hello,

I installed audio/murmur

# cd /usr/ports/audio/murmur/ && make install clean

$ pkg_info -aI | grep murmur
murmur-1.2.3_2

I renamed /usr/local/etc/murmur.ini.sample to murmur.ini

After this, I tried so start murmur

# /usr/local/etc/rc.d/murmur start (Added murmur_enable="YES" to /etc/rc.conf)

Code:
Starting murmur.
<W>2012-09-15 13:06:08.564 Initializing settings from /usr/local/etc/murmur.ini (basepath /usr/local/etc)
<W>2012-09-15 13:06:08.564 Binding to address 0.0.0.0
<W>2012-09-15 13:06:08.565 OpenSSL: OpenSSL 0.9.8q 2 Dec 2010
<W>2012-09-15 13:06:08.567 SSL: Adding recommended CA UTN-USERFirst-Client Authentication and Email
<F>2012-09-15 13:06:08.568 ServerDB: Failed initialization: unable to open database file Error opening database

I created a database manually:

$ touch /usr/home/michael/murmur/murmur.sqlite
$ chmod 664 /usr/home/michael/murmur.sqlite
# chown michael:murmur /usr/home/michael/murmur.sqlite

$ ls -lahop /usr/home/michael/murmur/murmur.sqlite
-rw-rw-r-- 1 michael murmur - 0B Sep 15 12:46 murmur.sqlite

I changed:

database=/usr/home/michael/murmur/murmur.sqlite

and

uname=michael

in /usr/local/etc/murmur.ini

I tried to start murmur again

# /usr/local/etc/rc.d/murmur start

Code:
Starting murmur.
<W>2012-09-15 13:16:36.355 Initializing settings from /usr/local/etc/murmur.ini (basepath /usr/local/etc)
<W>2012-09-15 13:16:36.355 Binding to address 0.0.0.0
<W>2012-09-15 13:16:36.356 OpenSSL: OpenSSL 0.9.8q 2 Dec 2010
<W>2012-09-15 13:16:36.358 SSL: Adding recommended CA UTN-USERFirst-Client Authentication and Email
<W>2012-09-15 13:16:36.359 ServerDB: Openend SQLite database /usr/home/michael/murmur/murmur.sqlite
<F>2012-09-15 13:16:36.359 SQL Error [CREATE TABLE IF NOT EXISTS `meta` (`keystring` TEXT PRIMARY KEY, `value` TEXT)]: unable to open database file Unable to fetch row

Now I thought, okay, create table myself. Because file was still empty:

$ ls -lahop /usr/home/michael/murmur/murmur.sqlite
-rw-rw-r-- 1 michael murmur - 0B Sep 15 13:15 /usr/home/michael/murmur/murmur.sqlite

I did:

sqlite3 /usr/home/michael/murmur/murmur.sqlite
CREATE TABLE meta (`keystring` TEXT PRIMARY KEY, `value` TEXT);
.exit

Now the file is not empty anymore:

$ ls -lahop /usr/home/michael/murmur/murmur.sqlite
-rw-rw-r-- 1 michael murmur - 5.0K Sep 15 13:21 /usr/home/michael/murmur/murmur.sqlite

Trying to start murmur again:

# /usr/local/etc/rc.d/murmur start

Code:
Starting murmur.
<W>2012-09-15 13:20:56.339 Initializing settings from /usr/local/etc/murmur.ini (basepath /usr/local/etc)
<W>2012-09-15 13:20:56.339 Binding to address 0.0.0.0
<W>2012-09-15 13:20:56.340 OpenSSL: OpenSSL 0.9.8q 2 Dec 2010
<W>2012-09-15 13:20:56.342 SSL: Adding recommended CA UTN-USERFirst-Client Authentication and Email
<W>2012-09-15 13:20:56.343 ServerDB: Openend SQLite database /usr/home/michael/murmur/murmur.sqlite
<W>2012-09-15 13:20:56.343 Generating new tables...
<F>2012-09-15 13:20:56.344 SQL Error [CREATE TABLE `servers` (`server_id` INTEGER PRIMARY KEY AUTOINCREMENT)]: unable to open database file Unable to fetch row

When I now create the table servers manually and start murmur I get:

# /usr/local/etc/rc.d/murmur start

Code:
Starting murmur.
<W>2012-09-15 13:22:04.288 Initializing settings from /usr/local/etc/murmur.ini (basepath /usr/local/etc)
<W>2012-09-15 13:22:04.288 Binding to address 0.0.0.0
<W>2012-09-15 13:22:04.288 OpenSSL: OpenSSL 0.9.8q 2 Dec 2010
<W>2012-09-15 13:22:04.290 SSL: Adding recommended CA UTN-USERFirst-Client Authentication and Email
<W>2012-09-15 13:22:04.292 ServerDB: Openend SQLite database /usr/home/michael/murmur/murmur.sqlite
<W>2012-09-15 13:22:04.292 Generating new tables...
<F>2012-09-15 13:22:04.292 SQL Prepare Error [CREATE TABLE `servers` (`server_id` INTEGER PRIMARY KEY AUTOINCREMENT)]: table `servers` already exists Unable to execute statement

My murmur.ini:

Code:
# Path to database. If blank, will search for
# murmur.sqlite in default locations or create it if not found.
database=/usr/home/michael/murmur/murmur.sqlite

# If you wish to use something other than SQLite, you'll need to set the name
# of the database above, and also uncomment the below.
# Sticking with SQLite is strongly recommended, as it's the most well tested
# and by far the fastest solution.
#
#dbDriver=QMYSQL
#dbUsername=
#dbPassword=
#dbHost=
#dbPort=
#dbPrefix=murmur_
#dbOpts=

# Murmur defaults to not using D-Bus. If you wish to use dbus, which is one of the
# RPC methods available in murmur, please specify so here.
#
dbus=session

# Alternate service name. Only use if you are running distinct
# murmurd processes connected to the same D-Bus daemon.
#dbusservice=net.sourceforge.mumble.murmur

# If you want to use ZeroC Ice to communicate with Murmur, you need
# to specify the endpoint to use. Since there is no authentication
# with ICE, you should only use it if you trust all the users who have
# shell access to your machine.
# Please see the ICE documentation on how to specify endpoints.
#ice="tcp -h 127.0.0.1 -p 6502"

# Ice primarily uses local sockets. This means anyone who has a
# user account on your machine can connect to the Ice services.
# You can set a plaintext "secret" on the Ice connection, and
# any script attempting to access must then have this secret
# (as context with name "secret").
# Access is split in read (look only) and write (modify)
# operations. Write access always includes read access,
# unless read is explicitly denied (see note below).
#
# Note that if this is uncommented and with empty content,
# access will be denied.

#icesecretread=
icesecretwrite=

# How many login attempts do we tolerate from one IP
# inside a given timeframe before we ban the connection?
# Note that this is global (shared between all virtual servers), and that
# it counts both successfull and unsuccessfull connection attempts.
# Set either Attempts or Timeframe to 0 to disable.
#autobanAttempts = 10
#autobanTimeframe = 120
#autobanTime = 300

# Murmur default to logging to murmur.log. If you leave this blank,
# murmur will log to the console (linux) or through message boxes (win32).
logfile=/var/log/murmur/murmur.log

# If set, murmur will write its process ID to this file.
pidfile=/var/run/murmur/murmur.pid

# The below will be used as defaults for new configured servers.
# If you're just running one server (the default), it's easier to
# configure it here than through D-Bus or Ice.
#
# Welcome message sent to clients when they connect
welcometext="
Welcome to this server running <b>Murmur</b>.
Enjoy your stay!
"

# Port to bind TCP and UDP sockets to
port=64738

# Specific IP or hostname to bind to.
# If this is left blank (default), murmur will bind to all available addresses.
host=0.0.0.0

# Password to join server
serverpassword=

# Maximum bandwidth (in bits per second) clients are allowed
# to send speech at.
bandwidth=72000

# Maximum number of concurrent clients allowed.
users=100

# Regular expression used to validate channel names
# (note that you have to escape backslashes with \ )
#channelname=[ \\-=\\w\\#\\[\\]\\{\\}\\(\\)\\@\\|]+

# Regular expression used to validate user names
# (note that you have to escape backslashes with \ )
#username=[-=\\w\\[\\]\\{\\}\\(\\)\\@\\|\\.]+

# Maximum length of text messages in characters. 0 for no limit.
#textmessagelength=5000

# Maximum length of text messages in characters, with image data. 0 for no limit.
#imagemessagelength=131072

# Allow clients to use HTML in messages, user comments and channel descriptions?
#allowhtml=true

# Murmur retains the per-server log entries in an internal database which
# allows it to be accessed over D-Bus/ICE.
# How many days should such entries be kept?
# Set to 0 to keep forever, or -1 to disable logging to the DB
#logdays=31

# To enable public server registration, the serverpassword must be blank, and
# this must all be filled out.
# The password here is used to create a registry for the server name; subsequent
# updates will need the same password. Don't lose your password.
# The URL is your own website, and only set the registerHostname for static IP
# addresses.
# Only uncomment the 'registerName' parameter if you wish to give your "Root" channel a custom name.
#
#registerName=Mumble Server
#registerPassword=secret
#registerUrl=http://mumble.sourceforge.net/
#registerHostname=

# To enable bonjour service discovery uncomment the following line.
# To change the name announced by bonjour adjust the registerName variable.
# See http://developer.apple.com/networking/bonjour/index.html for more information
# about bonjour.
#bonjour=True

# If you have a proper SSL certificate, you can provide the filenames here.
# Otherwise, Murmur will create it's own certificate automatically.
#sslCert=
#sslKey=

# If murmur is started as root, which user should it switch to?
# This option is ignored if murmur isn't started with root privileges.
uname=michael

# If this options is enabled, only clients which have a certificate are allowed
# to connect.
#certrequired=False

# You can configure any of the configuration options for Ice here. We recommend
# leave the defaults as they are.
# Please note that this section has to be last in the configuration file.
#
[Ice]
Ice.Warn.UnknownProperties=1
Ice.MessageSizeMax=65536

Im using:

# uname -a
FreeBSD michael-fausten.de 8.3-RELEASE-p3 FreeBSD 8.3-RELEASE-p3 #0: Tue Jun 12 00:39:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64

Can anyone give me a hint?

Best regards
zwei
 
Hi zwei,

looks like this is a bug and the ports pkg-install file isn't correctly executed. In rev #284162 the 2nd argument got changed from PRE-INSTALL to POST-INSTALL, but this change is not reflected in the Makefile. Could you open a PR about that, please?

An easy fix would be changing the uname and database back to the original in the murmur.ini and executing
Code:
# /usr/ports/audio/murmur/pkg-install murmur POST-INSTALL
The script should create the required directories and the daemon should start successfully.
You could also leave the uname and database settings and execute the commands in the pkg-install file by hand, e.g. create the directories for the database, logfile and pidfile settings and chown them to michael:murmur. I would delete the sqlite database and start with a fresh one.

hth glocke
 
Hi glocke,

thanks for your response.

glocke said:
looks like this is a bug and the ports pkg-install file isn't correctly executed. In rev #284162 the 2nd argument got changed from PRE-INSTALL to POST-INSTALL, but this change is not reflected in the Makefile. Could you open a PR about that, please?

I'm not completly sure how to do that, but I will try.

An easy fix would be changing the uname and database back to the original in the murmur.ini and executing
Code:
# /usr/ports/audio/murmur/pkg-install murmur POST-INSTALL
The script should create the required directories and the daemon should start successfully.

I did this, but I get the following error:

# /usr/ports/audio/murmur/pkg-install murmur POST-INSTALL
/usr/ports/audio/murmur/pkg-install: Permission denied

# whoami
root

I am using tcsh. I tried the same in sh, but same error.

Best regards,
zwei
 
zwei said:
I'm not completly sure how to do that, but I will try.
There is a lot of documentation regarding this topic, a good starter is the Writing FreeBSD Problem Reports article.
zwei said:
Code:
# /usr/ports/audio/murmur/pkg-install murmur POST-INSTALL
/usr/ports/audio/murmur/pkg-install: Permission denied

Yeah I forgot the sh part :-) Try it like this (the pkg-install file is not executable):
Code:
# [B]sh[/B] /usr/ports/audio/murmur/pkg-install murmur POST-INSTALL

hth glocke
 
glocke said:
There is a lot of documentation regarding this topic, a good starter is the Writing FreeBSD Problem Reports article.

I will start with that :)

glocke said:
Yeah I forgot the sh part :-) Try it like this (the pkg-install file is not executable):
Code:
# [B]sh[/B] /usr/ports/audio/murmur/pkg-install murmur POST-INSTALL

Didn't work for me.

# sh /usr/ports/audio/murmur/pkg-install murmur POST-INSTALL
#

It doesn't work if I reset my murmur.ini neither if I create pathes manually.

# /usr/local/etc/rc.d/murmur start

Code:
Starting murmur.
<W>2012-09-15 18:25:34.320 Initializing settings from /usr/local/etc/murmur.ini (basepath /usr/local/etc)
<W>2012-09-15 18:25:34.320 Binding to address 0.0.0.0
<W>2012-09-15 18:25:34.320 OpenSSL: OpenSSL 0.9.8q 2 Dec 2010
<W>2012-09-15 18:25:34.323 SSL: Adding recommended CA UTN-USERFirst-Client Authentication and Email
<W>2012-09-15 18:25:34.324 ServerDB: Openend SQLite database /usr/home/michael/murmur/murmur.sqlite
<F>2012-09-15 18:25:34.324 SQL Error [CREATE TABLE IF NOT EXISTS `meta` (`keystring` TEXT PRIMARY KEY, `value` TEXT)]: unable to open database file Unable to fetch row

Best regards
zwei
 
zwei said:
Code:
# sh /usr/ports/audio/murmur/pkg-install murmur POST-INSTALL
#
The script does not output anything.
What are the permissions and ownership of the directories? e.g.
Code:
# ls -ld /var/db/murmur/ /var/log/murmur/ /var/run/murmur/
drwxr-x---  2 murmur  murmur  512 15 Sep 15:26 /var/db/murmur/
drwxr-x---  2 murmur  murmur  512 15 Sep 15:21 /var/log/murmur/
drwxr-x---  2 murmur  murmur  512 15 Sep 15:26 /var/run/murmur/
You don't need to create/touch any files in there, murmur will do that on startup.
 
The permissions are like this:

# ls -lahop /var/db/murmur/ /var/log/murmur/ /var/run/murmur/
Code:
/var/db/murmur/:
total 4
drwxrwx---   2 murmur  murmur  -  512B Sep 15 19:06 ./
drwxr-xr-x  14 root    wheel   -  512B Sep 15 12:07 ../

/var/log/murmur/:
total 4
drwxrwx---  2 murmur  murmur  -  512B Sep 15 17:44 ./
drwxr-xr-x  3 root    wheel   -  1.5K Sep 15 19:00 ../

/var/run/murmur/:
total 4
drwxrwx---  2 murmur  murmur  -  512B Sep 15 18:21 ./
drwxr-xr-x  7 root    wheel   -  512B Sep 15 18:21 ../

These directories didn't exist earlier.

# /usr/local/etc/rc.d/murmur start
Code:
Starting murmur.
<W>2012-09-15 19:16:48.585 Initializing settings from /usr/local/etc/murmur.ini (basepath /usr/local/etc)
<W>2012-09-15 19:16:48.585 Binding to address 0.0.0.0
<W>2012-09-15 19:16:48.585 OpenSSL: OpenSSL 0.9.8q 2 Dec 2010
<W>2012-09-15 19:16:48.588 SSL: Adding recommended CA UTN-USERFirst-Client Authentication and Email
<F>2012-09-15 19:16:48.589 ServerDB: Failed initialization: unable to open database file Error opening database
 
What are you're relevant settings from /usr/local/etc/murmur.ini? e.g.
Code:
# awk '/^database/; /^pidfile/; /^logfile/; /^uname/;' /usr/local/etc/murmur.ini
database=/var/db/murmur/murmur.sqlite
logfile=/var/log/murmur/murmur.log
pidfile=/var/run/murmur/murmur.pid
uname is commented out in mine, so its not shown here. If you run murmur as user michael it wont start until you chmod the directories and add the user michael to the group murmur.
 
Hello glocke,

Code:
logfile=/var/log/murmur/murmur.log
pidfile=/var/run/murmur/murmur.pid

I left database= blank, but as I changed it to

Code:
database=/var/db/murmur/murmur.sqlite

it's working now. uname= is commented out.

Thank you very much for your help and time. I will try to write a PR.

Best regards,
zwei
 
Back
Top