Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[SOLVED] XMBC doesn't start automatically with nfs shared configured
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Solved: XMBC doesn't start automatically with nfs shared configured
23rd Jan, 2014, 02:56 AM
Post: #1
Lukeid Offline
Registered
Posts: 5
Joined: Jan 2014
Reputation: 1
Question XMBC doesn't start automatically with nfs shared configured
Hello,

Last week I decided to try Xbian (beta 2) on my RPi, every thing went perfectly until I configured my nfs share in /etc/fstab:
Code:
server:/media/share        /mnt/nas        nfs     udp,rw,noatime,nolock           0       0

After that configuration XBMC did not autostart anymore after reboot and loging prompt was shown.

I investigated it and the problem was that XBMC service was not started by upstart because conditions were not met.

xbmc.conf start conditions:
Code:
start on started xbmc-preload and started dbus and (started autofs or xbian-nowait)

And those conditions were not met because of "xbian-nowait" and "autofs" part.

I think that autofs is not installed by default in my system so it will never start.

And xbian-nowait event is only raised by "mountall" if no nfs shares are configured.
Code:
grep -v ^# /etc/fstab| awk '{print $3}' | sort | grep -q 'nfs\|nfs4' || initctl emit -n xbian-nowait || :

I was able to workarround the problem changing xbmc.conf start conditions to:
Code:
start on started xbmc-preload and started dbus

But I'm not sure why that condition was included and it may be a more elegant solution to just delay a little the XBMC start if a nfs share is configured.

I could not find any related topic so maybe I'm doing something wrong... Confused

Best regards
Find all posts by this user
Quote this message in a reply
25th Jan, 2014, 12:36 AM
Post: #2
teekay Offline
Registered
Posts: 20
Joined: Jan 2014
Reputation: 9
RE: XMBC doesn't start automatically with nfs shared configured
Same issue here. Thanks for analyzing!

I created xbmc.override with
Code:
start on started xbmc-preload and started dbus and mounted MOUNTPOINT=/home/xbian/.xbmc
because it won't work w/o the NFS mounts here anyway (this includes network as the library is on the MySQL server).

Boy, I thought systemd is weird, but it's sugar compared to upstart.
Find all posts by this user
Quote this message in a reply
25th Jan, 2014, 12:57 AM
Post: #3
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: XMBC doesn't start automatically with nfs shared configured
This problem has been discussed already in the Beta 2 thread.

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
25th Jan, 2014, 04:24 AM
Post: #4
Lukeid Offline
Registered
Posts: 5
Joined: Jan 2014
Reputation: 1
RE: XMBC doesn't start automatically with nfs shared configured
(25th Jan, 2014 12:57 AM)CurlyMo Wrote:  This problem has been discussed already in the Beta 2 thread.

As far as I know, similar issues has been discussed but I couldn't find this exact issue.

Because my share is not broken and automounts correctly at each reboot, i don't have problems with dhcp or interfaces, it is not an issue of NFS version, etc.

In my case it is more simple: if I configure a nfs share XBMC is not startted automatically and I end up in the shell.
Find all posts by this user
Quote this message in a reply
25th Jan, 2014, 04:49 PM
Post: #5
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: XMBC doesn't start automatically with nfs shared configured
@Lukeid

but this problem with libnfs updates is REALLY discussed few times in B2 thread and others as well.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
26th Jan, 2014, 07:05 AM
Post: #6
teekay Offline
Registered
Posts: 20
Joined: Jan 2014
Reputation: 9
RE: XMBC doesn't start automatically with nfs shared configured
I read the whole beta2 thread twice, and found some posts abaout xbmc service failing and dropping to shell if nfs fails to mount due to slow dhcp requests and such, but nothing about this specific issue: even if network starts fine and all nfs shares mount properly, the xbmc service will not start.

