Local media on NTFS USB Stick is not found

Hi,

I am having problems with Pi Musicbox and a NTFS formatted USB Stick. I already mounted the USB Stick and can browse all Songs at /music/USB using Midnight Commander or WinSCP. Unfortunately Musicbox won´t find any Song, either on boot or when searching by entering the command “mopidy local scan”. This is the output I get:

root@MusicBox:~# mopidy local scan
INFO     Starting Mopidy 0.19.5
INFO     Loading config from: builtin defaults, /etc/xdg/mopidy/mopidy.conf, /root/.config/mopidy/mopidy.conf, command line options
INFO     Enabled extensions: stream, spotify_tunigo, podcast-gpodder, http-kuechenradio, somafm, softwaremixer, moped, musicbox_webclient, websettings, tunein, mopify, podcast-itunes, internetarchive, mpd, http, podcast, alsamixer, mobile, local-sqlite, youtube, simple-webclient, local-whoosh, audioaddict
INFO     Disabled extensions: spotify, gmusic, scrobbler, subsonic, dirble, local, soundcloud
WARNING  Found dirble configuration errors, the extension has been automatically disabled:
WARNING    dirble/api_key must be set.
WARNING  Found gmusic configuration errors, the extension has been automatically disabled:
WARNING    gmusic/username must be set.
WARNING    gmusic/password must be set.
WARNING  Found local configuration errors, the extension has been automatically disabled:
WARNING    local/media_dir must be set.
WARNING  Found scrobbler configuration errors, the extension has been automatically disabled:
WARNING    scrobbler/username must be set.
WARNING    scrobbler/password must be set.
WARNING  Found soundcloud configuration errors, the extension has been automatically disabled:
WARNING    soundcloud/auth_token must be set.
WARNING  Found spotify configuration errors, the extension has been automatically disabled:
WARNING    spotify/username must be set.
WARNING    spotify/password must be set.
WARNING  Found subsonic configuration errors, the extension has been automatically disabled:
WARNING    subsonic/username must be set.
WARNING    subsonic/hostname must be set.
WARNING    subsonic/ssl must be set.
WARNING    subsonic/password must be set.
WARNING    subsonic/port must be set.
WARNING  Please fix the extension configuration errors or disable the extensions to silence these messages.
ERROR    Unable to run command provided by disabled extension local

Any idea? Pls help!

edit: Here you can find my logfile:
Oh, unfortunately it doesn´t fit, too many characters…

I find this quiet interesting:

2015-08-02 16:45:52,668 - ERROR    Error browsing local:directory:USB: [Errno 13] Permission denied: '/music/USB'

This is where I mounted my USB Stick

You want the service to scan i.e. /etc/init.d/mopidy run local scan and you will need to ensure that the user mopidy has read permissions at your mount point. In the default musicbox image /media/USB has sufficient permissions and is in fact owned by user mopidy. Perhaps when you mounted the drive you did something different.

Hi,

I mounted the USB Stick following these instructions:

Step 0.
Plug in your USB HDD / Drive to Raspberry Pi


If you are using a NTFS formatted drive, install the following



sudo apt-get install ntfs-3g



Step 1.

Log on pi using ssh terminal and execute:


ls -l /dev/disk/by-uuid/


You will see something like the following:





lrwxrwxrwx 1 root root 10 Jan  1  1970 0AC4D607C4D5F543 -> ../../sda1



Note down the value of the UUID --> 0AC4D607C4D5F543





Step 2.

Create a location for mount point:

sudo mkdir /media/NASDRIVE





Give proper permission:

sudo chmod 770 /media/NASDRIVE





Step 3.

Get the uid, gid for pi user and group with id command (usually 1000)



Step 4.

Mount the USB Drive and then check if it is accessible at /media/NASDRIVE

sudo mount -t ntfs-3g -o uid=1000,gid=1000,umask=007 /dev/sda1 /media/NASDRIVE





Note:

ntfs-3g for NTFS Drives

vfat for FAT32 Drives

ext4 for ext4 Drives





Step 5.

Now, we will configure RasPi to do this after every reboot:



Take a backup of current fstab and then edit

sudo cp /etc/fstab /etc/fstab.backup

sudo nano /etc/fstab 





Add the mount information in the fstab file (replace UUID with your own):

UUID=0AC4D607C4D5F543 /media/NASDRIVE ntfs-3g uid=1000,gid=1000,umask=007 0 0




Step 6.

Reboot

sudo reboot

Of course I changed the UID and the paths.
can you tell me what I need to enter to allow mopidy to read and execute the files in /music/USB? I don´t get it :frowning:

Even though the instructions that you used (http://www.techjawab.com/2013/06/how-to-setup-mount-auto-mount-usb-hard.html) claim to be “for raspberry pi”, they are actually working with Raspbian on Rpi and that comes with a user called “pi”, whereas musicbox doesn’t (as mentioned above). You also shouldn’t be creating a /music/USB because that already exists.

Ok, thx for the hint, but how can I solve my problem now? Any idea?

I cannot format the stick in FAT32, too big. So if I cannot mount and use the NTFS USB Stick then just tell me and I won´t use this software. Any help appreciated. Thank you!

As a dirty hack you could probably just change your mount option to umask=003 to give everyone read permission. Or you could have a search online and find out how to sort it out properly, there is no shortage of info.

Well it’s working now. I mounted it again to another new destination and now I can browse the stick by navigating to browse /local/ folder /. Now I have a new problem. First of all mopidy is not indexing all my songs. That’s okay, I can browse my folders. But for some reason it does not play a lot of songs and I have no idea why. Any hint how I can find out what’s wrong here? I’m only using my browser to control mopidy. Thanks for your help again guys.

If there are any mopidy errors they should be in /var/log/mopidy/mopidy.log
so have a look in there. Are the failing files a different audio format?

files are all mp3 files. Here is what the log says (of course only a few lines):

2015-08-06 09:43:22,986 - WARNING  Track is not playable: file:///music/USBS/Alben%5CWeLoveThe80s%5CCD3%5C14%20-%20Steve%20Winwood%20-%20Higher%20Love%20-%20I%20Want%20My%2080%27s%20Box%20%28Disc%20.mp3
2015-08-06 09:43:23,068 - WARNING  Setting GStreamer state to GST_STATE_PLAYING failed
2015-08-06 09:43:23,110 - ERROR    Could not open resource for reading. Debug message: gstfilesrc.c(1047): gst_file_src_start (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin10/GstFileSrc:source:
system error: Permission denied
2015-08-06 09:43:23,120 - WARNING  Track is not playable: file:///music/USBS/Alben%5CBob%20Marley%20-%20Legend%20%28Deluxe%20Edition%29%5CBob%20Marley%20-%20%20Could%20You%20Be%20Loved.mp3
2015-08-06 09:43:23,244 - ERROR    Could not open resource for reading. Debug message: gstfilesrc.c(1047): gst_file_src_start (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin11/GstFileSrc:source:
system error: Permission denied
2015-08-06 09:43:23,259 - WARNING  Setting GStreamer state to GST_STATE_PLAYING failed
2015-08-06 09:43:23,268 - WARNING  Track is not playable: file:///music/USBS/Alben%5CDieter%20Geburtstag%5CA-ha%20-%20Take%20On%20Me.mp3
2015-08-06 09:43:23,365 - WARNING  Setting GStreamer state to GST_STATE_PLAYING failed
2015-08-06 09:43:23,388 - ERROR    Could not open resource for reading. Debug message: gstfilesrc.c(1047): gst_file_src_start (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin12/GstFileSrc:source:
system error: Permission denied
2015-08-06 09:43:23,394 - WARNING  Track is not playable: file:///music/USBS/Alben%5CBob%20Marley%20-%20Legend%20%28Deluxe%20Edition%29%5CBob%20Marley%20-%20%20Is%20This%20Love.mp3
2015-08-06 09:43:23,520 - ERROR    Could not open resource for reading. Debug message: gstfilesrc.c(1047): gst_file_src_start (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin13/GstFileSrc:source:
system error: Permission denied
2015-08-06 09:43:23,528 - WARNING  Setting GStreamer state to GST_STATE_PLAYING failed
2015-08-06 09:43:23,535 - WARNING  Track is not playable: file:///music/USBS/Alben%5CBob%20Marley%20-%20Legend%20%28Deluxe%20Edition%29%5CBob%20Marley%20-%20%20No%20Woman%20No%20Cry.mp3
2015-08-06 09:43:23,665 - ERROR    Could not open resource for reading. Debug message: gstfilesrc.c(1047): gst_file_src_start (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin14/GstFileSrc:source:
system error: Permission denied

again a permission error? Why can I play some other files?

I also get this error in logfile where all my folders are shown:

2015-08-07 01:42:32,040 - WARNING  Problem looking up file:///music/USBS/37%20Empire%20Of%20The%20Sun-We%20Are%20The%20People%20%28new%29.mp3: Could not open resource for reading.
2015-08-07 01:42:32,103 - WARNING  Problem looking up file:///music/USBS/Alben: Could not open resource for reading.
2015-08-07 01:42:32,163 - WARNING  Problem looking up file:///music/USBS/Charts: Could not open resource for reading.
2015-08-07 01:42:32,223 - WARNING  Problem looking up file:///music/USBS/Eigene%20Tracks: Could not open resource for reading.
2015-08-07 01:42:32,271 - WARNING  Problem looking up file:///music/USBS/Hochzeit%2070-80s.m3u: Could not open resource for reading.
2015-08-07 01:42:32,341 - WARNING  Problem looking up file:///music/USBS/Hochzeit%2080s.m3u: Could not open resource for reading.
2015-08-07 01:42:32,402 - WARNING  Problem looking up file:///music/USBS/House: Could not open resource for reading.
2015-08-07 01:42:32,460 - WARNING  Problem looking up file:///music/USBS/Inna%20-%20Sun%20Is%20Up%20%28Club%20Version%29%20%5Bmp3track.ucoz.ru%5D.mp3: Could not open resource for reading.
2015-08-07 01:42:32,523 - WARNING  Problem looking up file:///music/USBS/J%C3%BCrgen%20Drews%20-%20Schlossallee: Could not open resource for reading.
2015-08-07 01:42:32,583 - WARNING  Problem looking up file:///music/USBS/Mixe: Could not open resource for reading.
2015-08-07 01:42:32,642 - WARNING  Problem looking up file:///music/USBS/Party%20Hard.mp3: Could not open resource for reading.
2015-08-07 01:42:32,690 - WARNING  Problem looking up file:///music/USBS/PartyHard: Could not open resource for reading.
2015-08-07 01:42:32,762 - WARNING  Problem looking up file:///music/USBS/Playlists: Could not open resource for reading.
2015-08-07 01:42:32,821 - WARNING  Problem looking up file:///music/USBS/Silvester2013.m3u: Could not open resource for reading.
2015-08-07 01:42:32,871 - WARNING  Problem looking up file:///music/USBS/Techno: Could not open resource for reading.
2015-08-07 01:42:32,942 - WARNING  Problem looking up file:///music/USBS/stevie%20nicks%20-%20edge%20of%20seventeen.mp3: Could not open resource for reading.
2015-08-07 01:42:33,004 - WARNING  Problem looking up file:///music/USBS/stevie%20nicks%20-%20edge%20of%20seventeen.sfk: Could not open resource for reading.
2015-08-07 01:42:33,064 - WARNING  Problem looking up file:///music/USBS/stevie%20nicks%20-%20edge%20of%20seventeen.wav: Could not open resource for reading.
2015-08-07 01:42:33,335 - ERROR    Could not open resource for reading. Debug message: gstfilesrc.c(1047): gst_file_src_start (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin77/GstFileSrc:source:
system error: Permission denied

I already tried chmod -R 0777 /music/USBS

doesn´t help :frowning:

edit: ok, fixed that! chmod doesn´t help with NTFS so I used umask when moutnig the device.

Well, now I can browse my folders and see the songs. Unfortunately it still does not play all songs without giving an error in the logfile. Try to fix it as well, any idea appreciated!