Linux "File not found" once after resume

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
soopersonic Offline
Member
Posts: 56
Joined: Aug 2011
Reputation: 0
Post: #1
I've been having a problem since the very first day I installed XBMC Live (Dharma). After I recently updated my Live installation to Eden and the problem still persisting, I decided to get help from you guys.

Here's the situation: All my library files are shared across my network using a samba share on my NAS. My HTPC is connected via wire to the switch the NAS is also connected to.

Now everytime I resume standby after a longer period, I get the "file not found, do you want to remove it from the library?"-dialog. If I try to play the file again, right after having clicked "No", it always plays. After that, playing every other file also works without a problem. Even when I enter standby again and resume right after that, it works.

The problem only exists after longer periods of standby.
Another important info: The NAS is NOT in standby and there doesn't seem to be a timeout issue: The dialog appears right away, without waiting the 20 seconds I defined in advancedsettings.xml:
Code:
<samba>
    <clienttimeout>20</clienttimeout>
</samba>

When the NAS is indeed in standby, XBMC waits until it woke up and then plays the selected file like a charm.


Debug Log: http://pastebin.com/XR9iSrgs
Here's what I did: Resumed from standby, enabled debugging, went to "TV shows", tried to play an episode, got the dialog, clicked "No", immediately tried to play the same episode again, it played, stopped the playback, disabled debugging.

As you can see, I added my NAS as a source with a hostname instead of an IP, so I can change it easier in the future.
This is how I entered the hostname in my /etc/hosts file:
Code:
127.0.0.1    localhost
192.168.0.3    HTPC.localdomain    HTPC
192.168.0.2    NAS.localdomain        NAS


I hope you guys can make something from the information I gave. If not, please tell me what ever might be missing!
(This post was last modified: 2012-04-12 09:52 by soopersonic.)
find quote
Devaron Offline
Member
Posts: 93
Joined: Apr 2011
Reputation: 4
Location: Netherlands
Post: #2
Hi there,

I had the same problem, though i only had this after installing Eden. Never had this on Dharma. Apparently the IP adress can refresh after resume from sleep/suspend, which causes this problem. I managed to solve it, and i will explain how i did this. I must however add that i do NOT know a lot about Linux/Ubuntu. Only thing i know is that this helped me solve the "File not found" issue after resuming (XBMC 11 "Eden" and XBMCBuntu). I don't know if this will help you in your case.

I found this solution somewhere on some forum, but don't remember where. So thanks to the poster Wink

- Open the command line interface and go to "/etc/pm/sleep.d/"

- Create a new file named "10restartnetwork"

- Put the following code in the file and save and close it:

Code:
#!/bin/sh
case "$1" in
    resume|thaw)
        pkill NetworkManager
    ;;
    suspend|hibernate)
        # Do nothing
    ;;
esac

- Next, make the file executable by using the command "chmod +x 10restartnetwork"

- Now, if there is a file in the current directory named "99lirc_resume" you should disable this file to make sure it doesn't interfere with the script you just saved. Do this by typing "chmod -x 99lirc_resume"

- Reboot and try it out.

If you have any problems, you can revert to your old settings by deleting the new file (10restartnetwork) and making the file "99lirc_resume" (if it exists) executable again (chmod +x 99lirc_resume).

Hope this helps!
(This post was last modified: 2012-04-12 19:54 by Devaron.)
find quote
soopersonic Offline
Member
Posts: 56
Joined: Aug 2011
Reputation: 0
Post: #3
(2012-04-12 19:51)Devaron Wrote:  Hi there,

I had the same problem, though i only had this after installing Eden. Never had this on Dharma. Apparently the IP adress can refresh after resume from sleep/suspend, which causes this problem. I managed to solve it, and i will explain how i did this. I must however add that i do NOT know a lot about Linux/Ubuntu. Only thing i know is that this helped me solve the "File not found" issue after resuming (XBMC 11 "Eden" and XBMCBuntu). I don't know if this will help you in your case.

