Error failed to open sqlite database minidlna

Minidlna fatal error failed to open sqlite database I am trying to set up a minidlna server on my pi. I was following this tutorial which makes it seem so easy: The error log files is as follows: [2012/11/25 16:25:10] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.13]. [2012/11/25 16:25:10] minidlna.c:926: warn: Creating new […]

Содержание

  1. Minidlna fatal error failed to open sqlite database
  2. Minidlna fatal error failed to open sqlite database
  3. [TUTO] Install and SetUp minidlna media server
  4. Re: [TUTO] Install and SetUp minidlna media server
  5. Re: [TUTO] Install and SetUp minidlna media server
  6. Re: [TUTO] Install and SetUp minidlna media server
  7. Re: [TUTO] Install and SetUp minidlna media server
  8. Re: [TUTO] Install and SetUp minidlna media server
  9. Re: [TUTO] Install and SetUp minidlna media server
  10. Re: [TUTO] Install and SetUp minidlna media server
  11. Re: [TUTO] Install and SetUp minidlna media server
  12. Re: [TUTO] Install and SetUp minidlna media server
  13. Re: [TUTO] Install and SetUp minidlna media server
  14. Re: [TUTO] Install and SetUp minidlna media server
  15. Re: [TUTO] Install and SetUp minidlna media server
  16. Re: [TUTO] Install and SetUp minidlna media server
  17. Re: [TUTO] Install and SetUp minidlna media server
  18. Re: [TUTO] Install and SetUp minidlna media server
  19. Re: [TUTO] Install and SetUp minidlna media server
  20. Re: [TUTO] Install and SetUp minidlna media server
  21. Re: [TUTO] Install and SetUp minidlna media server
  22. Re: [TUTO] Install and SetUp minidlna media server
  23. ReadyMedia Discussion
  24. Forums
  25. Not working on Ubuntu Server 11.10 (SOLVED)
  26. Debian User Forums
  27. Install: minidlna does not start
  28. Install: minidlna does not start

Minidlna fatal error failed to open sqlite database

I am trying to set up a minidlna server on my pi. I was following this tutorial which makes it seem so easy:

The error log files is as follows:

[2012/11/25 16:25:10] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.13].
[2012/11/25 16:25:10] minidlna.c:926: warn: Creating new database.
[2012/11/25 16:25:10] minidlna.c:1006: warn: HTTP listening on port 8200
[2012/11/25 16:25:10] scanner.c:727: warn: Scanning /var/lib/minidlna
[2012/11/25 16:25:10] scanner.c:798: warn: Scanning /var/lib/minidlna finished (0 files)!
[2012/11/25 16:25:10] playlist.c:125: warn: Parsing playlists.
[2012/11/25 16:25:13] inotify.c:195: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [2] and I do not have permission to increase this limit. Please do so manually by writing a higher value into /proc/sys/fs/inotify/max_user_watches.
[2012/11/25 16:34:48] upnpsoap.c:1739: warn: Returning UPnPError 402: Invalid Args
[2012/11/25 16:35:05] upnpsoap.c:1739: warn: Returning UPnPError 402: Invalid Args
[2012/11/25 16:35:49] upnpsoap.c:1739: warn: Returning UPnPError 402: Invalid Args
[2012/11/25 16:35:56] upnpsoap.c:1739: warn: Returning UPnPError 402: Invalid Args
[2012/11/25 16:43:57] minidlna.c:155: warn: received signal 15, good-bye
[2012/11/25 16:46:22] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.13].
[2012/11/25 16:46:22] minidlna.c:1006: warn: HTTP listening on port 8200
[2012/11/25 16:46:23] upnpsoap.c:1739: warn: Returning UPnPError 402: Invalid Args
[2012/11/25 16:46:23] upnpsoap.c:1739: warn: Returning UPnPError 402: Invalid Args
[2012/11/25 16:46:53] upnpsoap.c:1739: warn: Returning UPnPError 402: Invalid Args
[2012/11/25 16:47:05] upnphttp.c:1014: warn: /favicon.ico not found, responding ERROR 404
[2012/11/25 16:47:08] upnphttp.c:1014: warn: /favicon.ico not found, responding ERROR 404
[2012/11/25 16:47:08] upnphttp.c:1014: warn: /favicon.ico not found, responding ERROR 404
[2012/11/25 16:47:09] upnphttp.c:1014: warn: /favicon.ico not found, responding ERROR 404
[2012/11/25 16:47:09] upnphttp.c:1014: warn: /favicon.ico not found, responding ERROR 404
[2012/11/25 16:47:10] upnphttp.c:1014: warn: /favicon.ico not found, responding ERROR 404
[2012/11/25 16:56:53] upnphttp.c:1014: warn: /favicon.ico not found, responding ERROR 404
[2012/11/25 17:01:48] minidlna.c:155: warn: received signal 15, good-bye
[2012/11/25 17:13:38] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.13].
[2012/11/25 17:13:38] minidlna.c:318: fatal: ERROR: Failed to open sqlite database! Exiting.
[2012/11/25 17:13:47] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.13].
[2012/11/25 17:13:47] minidlna.c:318: fatal: ERROR: Failed to open sqlite database! Exiting.
[2012/11/25 17:17:11] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.13].
[2012/11/25 17:17:11] minidlna.c:318: fatal: ERROR: Failed to open sqlite database! Exiting.
[2012/11/25 17:26:26] minidlna.c:898: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.13].
[2012/11/25 17:26:26] minidlna.c:318: fatal: ERROR: Failed to open sqlite database! Exiting.
/var/log/minidlna.log (END)

