LinuxMCE Forums

General => Users => Topic started by: colinjones on January 29, 2008, 02:34:21 am

Title: Media over network share unavailable ... please help!
Post by: colinjones on January 29, 2008, 02:34:21 am
I have reinstalled b3 (DVD AMD64) 6 times now, for various issues. Notwithstanding those, one of the more enduring ones is network share based media - it has been exactly the same on every install so far.

As soon as the core comes up after install/setup (dual NIC as designed) it immediately detects my Windows PC on the Internal network via the DHCP plugin, identifies it as a File Server and offers up all my shares. I choose the correct one (it is an anonymous access share, no permissions), tell it it can use it automatically and with the LMCE structure. That file structure is already in that share with all my media on it.

I can see updatemedia running, and if I leave it long enough my media starts appearing, or I can force it using the resync option. Either way, I get my media browsable in the media browser, as you would expect, and can play it without any difficulty. But at some point very shortly after this it all disappears! When I try to do a sync again, I can see in the output window that the reason for this is the core thinks the share is offline (says "Device is offline, skipping this file").

However, it definitely isn't offline - not only can I browse the media on the share and play it within the KDE desktop, but if I use the Search function in LMCE's media browser screen, I can find it all and play it there, within LMCE!

I have noticed in various places (logs) and on the console sometimes, errors about CIFS VFS, with return codes like -13, -111, etc. So I think something is going on with the CIFS connection that causes updatemedia and the media browser to think the share is offline and thus not present it, even though it clearly is online.

Have tried rebooting both machines many times, and swapping the NICs (they are completely different NICs, one a PCI the other onboard) both the cables and the swap interfaces option in the admin console. I get the network back, can still browse and play, and ping, but LMCE still thinks it is offline. BTW, one of the many rebuilds was with the CD version and the result was exactly the same - at first it can see the media, displays and plays it, but then it goes off line and never comes back.

I have tried forcibly removing the devices that represent the server and the share, flushing the DHCP lease, then readding the Windows PC to the network and letting the same LMCE installation rediscover and add it (on a new IP address), again it finds and adds the media initially, but then a short time later, declares it offline.

I have logged a Mantis on this, but it doesn't seem to be progressing - at least it has been declared a duplicate of another issue that was purely about mounting internal drives, ie. no CIFS involved.

Has anybody seen this before? Any suggestions on what might be causing it?
Title: Re: Media over network share unavailable ... please help!
Post by: lon22 on January 29, 2008, 02:51:47 am
Actually, I just noticed this yesterday with one of my shares. The online checkbox on the admin site won't stayed checked and yes, when the share appears offline to LMCE, the media doesn't display in media browser, but it is searchable. If you delete the share and add it again, it appears online, until your next reboot. I have 7 shares, and it is always the last share of the bunch, thats is the last share in alphabetical order. I actually played around with it yesterday and it appears to be staying online even after a reboot. I will provide more details of the steps I took later, but I don't even know right now if it actually fixed the problem.

lon22
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on January 29, 2008, 02:59:11 am
Fantastic, Lon22 - PLEASE let me know ANYTHING you may find.... I only have one share, so by default it is the last :) I may have a go at creating a "later" (alphabetically) share, and redo the whole thing to see if I get the same thing.

So I don't have to rebuild (a 7th time!) can anyone tell me the exact steps to root out a discovered share and server, and then let it rediscover? And do I have to manually delete the media entries in the db from the admin console or are they "children" objects and get deleted automatically with the device?

I have removed servers/shares before, but the last time I did it, I just deleted the server device but it didn't rediscover it with the next DHCP request. My understanding is that the plugin just greps the DHCP log output for a lease request/ack, then a script takes the IP/MAC and determines if it is in the db already. If not, it adds it and kicks off the pnp scripts. For some reason this just wouldn't work last time. I even deleted the DHPC lease entry in the dhcp config file, and that didn't seem to do anything. Eventually, it just kicked off again, but it was far from clear what I did to achieve this! So any pointers on the right process would be greatly appreciated!
Title: Re: Media over network share unavailable ... please help!
Post by: tkmedia on January 29, 2008, 06:55:59 am
Colin I am seeing similar issues with my NAS drive and My MD not booting or just partially booting. Generally after its has been idle.
(Been messing with some of the wiring but not that much.)