I found this solution somewhere on some forum, but don't remember where. So thanks to the poster Wink


Thank you for your answer! Have you also had this problem only ONCE after resuming? Because your solution sounds like it might help in a situation where the client gets the IP from a DHCP server, which is not the case for my HTPC. Also, pinging the NAS using
Code:
ping NAS
directly after resuming works and even after that, playing a file doesn't. Once. And then it works.

But I'll try it anyways, as soon as I get home.
(This post was last modified: 2012-04-12 22:34 by soopersonic.)
find quote
KidKiwi Offline
Posting Freak
Posts: 792
Joined: May 2007
Reputation: 0
Post: #4
I also have this problem - still running Dharma 10.0. It does it more often than not. I have found that resuming from standby and leaving it for several minutes before using it helps.

My xbmc box gets it's IP from a DHCP server. I thought perhaps setting a static IP would help - but obviously not. I've also got into the habit of checking the system info using the "i" button on the front menu. This always shows the internet is NOT connected when this happens.

I will try the above solution as well.

ZOTAC IONITX-D-E Intel Atom N330 Dual Core 1.6 GHz NVIDIA ION with LIVE on SSD
find quote
teeedubb Offline
Member+
Posts: 828
Joined: Mar 2010
Reputation: 14
Location: Down Under
Post: #5
Instead of pinging you could try listing the contents of a small file on the nas.

cat /file/on/nas

XBMC Steam Launcher - Only available for XBMC.
find quote
soopersonic Offline
Member
Posts: 56
Joined: Aug 2011
Reputation: 0
Post: #6
(2012-04-12 23:03)KidKiwi Wrote:  I also have this problem - still running Dharma 10.0. It does it more often than not. I have found that resuming from standby and leaving it for several minutes before using it helps.

Absolutely. I would say it does it 19 out of 20 times. I also noticed that waiting helps.

(2012-04-12 23:03)KidKiwi Wrote:  My xbmc box gets it's IP from a DHCP server. I thought perhaps setting a static IP would help - but obviously not. I've also got into the habit of checking the system info using the "i" button on the front menu. This always shows the internet is NOT connected when this happens.

I will try the above solution as well.

Interesting, I will take a look at the internet connection status the next time, too. That might be something that helps tracking the issue down.

(2012-04-13 00:22)teeedubb Wrote:  Instead of pinging you could try listing the contents of a small file on the nas.

cat /file/on/nas

Will do. I still couldn't find time for the suggestion in post #2, but this weekend I should be able to try both.
find quote
Devaron Offline
Member
Posts: 93
Joined: Apr 2011
Reputation: 4
Location: Netherlands
Post: #7
(2012-04-12 22:33)soopersonic Wrote:  Have you also had this problem only ONCE after resuming?

Yes i had this too. I agree that my former problem appears to differ from yours. So i'm very curious if the solution works for you and KidKiwi :-)
find quote
soopersonic Offline
Member
Posts: 56
Joined: Aug 2011
Reputation: 0
Post: #8
I've been able to do some testing and this is what came from it:

1) There's no NetworkManager in my installation of Linux (which was is an XBMC Live (Dharma) installation, which I've upgraded to Eden)
2) When looking at the connection info screen (as stated above by KidKiwi), my internet connection states "Connected", even if the popup will appear afterwards.
find quote
NotDave Offline
Junior Member
Posts: 3
Joined: Jan 2012
Reputation: 0
Post: #9
I too have the same problem, just about every time after xbmc resumes from suspend. Both xbmc and server are up and running (responding to pings) but fails on the very first smb request. This happens to both dharma and eden. The above trick with networkmanager did not fix the problem.
find quote
soopersonic Offline
Member
Posts: 56
Joined: Aug 2011
Reputation: 0
Post: #10
I did some further testing and couldn't really find anything.
The only thing I know: My NAS does not get any failed login attempts. So it's not the path substitution (passwords.xml) not working and XBMC trying to login without username/password in path. That would come up in my NAS' logs.
XBMC just doesn't seem to try at all...
find quote
Post Reply