Weirdest thing here is that it is scanning ‘/var/lib/minidlna’ for files even though I changed the conifiguration file to specify my own folders for media

Источник

Minidlna fatal error failed to open sqlite database

[TUTO] Install and SetUp minidlna media server

Hi All,
My name is Georges. 24. a French guy interested in RasPi

I have seen several tutorials about minidlna server but, there was always something missing, so I want to share with you.

The idea is to use the RasPi as a multimedia server (in my case, for my PS3).

Hardware/Network configuration :
RasPi (I an under raspian, I use 2012-08-16-wheezy-raspbian)
External HD, or USB device, where media files are stored. Plug it to RasPi (USB)
PS3 (or any mediacenter to discover to RasPi media files)
(PC, ) RasPi and PS3 under to same sub-network

As I only have 1 screen for PS3 and RasPi, I did the configuration using ssh

  • Assuming IP adress table is :
    PC : 192.168.0.11
    PS3 : 192.168.0.14
    RasPi : 192.168.0.16

In case of using ssh, Connect :

Enter password (default «raspberry»), then tty command line appears

I recommend updating everything before intallation :
Update package list:

Mount hard drive automatically :
Use this command to discover UUID :

Make a directory where to mount the disk and change the autorizations:

Edit the fstab file :

Add this line (using your UUID and TYPE) :

[/color]
It will warn you about how many disk space it will use and dependencies installation

Now you can configure minidlna:

You see many options like :

MiniDLNA will now begin indexing all of your media files, it’s quite quick but folders not COMPLETELY indexed will not appear until they are done.

If you modify minidlna configuration, you have to reload it :

You PS3 detects automatically the server in sections Pictures, Music or Videos
Usage is absolutely fluid. Play and pause a DivX without any problem. Thumbnail using square button is quick/instant !!

I forgot something ? I am not crystal clear ? Some spelling mistakes ? Leave a comment !

Re: [TUTO] Install and SetUp minidlna media server

This is crystal clear, especially for a linux novice such as myself. Why can’t others detail their instructions as clear and concise as yours rather than assume we know the basics and ramble on with little bits of code here and there with bits missing in between.

I don’t know how to do it but your code example should be entered on the http://elinux.org/RPi_Tutorials website, which is an excellent website for beginners.

Re: [TUTO] Install and SetUp minidlna media server

Re: [TUTO] Install and SetUp minidlna media server

Re: [TUTO] Install and SetUp minidlna media server

Re: [TUTO] Install and SetUp minidlna media server

OK

To complete the TUTO:

Uninstalling minidlna :

Remove automatic start at boot :

Re: [TUTO] Install and SetUp minidlna media server

Just a quick gotcha that I fell into.

My external drive is NTFS, so I needed to do

and set up my fstab using ntfs-3g.

Apart from that, very good, ta!

Re: [TUTO] Install and SetUp minidlna media server

Re: [TUTO] Install and SetUp minidlna media server

Followed the guide, had it work perfectly.

Has anyone managed to watch a movie on an android device with a separate srt file ?

Re: [TUTO] Install and SetUp minidlna media server