I wonder if the nic is going to sleep on us and not waking propely. I am using the onboard nic for the internal net.
Would make since based on my symptoms any.  Will check power settings in bios tommorow.

Maybe this is contributing to some of the stability issues.

Mine seems a lot better after a fesh boot. (cold boot).

Seen memory leaks do the same though.

Any ways more to think about.
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on January 29, 2008, 07:29:01 am
Lon22 - just completely reinstalled after ensuring I had a second share on my PC. The main share is called "Media" the second, dummy share is called "Xyz" to ensure it is second.

PNP added the PC as usual, and I told it to ignore all the other shares except these two. Within minutes I was in media sync - it could see all my files and folders, but they were not yet syncd into the database - in other words it was displaying them by scanning the network share. I hit resync, and it displays all the media data it knows first, then as it has done every time so far, the second process seems to be the bit where it syncs the data into the data base, and again it says the device is offline, skipping... So it looks like the second share workaround isn't working for me.... damn!

tkmedia - I have tried both onboard and PCI NICs with exactly the same behaviour within mins of powering on the box. Moreover, I can play media in Kaffine on the desktop at the same time as hitting resync and it telling me the device is offline! I don't believe there is anything wrong with the NICs or network at all - it seems to be something at the CIFS protocol level is telling updatemedia and media browser that the share is offline, but in a way that doesn't effect the KDE desktop's access to the shares....

Does anyone know what protocol KDE desktop uses when you map to a Windows share in the Network folder? Is it possibly using a different protocol than updatemedia/media browser or different port (CIFS vs SMB) that would explain why it works fine in KDE but not in LMCE?
Title: Re: Media over network share unavailable ... please help!
Post by: Zaerc on January 29, 2008, 09:12:47 pm
Maybe it's a premission problem, tried creating a sambahelper account (http://wiki.linuxmce.org/index.php/Logging_In#The_sambahelper_account)?
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on January 29, 2008, 10:39:00 pm
Zaerc - thanks for the suggestion. I'm not sure - the shares are open access/anonymous with open write permissions, plus as I say, the core was initially able to connect and catalogue all my media with no difficulty, and is able to play it as long as I explicitly search for the filename. Again, does this suggest that the MediaPlugin or Xine are using a different network access protocol than updatemedia or the browser? Actually, they may not be using a different protocol at all, perhaps just a different signal/response code from the automount system - but I have no idea how that all works, just that it exists!

I checked my security event log (I enabled it the other day) on the Windows box and there are thousands of successful authentication events from DCEROUTER/Guest, and no failures.

Anyway, I will try the suggestion out - I'm assuming the idea is to create a Windows account with that username and password?

