question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Errors during NAS sleeptime on Network Mount

See original GitHub issue

What version of Music Assistant has the issue?

2022.6.4

The problem

running the shell_command to mount my Nas drive (testing that functionality) works just fine. But… my Nas is turned down to sleepmode each night for power savings.

I didnt realize that could inhibit the Music Assistant install using that Mount until now.

this morning I see below errors in the logs, which of course relate to that. To my surprise the actual files in the mount are still visible, via the Media/Local files browser, and, more surprisingly after reading that error in the log, to Music Assistant!

I would have expected Music Assistant, sensing the drive had disappeared, to update the DB and delete those files in a whim. It didnt.

Only posting it here as a FYI, and maybe for others to test this functionality.

There’s no use in automating some kind of re-mount in the morning, because this is a) a temporary configuration, and b) it wont prevent MA from wiping during the Sleep time.

Yet is is something to consider going forward, in designing the MA’s core support for NAS drives, and not delete the DB during sleep time

How to reproduce

mount a nas drive with the known shell command

auto sleep the Nas

Relevant log output

Schermafbeelding 2022-06-22 om 07 44 42
Logger: music_assistant
Source: /usr/local/lib/python3.9/site-packages/music_assistant/mass.py:244 
First occurred: 02:22:24 (2 occurrences) 
Last logged: 05:22:25

Job [Library sync for provider Filesystem] failed with error [Errno 112] Host is down: '/media/music/nas/mp3/Wagner'.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 155, in sync_library
    async for entry in scantree(self.config.path):
  File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 67, in scantree
    async for subitem in scantree(entry.path):
  File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 67, in scantree
    async for subitem in scantree(entry.path):
  File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 67, in scantree
    async for subitem in scantree(entry.path):
  File "/usr/local/lib/python3.9/site-packages/music_assistant/music_providers/filesystem.py", line 65, in scantree
    for entry in await loop.run_in_executor(None, os.scandir, path):
OSError: [Errno 112] Host is down: '/media/music/nas/mp3/Wagner'

Additional information

No response

What version of Home Assistant Core are your running

2022.7.0.dev20220621

What type of installation are you running?

Home Assistant OS

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Mariusthvdbcommented, Jun 29, 2022

Well not sure I like that approach . Sure I have the Wol service, but I don’t want to wake the Nas during those off hours.

I agee with Marcel this should be a integration feature and not rely on external mount commands.

if the source is offline, just wait until it’s back online again and continue. Don’t manipulate the Db if source is offline

1reaction
Mariusthvdbcommented, Jun 28, 2022

@erkr Eric, please re-open this is not resolved

Read more comments on GitHub >

github_iconTop Results From Across the Web

Access to NAS mount during Power Nap wake up - Ask Different
However, the problem occurs during sleep when Time Machine tries to backup during Power Nap. Once it wakes from sleep it displays the...
Read more >
Reconnecting to Synology NAS After "sleep" seems impossible
I have a Synology NAS with an iMac and Macbook Pro. I mount with SMB routinely, but AFP is also enabled on the...
Read more >
Mapped network drive may fail to reconnect in Windows 10 ...
An article provides a workaround to resolve mapped network drives not working in Windows 10, version 1809.
Read more >
After standby over night no connection to NAS - Ask Fedora
But when I move my computer to Standby over night, the NAS is not availiable at the next morning. The error message shows...
Read more >
"Device name already in use" when trying to access NAS still ...
Whenever I try to access a network share mapped to a drive letter, e.g. "V:" in this example I get a "The local...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found