Not sure if anyone encountered this issue before, but the minidlna service runs with the user minidlna who would not have permission to create the dir in /home/pi (db_dir=/home/pi/.minidlna).
I have to manually create it and grant permissions —
mkdir /home/pi/.minidlna
chmod 777 /home/pi/.minidlna

Else it wouldn’t scan my specified media folders.

Re: [TUTO] Install and SetUp minidlna media server

I’m looking for how to use srt files as subtitles but I did not find anything.
but.

Wooaaw this TUTO reached the 1 MiIlion views

Re: [TUTO] Install and SetUp minidlna media server

Re: [TUTO] Install and SetUp minidlna media server

tpereira wrote: Not sure if anyone encountered this issue before, but the minidlna service runs with the user minidlna who would not have permission to create the dir in /home/pi (db_dir=/home/pi/.minidlna).
I have to manually create it and grant permissions —
mkdir /home/pi/.minidlna
chmod 777 /home/pi/.minidlna

Else it wouldn’t scan my specified media folders.

Re: [TUTO] Install and SetUp minidlna media server

Re: [TUTO] Install and SetUp minidlna media server

tpereira wrote: Not sure if anyone encountered this issue before, but the minidlna service runs with the user minidlna who would not have permission to create the dir in /home/pi (db_dir=/home/pi/.minidlna).
I have to manually create it and grant permissions —
mkdir /home/pi/.minidlna
chmod 777 /home/pi/.minidlna

Else it wouldn’t scan my specified media folders.

1) find out which group minidlna runs under, then chgrp .minidlna && chmod g+rwx .minidlna; or
2) don’t store the minidlna db in /home/pi/.minidlna — in my «big» linux system, it lives in /var/lib/minidlna — but /home/minidlna is just as valid (owned by minidlna user)

unlike the excellent tut, I know I’m sketchy on the details. Either someone can fill in the details, or wait until I get my new Pi (ordered today, should be here tomorrow), and I’ll expand on the ideas I’ve suggested

Re: [TUTO] Install and SetUp minidlna media server

Excelent tutorial, sorry for my english.

Two more adds:
— Add samba to comunicate pi with PC (or another device) and share video, photos, etc. (and a tutorial about it )
— ¿Do you try ps3 media server? its a excelent media server and source code for linux is ready for use (i dont know if its ready for arm device) http://www.ps3mediaserver.org/

Congratulations about this tutorial. Cheers

Re: [TUTO] Install and SetUp minidlna media server

I am able to pull videos on my Sony 32EX720.

Re: [TUTO] Install and SetUp minidlna media server

Re: [TUTO] Install and SetUp minidlna media server

Re: [TUTO] Install and SetUp minidlna media server

tpereira wrote: Not sure if anyone encountered this issue before, but the minidlna service runs with the user minidlna who would not have permission to create the dir in /home/pi (db_dir=/home/pi/.minidlna).
I have to manually create it and grant permissions —
mkdir /home/pi/.minidlna
chmod 777 /home/pi/.minidlna

Else it wouldn’t scan my specified media folders.

Thank you, this was the problem I was having.
First I saw that miniDlna couldn’t create the DB directory, so I created it.
Then it said «fatal: ERROR: Failed to open sqlite database!»
I didn’t know what was wrong, till I came across your post, fixed the permissions and now its scanning.

Источник

Forums

Not working on Ubuntu Server 11.10 (SOLVED)

Just installed on Oneiric (Ubuntu Server 11.10) using apt-get install minidlna. I’ve edited minidlna.conf to point towards my videos and music, but I just cannot get the server to start properly.

Here is the contents of /var/log/minidlna.log

