A couple of more points to add, this fix applies to a broad family of NAS devices based around HipServ OS, and includes the following:
On point 11, in the post above, the failure to finish indexing (which other users have reported), seems to be caused by the SMB client (i.e. Sonos) running out of SMB ‘credits’. Once the credits reach zero, the connection is closed and hence why indexing stops - this is most likely a bug. However, if you re-add the SMB share, indexing picks up where it left off. So if you rinse and repeat a few times, eventually it works and you will have your music library back.
Ian
On point 11, in the post above, the failure to finish indexing (which other users have reported), seems to be caused by the SMB client (i.e. Sonos) running out of SMB ‘credits’. Once the credits reach zero, the connection is closed and hence why indexing stops - this is most likely a bug. However, if you re-add the SMB share, indexing picks up where it left off. So if you rinse and repeat a few times, eventually it works and you will have your music library back.
Ian
I suffer from the indexing issue with my SMBv2 NAS drive. Many times it fails quite quickly, claiming the drive is no longer available, and then randomly deciding to work. Recently I have been able to index all my music after multiple attempts. It would be great if this defect with SMB credits could be resolved.
On point 11, in the post above, the failure to finish indexing (which other users have reported), seems to be caused by the SMB client (i.e. Sonos) running out of SMB ‘credits’. Once the credits reach zero, the connection is closed and hence why indexing stops - this is most likely a bug. However, if you re-add the SMB share, indexing picks up where it left off. So if you rinse and repeat a few times, eventually it works and you will have your music library back.
Ian
I suffer from the indexing issue with my SMBv2 NAS drive. Many times it fails quite quickly, claiming the drive is no longer available, and then randomly deciding to work. Recently I have been able to index all my music after multiple attempts. It would be great if this defect with SMB credits could be resolved.
Exactly, this is the message in the smb.log
file that led me to that conclusion:
“smb2_validate_message_id: client used more credits than granted, mid 132097, credits_granted 0, seqnum low/range: 132097/0
”
According to the Samba documentation this should never happen, but lo and behold there it is. I did try to increase (x 2) the credits in the smb.conf
file, but it had no effect, indicating a subtle bug somewhere.
And this is only an issue with indexing, it doesn’t affect playback. FYI
Agreed. Once the index is done, all is well. Problem is that I keep picking up cheap CDs on eBay and having to add them
This is a lie. It has nothing to do with SMB.
This is a lie. It has nothing to do with SMB.
It has everything to do with SMB, as SMB is the connection protocol between Sonos and the NAS (or music library) for both indexing and playback. Clearly in some cases, when indexing, there is a bug (evidenced in the smb.log file), about the SMB client (which is of course Sonos) running out of SMB credits. As I said elsewhere according to the SAMBA documentation, this should never happen, but clearly it does for some users.
I’ve also noticed that SMB credits error in the Samba log. I have quite an old WD My Book Live NAS server, but it does support SMBv2.
What I’ve noticed though is that whenever the index fails with the ‘NAS drive no longer available’ popup, it’s always accompanied by the SMB credits error, but conversely on some occasions, when the SMB credits error appears, it doesn’t always seem to result in the index process terminating.
I wonder if this error is occurring at some transient point in the process, which more often than not results in failure, but on some occasions it somehow recovers without proving fatal.
I often find if I switch network ports on my Windows PC that initiates the index (eg switch from the hardwire ethernet to WiFi), and rerun, then the index will complete. After a few more re-runs though the same error occurs, I switch ports again, back to ethernet, and lo and behold it works, for a while etc etc,
It all seems very hit and miss and I wonder if variables like which Sonos speaker is selected for the index rebuild have a bearing on whether it’s more likely to succeed before the index is replicated around other speakers/amps.
For info, this is the SMB credits error in the Samba log:
a2024/10/03 10:55:22.442893, 0] smbd/smb2_server.c:328(smb2_validate_message_id)
smb2_validate_message_id: client used more credits than granted message_id (66562)
I have incidentally tried increasing the max credits parameter in the Samba config, but it doesn’t seem to have affected the success rate and as I said, even when the credit error occurs, the indexing doesn’t necessarily always seem to terminate. It’s just the opposite is true, when it does terminate, the credit error is always thrown.
@SteveWelham Your experience chimes almost precisely with mine. In actual fact, I only recently decommissioned an old MYBOOKLIVE where I had kept my MP3s. And when I say decommissioned I mean largely smash apart to get to the hard drive which I’ve kept for no particular reason.
Unfortunately this has been a problem for years. For a good while I fixed my router’s SAMBA server to SMBv1 and used a USB drive plugged into one of my mesh nodes. Never any issues. Then Sonos ended SMBv1 support for S2 systems. Now I see intermittent issues because I have to set SAMBA to SMBv1+SMBv2.
Sometimes the index completes. Then I can use my system fine. But then if I want to add an album, the index might fail. I never have problems playing anything that has successfully indexed.
i fear there will never be a permanent fix because it only affects some configurations (certain router brands and/or NAS drives). I am still mulling a Pi5 solution using OpenMediaVault but have not got round to it yet. And Sonos’ focus is on streaming, not local libraries.
Unfortunately this has been a problem for years. For a good while I fixed my router’s SAMBA server to SMBv1 and used a USB drive plugged into one of my mesh nodes. Never any issues. Then Sonos ended SMBv1 support for S2 systems. Now I see intermittent issues because I have to set SAMBA to SMBv1+SMBv2.
Sometimes the index completes. Then I can use my system fine. But then if I want to add an album, the index might fail. I never have problems playing anything that has successfully indexed.
i fear there will never be a permanent fix because it only affects some configurations (certain router brands and/or NAS drives). I am still mulling a Pi5 solution using OpenMediaVault but have not got round to it yet. And Sonos’ focus is on streaming, not local libraries.
I don’t understand why the dropped support for SMB1, it should be SMB2/3 by default, sure, but give the user (paying customer) the choice, of SMB1 if that’s all their NAS supports.
As an FYI, I upgraded my NAS to SMB2 (as described above), and disabled SMB1, as it is no longer needed. So the error happens when only SMB2 is running too. Checking the SAMBA documentation states that the ‘credits’ issue should not happen. So it’s clearly a bug in the Sonos SMB2 client.
I’ve also noticed that SMB credits error in the Samba log. I have quite an old WD My Book Live NAS server, but it does support SMBv2.
What I’ve noticed though is that whenever the index fails with the ‘NAS drive no longer available’ popup, it’s always accompanied by the SMB credits error, but conversely on some occasions, when the SMB credits error appears, it doesn’t always seem to result in the index process terminating.
For info, this is the SMB credits error in the Samba log:
<2024/10/03 10:55:22.442893, 0] smbd/smb2_server.c:328(smb2_validate_message_id)
smb2_validate_message_id: client used more credits than granted message_id (66562)
I have incidentally tried increasing the max credits parameter in the Samba config, but it doesn’t seem to have affected the success rate and as I said, even when the credit error occurs, the indexing doesn’t necessarily always seem to terminate. It’s just the opposite is true, when it does terminate, the credit error is always thrown.
Same issue as I reported above.
@Keith N @Corry P Can this be reported as a bug on the Trello board?
Hi @Ianp
You’ve tagged the wrong Keith. It’s @Keith N
I’m hesitant to say this, but since the 80.09.09 update on 16th Oct, my Music Library re-index seems to work ok when I initiate it from the PC Controller App.
The release notes for the 80.10.06 (Android) software mention Music library indexing and reliability improvements, but no mention under IOS or PC. It seems though improvements have also been made for the PC platform, or perhaps changes to the speaker firmware itself has resolved the issue.
I’m hesitant to say this, but since the 80.09.09 update on 16th Oct, my Music Library re-index seems to work ok when I initiate it from the PC Controller App.
The release notes for the 80.10.06 (Android) software mention Music library indexing and reliability improvements, but no mention under IOS or PC. It seems though improvements have also been made for the PC platform, or perhaps changes to the speaker firmware itself has resolved the issue.
Yes, same for me.
It would be great if someone from Sonos could advise whether the new firmware made changes to indexing of Samba shares and fixed any issues with limits or special characters or anything else.
Would be much appreciated
Hi @DGR1
A few different issues were addressed. Among them were:
- Paths to Music Library being removed if SMBv1 is detected
- Buffalo Linkstation NAS indexing fixed
- Music Library stops indexing suddenly (I’m not sure what changes were made for this - it may have addressed special characters)
- Unable to add share on router-connected USB drives
More fixes for Music Library are still to come.
I hope this helps.
Hi @DGR1
A few different issues were addressed. Among them were:
- Paths to Music Library being removed if SMBv1 is detected
- Buffalo Linkstation NAS indexing fixed
- Music Library stops indexing suddenly (I’m not sure what changes were made for this - it may have addressed special characters)
- Unable to add share on router-connected USB drives
More fixes for Music Library are still to come.
I hope this helps.
Wow. That’s fantastic news @Corry P. I have reindexed a few times since the new firmware was released and seen no errors; part of my push to clean up my music library tagging, reduce the number of genres I use, standardise album art etc etc. My share is currently on a router-connected USB drive as it means I don’t have to run another device 24x7.
Thanks again for the feedback, and I will of course report any errors I do experience.