INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: For library sync, must server be on when client starts?  (Read 2355 times)

robland

  • Junior Woodchuck
  • **
  • Posts: 73
For library sync, must server be on when client starts?
« on: October 02, 2020, 12:14:51 pm »

Setup:
2 Win10 64-bit PCs and 1 QNAP NAS on a home network.
PCs running MC 25 64-bit.
Laptop PC in living room/main audio system is the server, desktop PC in office for desktop audio system is the client.

Question:
Is it *required* that the server be on/running MC in order for the client MC to start/load the remote library?

When I try to start MC on client with server powered down, I get a "critical error".

It's puzzling because if both PCs are on/running MC, of course the client can successfully load the library from the server. Later, if the server goes to sleep, the client can continue to successfully play music from the NAS using the previously loaded remote library.

It sure seems like, if the client *cannot* connect to the server on startup, it could simply use the previously loaded/cached version of the remote library. Is that doable somehow?

It's inconvenient to require both computers to be on when I just want to use the client.

Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: For library sync, must server be on when client starts?
« Reply #1 on: October 02, 2020, 01:38:09 pm »

Question:
Is it *required* that the server be on/running MC in order for the client MC to start/load the remote library?
Yes.

It's puzzling because if both PCs are on/running MC, of course the client can successfully load the library from the server. Later, if the server goes to sleep, the client can continue to successfully play music from the NAS using the previously loaded remote library.
It's not puzzling. The library data is cached while the client is running, and the media files remain available on the NAS. However, you may have noticed that the client cannot sync changes in the library back to the server if the server goes offline.

It's inconvenient to require both computers to be on when I just want to use the client.
In the same way it's inconvenient that the NAS must be on. That's the way MC's Library Server function works.  If you stored the library files themselves on the NAS, they would be available if either PC is turned off, and the other PC could open that library, but only one at a time.  However, going that route has many complications, and might not be recommended for you.  Google "jriver library sharing" or "jriver library on nas" to research that.
Logged

robland

  • Junior Woodchuck
  • **
  • Posts: 73
Re: For library sync, must server be on when client starts?
« Reply #2 on: October 02, 2020, 05:30:50 pm »

In the same way it's inconvenient that the NAS must be on.

Okay, you got me with that one.

For library sharing (as opposed to library sync), I found this topic, maybe I'll try this at some point (https://wiki.jriver.com/index.php/Sharing_a_media_library_with_multiple_users_on_a_home_network_(LAN)) though I must say the library sync feature is pretty slick.

Maybe what I need is simply a power setting on the server PC that would wake it up at requests from clients. My NAS does this, how do I do that on a PC?
Logged

robland

  • Junior Woodchuck
  • **
  • Posts: 73
Re: For library sync, must server be on when client starts?
« Reply #3 on: October 02, 2020, 05:46:32 pm »

Also, I think this is a documentation bug -

https://wiki.jriver.com/index.php/Media_Server#After_the_Library_is_Served

"You can play your media on the client, and create playlists. But any changes you make on the client are not saved on the server until you select Library Sync... from the Library menu selection."

MC25 has the auto-sync setting on the client. This was a bit confusing at first, whether sync was auto or manual.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: For library sync, must server be on when client starts?
« Reply #4 on: October 02, 2020, 05:51:04 pm »

For library sharing (as opposed to library sync), I found this topic, maybe I'll try this at some point (https://wiki.jriver.com/index.php/Sharing_a_media_library_with_multiple_users_on_a_home_network_(LAN)) though I must say the library sync feature is pretty slick.

As Wer says, Library Sharing that way is absolutely not recommended. Sure, it works, until you want to run MC on both PCs, then you will potentially see Library corruption, and certainly some strange behaviour.

The MC Library should be on a fast local drive, preferably an SSD, if you want good performance in MC. That Wiki needs some warnings. It is very old.


Maybe what I need is simply a power setting on the server PC that would wake it up at requests from clients. My NAS does this, how do I do that on a PC?

Correct. You need your laptop server to sleep, not shut down, and have WOL set up so that the MC Client wakes the Server. This is common practice.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

robland

  • Junior Woodchuck
  • **
  • Posts: 73
Re: For library sync, must server be on when client starts?
« Reply #5 on: October 02, 2020, 06:06:08 pm »

Okay that's helpful, I had not heard of WOL (Wake On Lan) before.

This topic seems helpful:

https://www.howtogeek.com/70374/how-to-geek-explains-what-is-wake-on-lan-and-how-do-i-enable-it/

I think I just need to use Device Manager on the server PC to set the properties of the network adapter.

So if WOL works, that will be a huge convenient improvement in this setup.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: For library sync, must server be on when client starts?
« Reply #6 on: October 02, 2020, 07:01:39 pm »

So if WOL works, that will be a huge convenient improvement in this setup.

If it works. :)

A lot of PCs have problems with it. And then, does it wake quickly enough before the client times out.

The Library Server function works great, except for all the things that don't work.  So your mileage may vary, but don't expect a seamless and perfect experience.

Personally, I leave my server running all the time. The $50/year it costs me in electricity saves me a lot more than $50 worth of trouble.

I wish you well with your efforts though.

Rod, would you like to have a little wager about whether we'll be hearing from this nice gentleman again soon for WoL and Library Server issues?  :P
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72544
  • Where did I put my teeth?