minidlna.c:907: warn: Starting MiniDLNA version 1.0.21 .
minidlna.c:321: fatal: ERROR: Failed to open sqlite database! Exiting…
minidlna.c:907: warn: Starting MiniDLNA version 1.0.21 .
minidlna.c:935: warn: Creating new database…
scanner.c:719: warn: Scanning /space/MUSIC
minidlna.c:1002: warn: HTTP listening on port 8200
minidlna.c:907: warn: Starting MiniDLNA version 1.0.21 .
sql.c:40: error: SQL ERROR 8
pragma default_cache_size = 8192;
minidlna.c:939: warn: Database version mismatch; need to recreate…
sql.c:40: error: SQL ERROR 8
pragma default_cache_size = 8192;
sql.c:40: error: SQL ERROR 1
CREATE TABLE OBJECTS ( ID INTEGER PRIMARY KEY AUTOINCREMENT, OBJECT_ID TEXT UNIQUE NOT NULL, PARENT_ID TEXT NOT NULL, REF_ID TEXT DEFAULT NULL, CLASS TEXT NOT NULL, DETAIL_ID INTEGER DEFAULT NULL, NAME TEXT DEFAULT NULL);
minidlna.c:949: fatal: ERROR: Failed to create sqlite database! Exiting…
scanner.c:790: warn: Scanning /space/MUSIC finished (498 files)!
scanner.c:719: warn: Scanning /space/VIDEO
scanner.c:790: warn: Scanning /space/VIDEO finished (1119 files)!
minidlna.c:155: warn: received signal 15, good-bye
minidlna.c:907: warn: Starting MiniDLNA version 1.0.21 .
minidlna.c:132: error: bind(http): Address already in use
minidlna.c:1000: fatal: Failed to open socket for HTTP. EXITING
minidlna.c:907: warn: Starting MiniDLNA version 1.0.21 .
sql.c:40: error: SQL ERROR 8
pragma default_cache_size = 8192;
minidlna.c:132: error: bind(http): Address already in use
minidlna.c:1000: fatal: Failed to open socket for HTTP. EXITING

Is this something to do with permissions on where the db is being stored /space/minidlna?

(SOLVED) Okay, so I answered my own question. YES the permissions do need to be set to 777 as minidlna is NOT being started as root, so whoever it is who’s running the process (user?) must have read/write access obviously!

Potential gotcha here.

It depends on where you keep the db. I keep mine in

/.minidlna so and minidlna is started at boot time.

$ ls -al /home/ccoupe/ | grep minidlna
drwxr-xr-x 3 ccoupe ccoupe 4096 2011-07-23 20:22 .minidlna

works just fine for me (ubuntu 11.04)

On my NAS installation (debian squeeze), however I did have to open permissions since I wanted the database and files available to Samba and NFS and not in a user directory and I didn’t want to take the time to do figure out the permissions necessary. I don’t blame minidlna for that.

It appears that minidlnad is running as user ‘minidlna’ on Ubuntu by default.

Issuing the following will fix without having to set mode to 777:

Источник

Debian User Forums

Install: minidlna does not start

Install: minidlna does not start

#1 Post by yann49 » 2016-01-31 15:36

$ sudo /etc/init.d/minidlna start
[sudo] password for XYZ:
[ ok ] Starting minidlna (via systemctl): minidlna.service.

$ cd /var/cache/minidlna
XYZ@bureau:/var/cache/minidlna$ sudo systemctl status minidlna -l
● minidlna.service — MiniDLNA is a DLNA/UPnP-AV server software
Loaded: loaded (/lib/systemd/system/minidlna.service; enabled)
Active: failed (Result: exit-code) since dim. 2016-01-31 14:00:53 CET; 8min ago
Process: 6999 ExecStart=/usr/sbin/minidlnad -S ( code=exited, status=255 )
Process: 6996 ExecStartPre=/bin/chown $USER /var/run/minidlna (code=exited, status=0/SUCCESS)
Process: 6993 ExecStartPre=/bin/mkdir -p /var/run/minidlna (code=exited, status=0/SUCCESS)
Main PID: 6999 (code=exited, status=255)

janv. 31 14:00:53 bureau minidlnad[6999]: minidlna.c warn: Starting ReadyDLNA version 1.1.4.
janv. 31 14:00:53 bureau minidlnad[6999]: minidlna.c:294: fatal: ERROR: Failed to open sqlite database! Exiting.
janv. 31 14:00:53 bureau systemd[1]: minidlna.service: main process exited, code=exited, status=255/n/a
janv. 31 14:00:53 bureau systemd[1]: Unit minidlna.service entered failed state.

Does anyone has an idea where the problem can be ? Thank you for help.

PS:
Operating system Debian Linux 8
Kernel and CPU Linux 3.16.0-4-amd64 on x86_64
Processor information Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz, 4 cores

Источник

Forum rules
There are no such things as «stupid» questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.

hierophant

[SOLVED] minidlna problems

I’ve been working on this for a while, seems like it might be a permission issue? am running the service as root now in order to avoid all of the permission problems I was having after installation. I am running:

Code: Select all

inux hostname 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

The media files I am trying to share are on a raid device which is formatted with NTFS.

Here is my config file:

Code: Select all

user=root


# Path to the directory you want scanned for media files.
#
# This option can be specified more than once if you want multiple directories
# scanned.
#
# If you want to restrict a media_dir to a specific content type, you can
# prepend the directory name with a letter representing the type (A, P or V),
# followed by a comma, as so:
#   * "A" for audio    (eg. media_dir=A,/var/lib/minidlna/music)
#   * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)
#   * "V" for video    (eg. media_dir=V,/var/lib/minidlna/videos)
#   * "PV" for pictures and video (eg. media_dir=PV,/var/lib/minidlna/digital_camera)
media_dir=/media/hierophant/LTS/Media/Movies

# Set this to merge all media_dir base contents into the root container
# (The default is no.)
#merge_media_dirs=no

# Path to the directory that should hold the database and album art cache.
db_dir=/var/cache/minidlna

# Path to the directory that should hold the log file.
log_dir=/var/log

# Type and minimum level of importance of messages to be logged.
#
# The types are "artwork", "database", "general", "http", "inotify",
# "metadata", "scanner", "ssdp" and "tivo".
#
# The levels are "off", "fatal", "error", "warn", "info" or "debug".
# "off" turns of logging entirely, "fatal" is the highest level of importance
# and "debug" the lowest.
#
# The types are comma-separated, followed by an equal sign ("="), followed by a
# level that applies to the preceding types. This can be repeated, separating
# each of these constructs with a comma.
#
# The default is to log all types of messages at the "warn" level.
#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn

# Use a different container as the root of the directory tree presented to
# clients. The possible values are:
#   * "." - standard container
#   * "B" - "Browse Directory"
#   * "M" - "Music"
#   * "P" - "Pictures"
#   * "V" - "Video"
#   * Or, you can specify the ObjectID of your desired root container
#     (eg. 1$F for Music/Playlists)
# If you specify "B" and the client device is audio-only then "Music/Folders"
# will be used as root.
#root_container=.

# Network interface(s) to bind to (e.g. eth0), comma delimited.
# This option can be specified more than once.
#network_interface=

# Port number for HTTP traffic (descriptions, SOAP, media transfer).
# This option is mandatory (or it must be specified on the command-line using
# "-p").
port=8200

# URL presented to clients (e.g. http://example.com:80).
#presentation_url=/

# Name that the DLNA server presents to clients.
# Defaults to "hostname: username".
friendly_name=HC

# Serial number the server reports to clients.
# Defaults to 00000000.
serial=681019810597110

# Model name the server reports to clients.
#model_name=Windows Media Connect compatible (MiniDLNA)

# Model number the server reports to clients.
# Defaults to the version number of minidlna.
#model_number=

# Automatic discovery of new files in the media_dir directory.
inotify=yes

# List of file names to look for when searching for album art.
# Names should be delimited with a forward slash ("/").
# This option can be specified more than once.
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg
album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg
album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# Strictly adhere to DLNA standards.
# This allows server-side downscaling of very large JPEG images, which may
# decrease JPEG serving performance on (at least) Sony DLNA products.
#strict_dlna=no

# Support for streaming .jpg and .mp3 files to a TiVo supporting HMO.
#enable_tivo=no

# Notify interval, in seconds.
notify_interval=600

# Path to the MiniSSDPd socket, for MiniSSDPd support.
#minissdpdsocket=/run/minissdpd.sock

# Always set SortCriteria to this value, regardless of the SortCriteria
# passed by the client
# e.g. force_sort_criteria=+upnp:class,+upnp:originalTrackNumber,+dc:title
#force_sort_criteria=

# maximum number of simultaneous connections
# note: many clients open several simultaneous connections while streaming
#max_connections=50

and here is the error I am getting in my log file when restarting service:

Code: Select all

[2017/04/20 10:32:25] minidlna.c:1041: warn: Starting MiniDLNA version 1.1.5.
[2017/04/20 10:32:25] minidlna.c:303: fatal: ERROR: Failed to open sqlite database!  Exiting...

Any help or insight into what might be causing this error would be much appreciated

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.

Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.

wallaroo

Level 3
Level 3
Posts: 145
Joined: Thu Feb 09, 2012 3:42 am
Location: Australia

Re: minidlna problems

Post

by wallaroo » Fri Apr 21, 2017 1:28 am

I remember having this problem in the past. I just deleted the file ‘/var/cache/minidlna/files.db’ and restarted.
It will recreate a clean version of files.db and then rescan the media files.