I did this, and even added it to the administrators group. Rebooted the Windows machine and the core - still no media :(
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on January 29, 2008, 10:53:05 pm
Just confirmed that even on a share that had no media on the drive or in the database, I added some media to it, and resync'd - and even on this first scan it finds the media by FILENAME! In the right folders, but in the same black output window after detailing the files it had JUST FOUND it goes on to say that the device is offline: (more below this snippet)

Resynchronize directory /home/public/data/videos/Windows Share: Xyz [36]

sudo -u root /usr/pluto/bin/UpdateMedia -d \"/home/public/data/videos/Windows Share: Xyz [36]\"10   01/30/08 8:40:37.606      AlarmManager::AlarmManager 0x68aea0 <0x2b13015668c0>
10   01/30/08 8:40:37.617      Activating Pluto Media Identifier... <0x2b13015668c0>
10   01/30/08 8:40:37.619      Pluto Media Identifier activated. Extensions 24 <0x2b13015668c0>
10   01/30/08 8:40:37.620      MediaState::LoadDbInfo ready to run big query <0x2b13015668c0>
10   01/30/08 8:40:37.629      MediaState::LoadDbInfo got 2 rows <0x2b13015668c0>
10   01/30/08 8:40:37.629      UpdateMedia::ReadDirectory /home/public/data/videos/Windows Share: Xyz [36] <0x2b13015668c0>
10   01/30/08 8:40:38.070      UpdateMedia::ScanFiles dir /home/public/data/videos/Windows Share: Xyz [36]: files found: 2 <0x2b13015668c0>
10   01/30/08 8:40:38.072      Need to update db for /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E01 - History Man.mpg: old file data 2008-01-30 08:40:08, current file date 2008-01-30 08:40:23 <0x2b13015668c0>
10   01/30/08 8:40:38.072      Sync mode for /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E01 - History Man.mpg: modeFileToDb <0x2b13015668c0>
05   01/30/08 8:40:38.072      # PlutoMediaFile STARTED: dir /home/public/data/videos/Windows Share: Xyz [36] file Absolute Power - S01E01 - History Man.mpg <0x2b13015668c0>
10   01/30/08 8:40:38.072      # ID3FileHandler::LoadAttributes: loading 0 attributes in the attribute file /home/public/data/videos/Windows Share: Xyz [36]/ <0x2b13015668c0>
10   01/30/08 8:40:38.072      # LoadPlutoAttributes: pluto attributes loaded (from id3 file - general object tag) 0 <0x2b13015668c0>
10   01/30/08 8:40:38.073      # LoadPlutoAttributes: id3 attributes loaded (from id3 file - common tags) 0 <0x2b13015668c0>
10   01/30/08 8:40:38.073      MergePictures: merging 0 pictures from our tag with 0 pictures from PIC tags <0x2b13015668c0>
10   01/30/08 8:40:38.073      Processing path /home/public/data/videos/Windows Share: Xyz [36], file Absolute Power - S01E01 - History Man.mpg. Found 0 attributes, 0 long attributes in file <0x2b13015668c0>
10   01/30/08 8:40:38.073      SetFileAttribute /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E01 - History Man.mpg 8364 <0x2b13015668c0>
10   01/30/08 8:40:38.075      # LoadPlutoAttributes: pluto attributes merged with those from database 0 <0x2b13015668c0>
10   01/30/08 8:40:38.075      # LoadPlutoAttributes: pluto long attributes merged with those from database 0 <0x2b13015668c0>
10   01/30/08 8:40:38.075      LoadCoverarts: loaded 0 unique pictures from file <0x2b13015668c0>
10   01/30/08 8:40:38.077      LoadBookmarkPictures: clear bookmarks from file.We'll use those from db: 0 <0x2b13015668c0>
10   01/30/08 8:40:38.078      # SaveMiscInfo: FK_FileFormat 0, FK_MediaSubType 0 <0x2b13015668c0>
10   01/30/08 8:40:38.078      # GetPicAttribute: file 8364 <0x2b13015668c0>
10   01/30/08 8:40:38.079      Found 0 pics for file <0x2b13015668c0>
10   01/30/08 8:40:38.080      Found 0 pics for attribute <0x2b13015668c0>
10   01/30/08 8:40:38.080      # GetPicAttribute: got no picture for file 8364 <0x2b13015668c0>
10   01/30/08 8:40:38.080      UpdateMedia::ReadDirectory File 8364 Picture 0 <0x2b13015668c0>
10   01/30/08 8:40:38.080      # SyncDbAttributes: ready to sync db with attributes found in attribute file <0x2b13015668c0>
10   01/30/08 8:40:38.081      # SyncDbAttributes: attributes is db 0, total 0 <0x2b13015668c0>
10   01/30/08 8:40:38.081      # SyncDbAttributes: long attributes is db 0, total 0 <0x2b13015668c0>
10   01/30/08 8:40:38.081      SaveCoverarts: got 0 coverarts in db. Merging with 0 from file <0x2b13015668c0>
10   01/30/08 8:40:38.081      # SaveMiscInfo: FK_FileFormat 0, FK_MediaSubType 0 <0x2b13015668c0>
Mapped file /mnt/device/36 : 26 -> 36
Mapped file /mnt/device/35 : 25 -> 35
10   01/30/08 8:40:38.085      File /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E01 - History Man.mpg on pluto device 36 <0x2b13015668c0>
10   01/30/08 8:40:38.095      File /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E01 - History Man.mpg, PK_File 8364 - midmd5 is 68359deca0f184ce49d05646e4f1ef6a <0x2b13015668c0>
10   01/30/08 8:40:38.126      # PlutoMediaFile ENDED: dir /home/public/data/videos/Windows Share: Xyz [36] file Absolute Power - S01E01 - History Man.mpg, sync mode modeFileToDb <0x2b13015668c0>
10   01/30/08 8:40:38.128      Need to update file because it's not in the database /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi <0x2b13015668c0>
10   01/30/08 8:40:38.128      Sync mode for /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi: modeBoth <0x2b13015668c0>
05   01/30/08 8:40:38.128      # PlutoMediaFile STARTED: dir /home/public/data/videos/Windows Share: Xyz [36] file Absolute Power - S01E02 - Pope Idol.avi <0x2b13015668c0>
10   01/30/08 8:40:38.128      # ID3FileHandler::LoadAttributes: loading 0 attributes in the attribute file /home/public/data/videos/Windows Share: Xyz [36]/ <0x2b13015668c0>
10   01/30/08 8:40:38.128      # LoadPlutoAttributes: pluto attributes loaded (from id3 file - general object tag) 0 <0x2b13015668c0>
10   01/30/08 8:40:38.128      # LoadPlutoAttributes: id3 attributes loaded (from id3 file - common tags) 0 <0x2b13015668c0>
10   01/30/08 8:40:38.129      MergePictures: merging 0 pictures from our tag with 0 pictures from PIC tags <0x2b13015668c0>
10   01/30/08 8:40:38.129      Processing path /home/public/data/videos/Windows Share: Xyz [36], file Absolute Power - S01E02 - Pope Idol.avi. Found 0 attributes, 0 long attributes in file <0x2b13015668c0>
10   01/30/08 8:40:38.130      GetFileAttribute /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi not found installation 0/57943 id 0 <0x2b13015668c0>
10   01/30/08 8:40:38.132      /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi not IN db-attr: 0 INode: 117591 <0x2b13015668c0>
10   01/30/08 8:40:38.132      Media Type is: 5, is folder 0 <0x2b13015668c0>
10   01/30/08 8:40:38.151      PlutoMediaFile::AddFileToDatabase new /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi PK_File 8367 Inode 117591 <0x2b13015668c0>
10   01/30/08 8:40:38.151      # SyncDbAttributes: attributes is db 0, total 0 <0x2b13015668c0>
10   01/30/08 8:40:38.151      # SyncDbAttributes: long attributes is db 0, total 0 <0x2b13015668c0>
10   01/30/08 8:40:38.151      PlutoMediaFile::AddFileToDatabase picture url  <0x2b13015668c0>
10   01/30/08 8:40:38.151      Added /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi to db with PK_File = 8367 <0x2b13015668c0>
10   01/30/08 8:40:38.151      UpdateMedia::ReadDirectory PlutoMediaFile_.HandleFileNotInDatabase 8367 <0x2b13015668c0>
10   01/30/08 8:40:38.151      SetFileAttribute /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi 8367 <0x2b13015668c0>
10   01/30/08 8:40:38.153      # LoadPlutoAttributes: pluto attributes merged with those from database 0 <0x2b13015668c0>
10   01/30/08 8:40:38.154      # LoadPlutoAttributes: pluto long attributes merged with those from database 0 <0x2b13015668c0>
10   01/30/08 8:40:38.154      LoadCoverarts: loaded 0 unique pictures from file <0x2b13015668c0>
10   01/30/08 8:40:38.155      # SaveMiscInfo: FK_FileFormat 0, FK_MediaSubType 0 <0x2b13015668c0>
10   01/30/08 8:40:38.156      # GetPicAttribute: file 8367 <0x2b13015668c0>
10   01/30/08 8:40:38.156      Found 0 pics for file <0x2b13015668c0>
10   01/30/08 8:40:38.157      Found 0 pics for attribute <0x2b13015668c0>
10   01/30/08 8:40:38.157      # GetPicAttribute: got no picture for file 8367 <0x2b13015668c0>
10   01/30/08 8:40:38.157      UpdateMedia::ReadDirectory File 8367 Picture 0 <0x2b13015668c0>
10   01/30/08 8:40:38.157      # GetPicAttribute: file 8367 <0x2b13015668c0>
10   01/30/08 8:40:38.157      Found 0 pics for file <0x2b13015668c0>
10   01/30/08 8:40:38.158      Found 0 pics for attribute <0x2b13015668c0>
10   01/30/08 8:40:38.158      # GetPicAttribute: got no picture for file 8367 <0x2b13015668c0>
10   01/30/08 8:40:38.158      # Won't create id3 file (the media file doesn't have attributes) <0x2b13015668c0>
10   01/30/08 8:40:38.158      # ID3FileHandler::SaveAttributes: saving 0 attributes in the attribute file /home/public/data/videos/Windows Share: Xyz [36]/ <0x2b13015668c0>
05   01/30/08 8:40:38.158      # ID3FileHandler::SaveAttributes: saving 0 pictures into APIC tags to /home/public/data/videos/Windows Share: Xyz [36]/ <0x2b13015668c0>
10   01/30/08 8:40:38.158      Serialize write bookmarks: 0 <0x2b13015668c0>
10   01/30/08 8:40:38.159      # SyncDbAttributes: ready to sync db with attributes found in attribute file <0x2b13015668c0>
10   01/30/08 8:40:38.159      # SyncDbAttributes: attributes is db 0, total 0 <0x2b13015668c0>
10   01/30/08 8:40:38.159      # SyncDbAttributes: long attributes is db 0, total 0 <0x2b13015668c0>
10   01/30/08 8:40:38.160      SaveCoverarts: got 0 coverarts in db. Merging with 0 from file <0x2b13015668c0>
10   01/30/08 8:40:38.160      # SaveMiscInfo: FK_FileFormat 0, FK_MediaSubType 0 <0x2b13015668c0>
Mapped file /mnt/device/36 : 26 -> 36
Mapped file /mnt/device/35 : 25 -> 35

10   01/30/08 8:40:38.162      File /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi on pluto device 36 <0x2b13015668c0>
10   01/30/08 8:40:39.203      File /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi, PK_File 8367 - midmd5 is  <0x2b13015668c0>
10   01/30/08 8:40:39.237      MediaState::LoadDbInfoForFile ready to run big query <0x2b13015668c0>
10   01/30/08 8:40:39.243      MediaState::LoadDbInfoForFile got 1 rows <0x2b13015668c0>
10   01/30/08 8:40:39.471      # PlutoMediaFile ENDED: dir /home/public/data/videos/Windows Share: Xyz [36] file Absolute Power - S01E02 - Pope Idol.avi, sync mode modeBoth <0x2b13015668c0>
10   01/30/08 8:40:39.474      Sync'ing db with directory... <0x2b13015668c0>
10   01/30/08 8:40:39.476      Device is offline, skipping the file /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E01 - History Man.mpg <0x2b13015668c0>
10   01/30/08 8:40:39.477      Device is offline, skipping the file /home/public/data/videos/Windows Share: Xyz [36]/Absolute Power - S01E02 - Pope Idol.avi <0x2b13015668c0>

10   01/30/08 8:40:39.477      DB sync'd with directory! <0x2b13015668c0>
10   01/30/08 8:40:39.479      AlarmManager::~AlarmManager start 0x68aea0 <0x2b13015668c0>
10   01/30/08 8:40:39.480      AlarmManager::~AlarmManager done 0x68aea0 <0x2b13015668c0>

I have also highlighted where it talks about the mountpoint. I don't understand what it is doing when it says it has mapped the file from device 25->35 and 26->36 .... 35 and 36 are the actual devices under /mnt/devices, and if I CD into those directories I can see all my media!!

Arrrgghh! I don't understand what is wrong.... everything says the shares are mounted and available except something in LMCE....

Can anyone explain the automounting process and if there is anything in there that might be causing LMCE to think the drives are not mounted when they clearly are? Or perhaps trying to access the media through a different protocol than directly off the drive mounts (which might explain why I get the CIFS errors)
Title: Re: Media over network share unavailable ... please help!
Post by: lon22 on January 30, 2008, 12:09:29 am
I'm not sure exactly what fixed my problem, but its been two days now and the share has stayed online through many reboots. I think the last share thing could be coincidental. The only thing I can remember doing is setting a username and password for the share. The username and password is the same I use to log into the fileserver. I set this, eventhough the share doesn't require a password. I also made the share's partition active. After all the steps I took, after the first boot it was still offline, but it seemed to eventually stay online. Sorry I can be of more help. I know how much of a pain that is.

lon22
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on January 30, 2008, 12:26:55 am
Even more bizarre! I tried adding another PC with another share just to eliminate the PC itself as an issue. Added the server and share, and resync'd with that, same result... But to connect it, I had to unplug the original PC's network cable as I am short of patch leads. And noticed that the admin site seems to remove the entry "Windows Share: Xyz [36]..." blah when it isn't actually on the network! So the web site itself, by implication is saying that the PC is normally online and available because I can always see these folders and click into them right down to the individual files (in the Media File Sync screen), but when I sync it says they are offline...

I tried running a sync from the Windows share level (I normally just run it against a small subfolder as there is a lot of media) - this took a lot longer and I could see it analysing the files, with the regular coloured lines saying things like # PlutoMediaFile STARTED, etc

When I go to the media browser in LMCE itself, whilst it was doing this, I can see some files appearing and playable. Because this sync took so long due to all the files, I was able to play with it a little bit. This is the second time I have noticed this strange behaviour - even though it had scanned dozens of media files, only 2 or 3 appeared in the video media browser. I could play them, but once I had played one and went back into the media browser, that one had disappeared and been replaced with another one! If I didn't play them, the same 3 stayed there. Play it... replaced again!

Now I have rebooted, and still have a couple of media files "stuck" in the orbiter's video media browser and can play them, but the rest are "offline"
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on January 30, 2008, 02:09:41 am
I removed that PC and its share in the admin console. tinkered with DHCP and refreshed on the PC NIC to get LMCE to rediscover and add the PC and share again. This time, because I know that Linux can be picky about case, and reshared it as media (rather than Media). I have XP in workgroup mode, so you don't get to set permissions on the share, its anonymous automatically.

Then after it was added, I went in and hit resync from the top of the share (ie in .../video/Windows Share:media [40]) - it worked and added all my media and I could browse and play it just fine. Hit resync again just to make sure that it still thought of it as online - yep, no problem. Did the same with my music, again no problem, online and can see and play it.

Unfortunately, LMCE had a big hiccup whilst completing the audio resync, and hard locked. Responded to nothing, so I had to reboot - this always seems to be the death of it! Rebooted, and once again all my media is offline again.... back to square one!!

Can someone who knows the protocols and mechanisms for marking media/devices offline please give me a hand? Been at this for 2 weeks now and have rebuilt 9 times from DVD and CD, tried different media, different networking, different NICs, different PC shares, tickering with the configurations in the admin console, reading the log files, etc, etc, etc but everytime it is the exact same result. KDE (through Dolphin), command line (/mnt/devices/36.. ) and mediaplugin/xine in LMCE can all see and play the media with no difficulty. Updatemedia and whatever marks devices/media online/offline can see it all at first and adds it all to the database, but then decides it is offline and I can't access it anymore through the orbiter's browser. And that is the way it stays from then on unless I delete the server and share and rediscover it or completely rebuild....

Devs??????
Title: Re: [WORKAROUND in place] Media over network share unavailable ... please help!
Post by: colinjones on February 04, 2008, 11:48:57 pm
Update: I have posted this in my Mantis ticket on this issue.

I managed to get a workaround to this issue!!!! Hooray!

After reading through logs and learning a little about autofs/automount, and finally finding where Pluto does this from - I found the /etc/auto.PlutoStorageDevices script, and noticed in there 2 options:
#CIFS_FileSystem="pluto-fuse-smb"
CIFS_FileSystem="cifs"

I have been convinced that the issue is something to do with the way LMCE mounts the file system using CIFS, and that in some way KDE and other things mount it differently - hence it works for one and not the other.

I figured that the commented line must be a legacy Pluto way of doing it, and the CIFS is a newer way.

So I commented out the CIFS line and removed the comment on the other line, rebooted and hey presto all my media is back again....

Don't know what else this will break at this stage...
Title: Re: Media over network share unavailable ... please help!
Post by: Zaerc on February 05, 2008, 03:15:19 pm
Now that you mention it, have a look at this: http://forum.linuxmce.org/index.php?topic=2068.msg9752#msg9752
Title: Re: Media over network share unavailable ... please help!
Post by: royw on February 05, 2008, 07:42:42 pm
FYI, it looks like that patch is already included in 0710B3.
Title: Re: Media over network share unavailable ... please help!
Post by: Zaerc on February 05, 2008, 11:58:25 pm
FYI, it looks like that patch is already included in 0710B3.
Cool looks like you're right, in all honesty I forgot about it as I no nonger need that fix myself.  So I guess you could try changing "cifs" to "smbfs" in the web-admin instead colinjones.
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on February 06, 2008, 12:16:03 am
Zaerc/Royw - Thanks.

Zaerc - actually, before I came across the auto.Pluto.... file, in desparation I tried tinkering with that exact setting. But not knowing anything about how these protocols are used or what Linux calls them, I took a shot in the dark and tried "smb"! Didn't seem to do anything - no improvement, and no errors... maybe smbfs would have made the difference.

Do you know why it requires smbfs? This is an OEM standard XP install in a workgroup. But when I try a share on my work XP Professional, with all the work policies in a domain etc, it does exactly the same thing....

If there is something fundamental about some machines not accepting CIFS, then shouldn't the pnp script detect which it is, and insert the correct value in that attribute now that the patch is in place?
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on February 06, 2008, 01:06:29 am
Yep, that seems to have fixed it, as long as I have a username and password in there as well. But have converted the script back, and changed the cifs to smbfs, rebooted and it all seems good!

Thanks
Title: Re: Media over network share unavailable ... please help!
Post by: royw on February 06, 2008, 06:49:15 am
I've been following this thread closely because I have a similar problem with an nfs share.  Can rip to nfs share, then file's permissions are screwy.  Change them to 777 and updatemedia insists device is offline.  Manually change config to online, run updatemedia, device is back to offline.  Filename search finds files.  Media File Sync finds files.  Title browsing does not find files.  I.e., pretty much the same symptoms you were having with cifs...

Really looking like something above the underlying protocol is misbehaving.

Currently I have a new network card on order as kubuntu locks up when transferring several dvd files to nfs share.  I'm going to replace the card in a few days then dig heavy into the db & scripts.

Have fun,
Roy
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on February 06, 2008, 10:26:31 am
Roy - if you can browse your shares from KDE, play the media, and search (not browse) for the media in LMCE and play it, then it is definitely the same issue. All this time my gut told me it was a logic issue in determining whether the "device" was online or not. I think this has been vindicated by my experience.

Even UpdateMedia was able in its first phase of the output window, to find and connect to the files and grab attributes, etc, but then bizarely in the same process at the end of the run, suddenly say that the device was offline! Even if I changed the artwork, embedded tags or the file name, it would see that an log it in the output window proving that it was "online" but then say the device is offline.

Not using NFS in any way nor know much about it, except that the script I edited definitely mentions it at points, so I would start there... hope it doesn't take you as long as it did me!
Title: Re: Media over network share unavailable ... please help!
Post by: royw on February 08, 2008, 02:13:48 am
Howdy,

I may have found the nfs problem.  In /usr/pluto/bin/StorageDevices_StatusRadar.sh there are two typos in the nfs area:
Code: [Select]
for NFSShare in $NFSShareList ;do
if [[ "$NFSShare" == "" ]] ;then
continue
fi

Share_ID=$(Field "1" "$NFSShare")
                        Share_Name=$(Field "2" "$NFSShare")
                        Share_Username=$(Field "3" "$NFSShare")
                        Share_Password=$(Field "4" "$NFSShare")

## Test if the share is still in the list
showmount -e $Device_IP | cut -d ' ' -f1 | grep "^${ShareName}$"
isShareInList=$?

if [[ "$isShareInList" != "0" ]] ;then
Log "Share $Share_ID ($Share_Name) is not advertised by the nfs server"
SetDeviceOnline "$Share_ID" "0"
continue
fi

                        ## See if the share is mountable
                        mountDirTemp=$(mktemp -d)
                        mount ${Device_ID}:${Share_Name} $mountDirTemp 1>/dev/null 2>/dev/null
                        isShareMountable=$?

1) The variable $ShareName in the showmount command should be $Share_Name
2) The variable $Device_ID in the mount command should be $Device_IP