Re: For library sync, must server be on when client starts?
« Reply #7 on: October 02, 2020, 07:06:24 pm »

Personally, I leave my server running all the time. The $50/year it costs me in electricity saves me a lot more than $50 worth of trouble.
You could do it for less than that with an IdPi and a USB drive.

The Id itself uses about 100 Kw / year.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: For library sync, must server be on when client starts?
« Reply #8 on: October 02, 2020, 07:15:24 pm »

No, because the IdPi doesn't do video.  My server is hooked up to a TV and does video playback while the TV is on, and continues to act as server while the TV is off.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: For library sync, must server be on when client starts?
« Reply #9 on: October 02, 2020, 08:29:30 pm »

Rod, would you like to have a little wager about whether we'll be hearing from this nice gentleman again soon for WoL and Library Server issues?  :P

Well, I don't gamble, so no.  :P

As robland worked out what WOL is, and found that excellent web page explaining how to get it working, I think he will have no issues. As long as all the components, Hardware, BIOS, OS, support it, it is easy to set up.

WOL works really well on my LAN. I just don't expect it to perform magic. It takes a little while to wake my HTPC MC Server, but not too long.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

robland

  • Junior Woodchuck
  • **
  • Posts: 73
Re: For library sync, must server be on when client starts?
« Reply #10 on: October 04, 2020, 07:37:54 pm »

If it works. :)

A lot of PCs have problems with it.


Oh no, this reminds me of my last thread on this wiki, which was about DLNA playback having stuttering over the network. Turns out, the solution there was not to use DLNA, and I switched to a USB connection instead.

So on my 10-yr old Lenovo Ideapad laptop, the WOL properties were already enabled on the network adapter; I only needed to select the two check boxes on the Power Management tab to enable WOL and the magic packet.

Unfortunately, this only works some of the time.

I've just learned that Windows has 4 sleeping states, and, on my device at least, WOL does not work with all these states:

https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/system-sleeping-states

If the server has recently gone to sleep and still shows a blinking light at the ethernet connection, the client can wake it up. But if the server is in some deeper sleep state, where no lights are on at all, the client cannot wake up the server.

If I knew how to retrieve these values, I could probably figure out exactly which states support WOL on the network adapter, but it really doesn't matter at this point:

https://docs.microsoft.com/en-us/windows-hardware/drivers/kernel/determining-whether-a-device-can-wake-the-system
https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/ns-wdm-_device_capabilities

So like DLNA, WOL over promises and under delivers! ah, technology...
Logged

robland

  • Junior Woodchuck
  • **
  • Posts: 73
Re: For library sync, must server be on when client starts?
« Reply #11 on: October 04, 2020, 07:59:32 pm »

Weird, the attached screenshot from my server says only S3 is available, but it also enumerates Standby/Hibernate/Hybrid Sleep/Fast Startup. I'm guessing those options are variations of S3?

So maybe the network adapter supports WOL from Standby but not Hibernate, or something...

Oh well, the Windows doc says you can specify certain power states, but not variations of a single power state:

"To restrict the system to a subset of Sx states, a user can provide MaxSleep and MinSleep fields in https://docs.microsoft.com/windows/win32/api/winnt/ns-winnt-system_power_policy (and also https://docs.microsoft.com/windows/win32/api/winnt/ns-winnt-administrator_power_policy)."

Seems like this was almost configurable for a second there...
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: For library sync, must server be on when client starts?
« Reply #12 on: October 04, 2020, 08:06:53 pm »

You should be able to set the sleep State used in the laptop BIOS. Set S3. It will use a little power, but with the lid closed and screen off, hard disks spun down, it won't use much.

My ten year old PC works with WOL fine, and it has the same states shown in your image.

Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

robland

  • Junior Woodchuck
  • **
  • Posts: 73
Re: For library sync, must server be on when client starts?
« Reply #13 on: October 04, 2020, 08:36:17 pm »

Okay, I think I might've figured this out.

The server has S3 with four options:

Standby
Hibernate
Hybrid Sleep (disabled by default on laptops)
Fast Startup (enabled but not really a sleep state)

Thanks to this excellent article, I figured out that Standby = Sleep:

https://www.howtogeek.com/102897/whats-the-difference-between-sleep-and-hibernate-in-windows/

So I think the issue is WOL works in Sleep but not Hibernate (at least on my device). At the bottom of that article is this section, "How to Prevent Your Computer from Automatically Sleeping or Hibernating". So in the attached screenshot, I changed the default value of "Hibernate after" from default 180 minutes to Never.

I'll let you know if this works.

Any PC concerns about allowing sleep but not hibernation?


Logged

robland

  • Junior Woodchuck
  • **
  • Posts: 73
Re: For library sync, must server be on when client starts?
« Reply #14 on: October 04, 2020, 08:39:26 pm »

So in the attached screenshot, I changed the default value of "Hibernate after" from default 180 minutes to 0.

Correction, I set "Hibernate after" to "Never" when plugged in, not 0.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: For library sync, must server be on when client starts?
« Reply #15 on: October 04, 2020, 08:53:06 pm »

Any PC concerns about allowing sleep but not hibernation?

No.

As long as you don't leave the laptop in Sleep without external power for day and days. If you are going away for an extended period and are going to turn off the power to your house, shutdown the laptop fully.

Correction, I set "Hibernate after" to "Never" when plugged in, not 0.

That is a good thing.  ;D
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner
Pages: [1]   Go Up