hierophant

Re: minidlna problems

Post

by hierophant » Fri Apr 21, 2017 12:06 pm

Thanks for the response! I think I figured it out. I was mounting the drive as user with each login. I mounted the drive with fstab which mounted it as root, this seemed to fix the issue. Silly me and formatting the drive with ntfs file system, seemed to cause a lot of permission issues.

yann49

Posts: 6
Joined: 2016-01-31 09:42

Install: minidlna does not start

#1

Post

by yann49 » 2016-01-31 15:36

Hi,
I am new to Debian (and Linux). I just finish to install minidlna to feed my TV with my Debian Jessie PC but I cannot make minidlna to start.
I installed minidlna using synaptic. No error shown.
I went to the config file to fill the parameters needed.
I started minidlna using the command line /etc/init.d/minidlna start
and got the following each time :

XYZ@bureau:~$ sudo /etc/init.d/minidlna start
[sudo] password for XYZ:
[ ok ] Starting minidlna (via systemctl): minidlna.service.

XYZ@bureau:~$ cd /var/cache/minidlna
XYZ@bureau:/var/cache/minidlna$ sudo systemctl status minidlna -l
minidlna.service — MiniDLNA is a DLNA/UPnP-AV server software
Loaded: loaded (/lib/systemd/system/minidlna.service; enabled)
Active: failed (Result: exit-code) since dim. 2016-01-31 14:00:53 CET; 8min ago
Process: 6999 ExecStart=/usr/sbin/minidlnad -S (code=exited, status=255)
Process: 6996 ExecStartPre=/bin/chown $USER /var/run/minidlna (code=exited, status=0/SUCCESS)
Process: 6993 ExecStartPre=/bin/mkdir -p /var/run/minidlna (code=exited, status=0/SUCCESS)
Main PID: 6999 (code=exited, status=255)

janv. 31 14:00:53 bureau minidlnad[6999]: minidlna.c:1026: warn: Starting ReadyDLNA version 1.1.4.
janv. 31 14:00:53 bureau minidlnad[6999]: minidlna.c:294: fatal: ERROR: Failed to open sqlite database! Exiting…
janv. 31 14:00:53 bureau systemd[1]: minidlna.service: main process exited, code=exited, status=255/n/a
janv. 31 14:00:53 bureau systemd[1]: Unit minidlna.service entered failed state.

Does anyone has an idea where the problem can be ? Thank you for help.

PS:
Operating system Debian Linux 8
Kernel and CPU Linux 3.16.0-4-amd64 on x86_64
Processor information Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz, 4 cores



User avatar

pylkko

Posts: 1803
Joined: 2014-11-06 19:02

Re: Install: minidlna does not start

#3

Post

by pylkko » 2016-01-31 19:51

SInce it says failed to open sqlite database, maybe your database does not have permissions that would allow it to open it.

try chmod to change the permissions on the location.

for example:



yann49

Posts: 6
Joined: 2016-01-31 09:42

Re: Install: minidlna does not start

#5

Post

by yann49 » 2016-02-01 11:07

Hi,
Now it works fine !!! looking in the services directory I found that minidlna.service file had «minidlna» as GROUP and USER parameters.
I modified the access rights as follows to access the database folder :

sudo chown -R minidlna.minidlna /var/cache/minidlna

So it is solved and I hope it can serve others.


failed on first boot
applied piratebox config as stated from diy
rebooted, still failed.
uninstalled via pacman -Rs (removed dependencies)
removed minidlna.conf (and bkup) files
reinstalled with dependencies -S (asked which provider) (1) libx264 2) libx264-10bit) chose 1
stopped minidlna service manually
edited config manually to point to /mnt/usbshare/share/Shared as the media_dir
and db_dir=/opt/piratebox/share/minidlna
started minidlna service manually
started with no errors, so I enabled the service.
…waited for db to configure…
…rebooted…
no errors.
… and I believe I found the issue…
the example config points to /opt/piratebox/tmp which is owned by nobody:nogroup(755) and on the sdcard.
by manual editing the minidlna.conf file, I set it to /opt/piratebox/share/minidlna (for whatever reason, probabaly openwrt) which is on fat32 USB drive with full permissions (777/umask=0) owned by nobody:nogroup but all users including minidlna:minidlna can write to which minidlna runs as if not specified. so example script needs to be set as user=nobody OR the path to the db_dir needs to be changed for RPi.