BTW, it looks like this is the script responsible for assigning device online/offline status.  You can manually run it with the background option to see the log messages (I couldn't find the messages in any log file):

  sudo /usr/pluto/bin/StorageDevices_StatusRadar.sh background

To replace in a running system you will need to kill the currently running script, then spawn the changed script to the background:

  $ ps -ef | grep StorageDevices_StatusRadar
  root      AAAA     1  0 19:06 ?        00:00:00 SCREEN -d -m -S StorageStatusRadar /usr/pluto/bin/StorageDevices_StatusRadar.sh background
  root      BBBB  8323  0 19:06 pts/6    00:00:01 /bin/bash /usr/pluto/bin/StorageDevices_StatusRadar.sh background
 
  $ sudo kill -9 AAAA BBBB
  $ sudo /usr/pluto/bin/StorageDevices_StatusRadar.sh

This did eliminate the device is offline issue with updatemedia for my nfs share...

Have fun,
Roy
Title: Re: Media over network share unavailable ... please help!
Post by: dopey on February 08, 2008, 05:20:54 am
colinjones, have you tried using a fake username and password. Even though Windows XP has the share anonymous smbfs still requests a password to mount. I never matters what you use for a password, but it will always ask for one. CIFS may have the same quirk.

Of course, that should be handled by the script, but I don't have it handy to say if it actually does.
Title: Re: Media over network share unavailable ... please help!
Post by: royw on February 09, 2008, 12:20:57 am
I'm very happy to report that NFS shares are now working for me.  It was a combination of three issues:

I opened a Mantis ticket for the first issue: http://mantis.linuxmce.org/view.php?id=3915 (http://mantis.linuxmce.org/view.php?id=3915).

The last issue was found after reading http://ubuntuforums.org/showthread.php?t=183636 (http://ubuntuforums.org/showthread.php?t=183636).

Have fun,
Roy
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on February 09, 2008, 12:43:10 am
colinjones, have you tried using a fake username and password. Even though Windows XP has the share anonymous smbfs still requests a password to mount. I never matters what you use for a password, but it will always ask for one. CIFS may have the same quirk.

Of course, that should be handled by the script, but I don't have it handy to say if it actually does.

Dopey - no I didn't try that, I had already created a "media" account and password and just used that instead. But you're right, it should really be handled in the script as it is on the smbfs side, not the Windows side. Perhaps we should have that in there as well as the determination of whether it should use smbfs in the first place or cifs?

Well done Royw!
Title: Re: Media over network share unavailable ... please help!
Post by: Randykc on March 04, 2008, 06:28:15 pm
I found this thread after experiencing the same issue this weekend. what ended up being the final resolution colinjones?

I made the corrections to the StorageDevices_StatusRadar.sh file and got my media to display.  Thought I had it fixed until I came home yesterday and found my Core/Hybrid machine hung and I had to reboot. When it came back, my Windows shared media were missing again.  I went directly to the admin page and the Online checkbox for all of my window shares were not checked. I checked the Online box, hit Save, closed the admin page, went back into the admin page, and again, the box was not checked.

I think I'm close to getting it to work, so I don't want to make any drastic changes. Since I can use search and find the media, does that mean the entries are still in the database?

Also, since I can play the windows shared media after finding it in a search, would that indicate that my permissions, firefall, network, etc is valid?
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on March 04, 2008, 10:09:31 pm
You definitely seem to have the same problem. When that tick box unticks itself a few seconds later, it is being marked offline.

The only way I could fix it was (using 0710beta3 or 4) putting smbfs in the config of the share instead of cifs. This fixed the protocol problem. Also, putting a user name and password in both the share config and server config devices was necessary - NOTE - without this it was unable to see the share as online so didn't present the media in the browser. However I could still browse and play the media just fine in KDE desktop, so that may have been the case for the search function in LMCE.

Recently I started getting smbfs problems that was freezing Linux - I switched back to cifs and it worked fine!!! I had done nothing else but all seemed good.

I have now installed beta 4 and either seems to work! But I note that from the changelog it suggests that the default has been changed to smbfs - this is not true, my share was created as cifs just as with previous versions.
Title: Re: Media over network share unavailable ... please help!
Post by: Randykc on March 04, 2008, 10:45:34 pm
Excellent.  Just what I was looking for.  I haven't entered a username and password into the server configs yet, but that was on my to-do list tonight. Didn't know if you went back to cifs from smbfs after the typos were discovered in StorageDevices_StatusRadar.sh.

Thanks for the update.
Title: Re: Media over network share unavailable ... please help!
Post by: colinjones on March 04, 2008, 10:54:49 pm
Frankly, I don't know which to use (cifs or smbfs) at this point - haven't received any meaningful answers on the underlying protocol issue to this... with cifs I feel that at any time the mounting issue could come back, with smbfs the freezing issue could come back! I would prefer to use cifs as it is apparently better supported...
Title: Re: Media over network share unavailable ... please help!
Post by: orionsune on March 04, 2008, 11:40:29 pm
Don't know how related this is, but i've also noticed, I can't use characters like !@#$%^&*()_+|<>?,./-=[]\ in my password or it will fail to mount.  I had to create another user account with a simple password specifically for lmce to use.
Title: Re: Media over network share unavailable ... please help!
Post by: Randykc on March 05, 2008, 09:14:16 am
That did it. I noticed that I had switched from cifs to smbfs but without the username/password entry. I added a username/password and switched back over to cifs and it all started showing up again.