Lukeid's analysis looks perfectly reasonable to me, autofs isn't installed by default in the stable repo, and xbian-nowait is only emited if no nfs mounts are found in fstab. But the xbmc upstart service depends on one of those. Changing the dependencies fixes it for me, too. So thanks again for debugging @Lukeid.

Maybe I just failed to read between the lines correctly in the B2 thread, or I just have tomatoes on my eyes. Sorry if that's the case, but could you maybe link to a post where this was discussed then?
Find all posts by this user
Quote this message in a reply
28th Jan, 2014, 02:46 AM
Post: #7
Lukeid Offline
Registered
Posts: 5
Joined: Jan 2014
Reputation: 1
RE: XMBC doesn't start automatically with nfs shared configured
@teekay I totally agree with you.
Before posting I spent a couple of days searching the forum and reading the beta 2 thread, and I didn’t find any solution. (Maybe I'm not good enough searching forums Confused)

So when I found a working solution I decided to post it here in order to help other people.

But I still think that it is more like a workaround than a final fix. Maybe the fix would be to include autofs by default or just introduce some seconds of delay before raising the xbian-nowait event.

Trying to find a final fix was the other reason of my post. Smile

Best regards, and thank you all for your support.
Find all posts by this user
Quote this message in a reply
3rd Feb, 2014, 12:13 PM
Post: #8
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: XMBC doesn't start automatically with nfs shared configured
@Lukeid

this should have happened already.

worked ?

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
13th Feb, 2014, 03:14 AM
Post: #9
Lukeid Offline
Registered
Posts: 5
Joined: Jan 2014
Reputation: 1
RE: XMBC doesn't start automatically with nfs shared configured
(3rd Feb, 2014 12:13 PM)mk01 Wrote:  @Lukeid

this should have happened already.

worked ?

Do you mean changing xbmc.conf?
From:
Code:
start on started xbmc-preload and started dbus and (started autofs or xbian-nowait)
To:
Code:
start on started xbmc-preload and started dbus

Yes, that works most of the time. But maybe a better solution could be delay a bit the starting of XBMC if a NFS share is found. Or include autofs by default.
Find all posts by this user
Quote this message in a reply
15th Feb, 2014, 07:33 PM
Post: #10
teekay Offline
Registered
Posts: 20
Joined: Jan 2014
Reputation: 9
RE: XMBC doesn't start automatically with nfs shared configured
autofs is there by default meanwhile, after a dist-upgrade about 2 weeks ago.

The automatic migration of /etc/fstab was a bit awkward, but in the end using autofs and the standard upstart xbmc.conf works reliably here and that's what matters.
So the problem is solved by a dist-upgrade and migrating to autofs here.
Find all posts by this user
Quote this message in a reply
24th Feb, 2014, 05:17 AM
Post: #11
Lukeid Offline
Registered
Posts: 5
Joined: Jan 2014
Reputation: 1
RE: XMBC doesn't start automatically with nfs shared configured
Yes, after latest updates autofs is installed. So as you said, migrating fstab mounts to autofs and restoring upstart original configuration everything works as expected.

Thank you everybody Smile
Find all posts by this user
Quote this message in a reply
24th Mar, 2014, 10:55 AM
Post: #12
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: XMBC doesn't start automatically with nfs shared configured
thanks for confirming

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  [PROBLEM] It does not start automatically in xbmc anakin 3 10,458 8th Apr, 2014 10:00 PM
Last Post: anakin
  Can't make ssh start automatically. kevin watt 8 26,889 21st Dec, 2013 07:33 AM
Last Post: mk01
  [Tutorial] Shared Library / Shared Sources brantje 20 77,811 12th Jul, 2013 07:36 AM
Last Post: rikardo1979
  Sickbeard doesn't start kas_27_es 1 8,263 3rd Feb, 2013 02:57 AM
Last Post: CurlyMo

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 10th May, 2025, 09:59 PM Powered By MyBB, © 2002-2025 MyBB Group.