This is a very brief article or rather a reminder to myself, about how to install MiniDLNA on Ubuntu Server 20.04. I always knew this piece of software by it’s old name MiniDLNA, but apparently it was renamed and is now called ReadyMedia. There don’t seem to be many changes below the hood though.

MiniDLNA is a light-weight media server using the DLNA protocol. Through MiniDLNA a library of media files is created which allows a user to very conveniently browse through the files and start audio and video playback. Most SmartTVs and Android phones support DLNA out of the box.

Since MiniDLNA is available as a package on Ubuntu the easiest way to get the work done is by installing the corresponding package. Who would have guessed.

$> sudo apt install minidlna

Before starting the minidlna service, the configuration file /etc/minidlna.conf should be edited, most importantly to tell minidlna where to find the media files.

Just open /etc/minidlna.conf and walk through the file line by line, the comments are quite clear and tell you exactly what to do.
The most important part is to set the path to the media folders, which should look something like this:

...
media_dir=A,/mnt/nas/music
media_dir=V,/mnt/nas/movies
media_dir=P,/mnt/nas/photos
media_dir=A,/home/hugoriusz/Music
media_dir=P,/home/hugoriusz/Pictures
media_dir=V,/home/hugoriusz/Videos
...

The media directories are simply listed one after another. The letters indicate which type of media can be found in a folder: A for audio, V for video, P for pictures and PV for both pictures and videos.
If the media library should be updated in real-time the setting inotify=yes should be used.
Also note that the port given in minidlna.conf (default TCP 8200) must be allowed through the firewall.

After the configuration file is to your liking, the minidlna service can be started. This is one of the advantages of using minidlna directly from the official PPA repository, as everything comes prepared to run as a service.

$> sudo service minidlna restart

There was no immediate error, but checking the output of top shows that no minidlna process is running. This should be the case, as minidlna should start scanning the media folders and add any files it finds to it’s media library.

By checking the log it becomes clear what’s missing.

cat /var/log/minidlna.log
[2021/01/24 20:52:31] minidlna.c:1060: warn: Starting MiniDLNA version 1.2.1.
[2021/01/24 20:52:31] minidlna.c:292: fatal: ERROR: Failed to open sqlite database! Exiting…
[2021/01/24 20:55:07] minidlna.c:1009: error: Unable to set db_path [/var/cache/minidlna] ownership to 112: Operation not permitted
[2021/01/24 20:55:07] minidlna.c:1060: warn: Starting MiniDLNA version 1.2.1.
[2021/01/24 20:55:07] minidlna.c:292: fatal: ERROR: Failed to open sqlite database! Exiting…

The database folder /var/cache/minidlna does not have the right permissions. Easy enough to fix. The user and group minidlna where automatically created when the package was installed it seems, at least I can’t recall creating them myself.

sudo chown -R minidlna:minidlna /var/cache/minidlna

Let’s try again.

$> sudo service minidlna restart
$> sudo service minidlna status
● minidlna.service - LSB: minidlna server
Loaded: loaded (/etc/init.d/minidlna; generated)
Active: active (running) since Sun 2021-01-24 20:59:12 UTC; 53s ago
Docs: man:systemd-sysv-generator(8)
Process: 62766 ExecStart=/etc/init.d/minidlna start (code=exited, status=0/SUCCESS)
Tasks: 3 (limit: 18764)
Memory: 222.5M
CGroup: /system.slice/minidlna.service
├─62778 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid -r
└─62781 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid -r

Alright, it seems to work now. The minidlna service is running and the output of top should show minidlna crunching away some considerable CPU percentage, as it is busy to initialize it’s media library. This can take several hours if there are a lot of media files, or just a few minutes (or seconds) if there is only a miniscule number of files to scan.

In order to automatically launch the minidlna daemon after each boot, the minidlna service must be enabled (maybe this happens automatically, I don’t know, I’m used to doing this manually…).

$> sudo systemctl enable minidlna

Done.


References:

  • https://help.ubuntu.com/community/MiniDLNA
  • https://www.smarthomebeginner.com/install-and-setup-minidlna-on-ubuntu-1204/

Hi All,
My name is Georges. 24. a French guy interested in RasPi :D :D

I have seen several tutorials about minidlna server but, there was always something missing, so I want to share with you.

The idea is to use the RasPi as a multimedia server (in my case, for my PS3).

Hardware/Network configuration :
RasPi (I an under raspian, I use 2012-08-16-wheezy-raspbian)
External HD, or USB device, where media files are stored. Plug it to RasPi (USB)
PS3 (or any mediacenter to discover to RasPi media files)
(PC, ) RasPi and PS3 under to same sub-network

As I only have 1 screen for PS3 and RasPi, I did the configuration using ssh

  • Assuming IP adress table is :
    PC : 192.168.0.11
    PS3 : 192.168.0.14
    RasPi : 192.168.0.16

In case of using ssh, Connect :

[/color]

Enter password (default «raspberry»), then tty command line appears

[/color]

I recommend updating everything before intallation :
Update package list:

[/color]
Update packages:

[/color]

Mount hard drive automatically :
Use this command to discover UUID :

[/color]
You see your drive suck as :

Code: Select all

/dev/sda1: LABEL="ExternalHD" UUID="49A1-143B" TYPE="vfat"

[/color]

Make a directory where to mount the disk and change the autorizations:

Code: Select all

sudo mkdir -p /media/HardDrive
sudo chmod 755 /media/HardDrive

[/color]

Edit the fstab file :

[/color]

Add this line (using your UUID and TYPE) :

Code: Select all

UUID=49A1-143B  /media/HardDrive   vfat    defaults      0     0

[/color]

Install minidlna :

[/color]
It will warn you about how many disk space it will use and dependencies installation

Now you can configure minidlna:

[/color]

You see many options like :

Code: Select all

# Change the Media Dir's to point to the external hard drive, obviously change these to match your directory layout
media_dir=A,/media/HardDrive/Media/Music
media_dir=V,/media/HardDrive/Media/Video
media_dir=P,/media/HardDrive/Media/Photos
 
# Change db_dir so that the database is saved across reboots
db_dir=/home/pi/.minidlna
 
# Uncomment log_dir for now in case we hit problems
log_dir=/var/log

You can choose to start minidlna at boot :

Code: Select all

sudo update-rc.d minidlna defaults

[/color]
Or just start it once now :

[/color]

MiniDLNA will now begin indexing all of your media files, it’s quite quick but folders not COMPLETELY indexed will not appear until they are done.

If you modify minidlna configuration, you have to reload it :

Code: Select all

sudo service minidlna force-reload

[/color]

You PS3 detects automatically the server in sections Pictures, Music or Videos
Usage is absolutely fluid. Play and pause a DivX without any problem. Thumbnail using square button is quick/instant !!

I forgot something ? I am not crystal clear ? Some spelling mistakes ? Leave a comment !

# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200

# network interfaces to serve, comma delimited
#network_interface=eth0

# specify the user account name or uid to run as
user=root

# set this to the directory you want scanned.
# * if you want multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to specific content types, you
#   can prepend the types, followed by a comma, to the directory:
#   + "A" for audio  (eg. media_dir=A,/home/jmaggard/Music)
#   + "V" for video  (eg. media_dir=V,/home/jmaggard/Videos)
#   + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
#   + "PV" for pictures and video (eg. media_dir=AV,/home/jmaggard/digital_camera)
# media_dir=/opt

media_dir=A,/home/jan/music
media_dir=V,/home/jan/videos
media_dir=P,/home/jan/pictures

# set this if you want to customize the name that shows up on your clients
friendly_name=POGOPLUG DLNA Server

# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/var/cache/minidlna

# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/var/log

# set this to change the verbosity of the information that is logged
# each section can use a different level: off, fatal, error, warn, info, or debug
#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn

# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes

# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no

# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
#   which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no

# default presentation url is http address on port 80
#presentation_url=http://www.mylan/index.php

# notify interval in seconds. default is 895 seconds.
notify_interval=900

# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1

# specify the path to the MiniSSDPd socket
#minissdpdsocket=/var/run/minissdpd.sock

# use different container as root of the tree
# possible values:
#   + "." - use standard container (this is the default)
#   + "B" - "Browse Directory"
#   + "M" - "Music"
#   + "V" - "Video"
#   + "P" - "Pictures"
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
#root_container=.

Понравилась статья? Поделить с друзьями:
  • Error failed to open ovf descriptor
  • Error failed to open games battle gm1 file for write
  • Error failed to open file error 2 mysql
  • Error failed to open display
  • Error failed to open apk database permission denied