Jump to content


Photo

Backup plugin failing: network credentials?

SMB

Best Answer esseki , 21 May 2019 - 03:56 PM

Hi @softworkz,

 

Thanks a lot for your help and patience with my problem. I finally got it working.

Let me share the solution in case it can help others :

 

First of all, my NAS is a Synology. Then i confirm that when i mounted the network share in the Shield settings, i did use a username and password. 

 

I eventually had a look at the SMB server settings and i tried a few options until i got it working.

 

To do so you have to go into the Synology "Control Pannel -> File Services -> SMB / AFP NFS tab -> SMB section -> Advanced settings" and set 

  • Maximum SMB protocol : SMB3
  • Minimum SMB protocol : SMB1

As a result the SMB range should show : "SMB range SMB1,SMB2,SMB2 and Large MTU,SMB3".

The permissions are now properly inherited for the folder created by the Backup plugin.

 

That did the trick :)

Go to the full post


  • Please log in to reply
43 replies to this topic

#21 esseki OFFLINE  

esseki

    Advanced Member

  • Members
  • 37 posts
  • Local time: 11:55 AM

Posted 18 May 2019 - 03:28 PM

Hi @Luke,

 

unfortunately i am still having the same problem with "Backup" plugin when attempting to store backups on a network share. This is a pitty as doing backups on the same device is not very secure or helpful.

How could i help debugging ? For example today i tried to activated debug logging and run again the backup task but it seems that it does not give more info in the logs about the problem :

2019-05-18 21:10:26.608 Info HttpServer: HTTP Response 200 to 192.168.100.57. Time: 26ms. http://192.168.100.6:8096/emby/System/Endpoint
2019-05-18 21:10:28.109 Info HttpServer: WS http://192.168.100.6:8096/?DeviceID=8796752717296&api_key=e1ad2529bac64beb9e6165da476fc0c2. UserAgent: Python/3.7 aiohttp/3.5.4
2019-05-18 21:10:28.109 Debug HttpServer: Web socket connection allowed
2019-05-18 21:10:28.118 Debug SessionManager: Creating new WebSocketController
2019-05-18 21:10:28.156 Debug App: SessionInfoWebSocketListener Begin transmitting over websocket to [::ffff:192.168.100.50]:44880
2019-05-18 21:10:33.582 Info HttpServer: WS http://192.168.100.6:8096/embywebsocket?api_key=74d23a70a1a84462b88953720ae4d41e&deviceId=TW96aWxsYS81LjAgKE1hY2ludG9zaDsgSW50ZWwgTWFjIE9TIFggMTBfMTRfNCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzczLjAuMzY4My4xMDMgU2FmYXJpLzUzNy4zNnwxNTU3MDkwMDAxOTg2. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
2019-05-18 21:10:33.583 Debug HttpServer: Web socket connection allowed
2019-05-18 21:10:39.022 Debug App: ScheduledTasksWebSocketListener Begin transmitting over websocket to [::ffff:192.168.100.57]:58554
2019-05-18 21:10:39.025 Info HttpServer: HTTP GET http://192.168.100.6:8096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
2019-05-18 21:10:39.040 Debug XmlSerializer: Deserializing file /storage/emulated/0/Android/data/com.emby.embyserver/files/plugins/configurations/MBBackup.xml
2019-05-18 21:10:39.123 Info HttpServer: HTTP Response 200 to 192.168.100.57. Time: 99ms. http://192.168.100.6:8096/emby/ScheduledTasks?isHidden=false
2019-05-18 21:10:41.180 Info HttpServer: HTTP POST http://192.168.100.6:8096/emby/ScheduledTasks/Running/a1e4a7962c72ac5e491497598d1ee479. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
2019-05-18 21:10:41.185 Info TaskManager: Executing Configuration Backup
2019-05-18 21:10:41.186 Info HttpServer: HTTP Response 204 to 192.168.100.57. Time: 6ms. http://192.168.100.6:8096/emby/ScheduledTasks/Running/a1e4a7962c72ac5e491497598d1ee479
2019-05-18 21:10:41.191 Info HttpServer: HTTP GET http://192.168.100.6:8096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
2019-05-18 21:10:41.197 Info HttpServer: HTTP Response 200 to 192.168.100.57. Time: 6ms. http://192.168.100.6:8096/emby/ScheduledTasks?isHidden=false
2019-05-18 21:10:41.597 Info Server Configuration Backup: Backup of profile Default Started
2019-05-18 21:10:41.619 Error TaskManager: Error
	*** Error Report ***
	Version: 4.1.1.0
	Command line: /data/app/com.emby.embyserver-rJz1nALY1-A43ZvM8VMwqg==/base.apk
	Operating system: Unix 4.9.109.4
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: False
	Runtime: file:///mscorlib.dll
	Processor count: 4
	Program data path: /storage/emulated/0/Android/data/com.emby.embyserver/files
	Application directory: /data/user/0/com.emby.embyserver
	Mono: 5.14.0 (explicit/62031dcabf4)
	Android Version: 8.0.0-REL - SDK: 26 'O'
	Patch Level: 3507953_1441.7411 (2018-12-05)
	Fingerprint: NVIDIA/darcy/darcy:8.0.0/OPR6.170623.010/3507953_1441.7411:user/release-keys
	Model: SHIELD Android TV - NVIDIA/NVIDIA
	Hardware: darcy/darcy/darcy/unknown
	SupportedAbis: arm64-v8a, armeabi-v7a, armeabi
	System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path "/storage/DS_411/files/Tib/Matos/Nvidia Shiled/Emby/Backup/Emby Backup - 2019-05-18 09.10.41 - Auto/packageruntime.dat" is denied.
	  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001b7] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
	  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
	  at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
	  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
	  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
	  at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding) [0x00000] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool,System.Text.Encoding)
	  at System.IO.File.WriteAllText (System.String path, System.String contents, System.Text.Encoding encoding) [0x00000] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
	  at System.IO.File.WriteAllText (System.String path, System.String contents) [0x00007] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
	  at Emby.Server.Implementations.IO.ManagedFileSystem.WriteAllText (System.String path, System.String text) [0x0001c] in <fde33dc083004d96a63cf2129ad12dfb>:0 
	  at MBBackup.ServerEntryPoint+<ExecuteBackup>d__61.MoveNext () [0x001db] in <b48c1b9ae14d440baa732016b620ddb8>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at MBBackup.Entities.ScheduledBackupTask+<Execute>d__8.MoveNext () [0x00085] in <b48c1b9ae14d440baa732016b620ddb8>:0 
	--- End of stack trace from previous location where exception was thrown ---
	  at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker+<ExecuteInternal>d__68.MoveNext () [0x00188] in <fde33dc083004d96a63cf2129ad12dfb>:0 
	Source: mscorlib
	TargetSite: Void Throw()
	
2019-05-18 21:10:41.619 Info TaskManager: Configuration Backup Failed after 0 minute(s) and 0 seconds
2019-05-18 21:10:41.638 Debug XmlSerializer: Deserializing file /storage/emulated/0/Android/data/com.emby.embyserver/files/config/notifications.xml
2019-05-18 21:10:41.654 Info TaskManager: ExecuteQueuedTasks
2019-05-18 21:10:45.552 Info HttpServer: HTTP GET http://192.168.100.6:8096/emby/System/Logs. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
2019-05-18 21:10:45.552 Debug App: ScheduledTasksWebSocketListener stop transmitting over websocket to [::ffff:192.168.100.57]:58554
2019-05-18 21:10:45.552 Info HttpServer: HTTP GET http://192.168.100.6:8096/emby/System/Configuration. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
2019-05-18 21:10:45.556 Info HttpServer: HTTP Response 200 to 192.168.100.57. Time: 4ms. http://192.168.100.6:8096/emby/System/Configuration
2019-05-18 21:10:45.575 Info HttpServer: HTTP Response 200 to 192.168.100.57. Time: 23ms. http://192.168.100.6:8096/emby/System/Logs
2019-05-18 21:10:46.981 Info HttpServer: HTTP GET http://192.168.100.6:8096/emby/System/Logs/Log?name=embyserver.txt. UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36

Could it be that the Backup plugin is trying to write with anonymous privilege rather than the user i mounted the network share with in the Shield settings ?

 

System.UnauthorizedAccessException: System.UnauthorizedAccessException: Access to the path "/storage/DS_411/files/Tib/Matos/Nvidia Shiled/Emby/Backup/Emby Backup - 2019-05-18 09.10.41 - Auto/packageruntime.dat" is denied.
     at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001b7] in <d4a23bbd2f544c30a48c44dd622ce09f>:0

 

esseki
     



#22 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 1863 posts
  • Local time: 11:55 AM

Posted 18 May 2019 - 05:55 PM

The parameter that you quoted above in red doesn't say anything because we don't know the value of the 'anonymous' parameter (could be true or false).

 

But it could be related to that. How did you mount the network share on the Shield? With username/password or anonymously?

 

The second question is about why the newly created directory does not simply inherit the permissions of the parent folder when it is created. So what kind of share is it that you've mounted here? Maybe this can be configured in some way to use inherited permissions.



#23 harrv OFFLINE  

harrv

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:55 AM
  • LocationRocky Mountains

Posted 20 May 2019 - 01:29 AM

This is not Windows (1). This is not Linux (2). This is not even just plain Android (3). It is Nvidia Shield-Android having some additional restrictions about network share access.
So nothing from 1, 2 and 3 can be taken for granted here.
 
I'm not quite sure why you're assuming that I want to blame away the problem. It was just about possible causes. Wouldn't make a lot of sense anyway because the backup plugin is our own plugin.


Clearly! Also, you are reading WAY more into my reply than what I actually said. I didn’t say anything about blame and was not making assumptions about anything in that regard. I also thought I made it clear that I understood I was just supplying a data point about how the plugin behaves on Windows that I knew may or may not be helpful to your troubleshooting the problem on the Shield. I was simply replying to the comment you made about the possibility of it being a plugin issue that works on the local file system but not shares. Because you said, “I don’t know the backup plugin,” and because you didn’t say anything to indicate you knew that it works on shares on at least one other platform (Windows), I thought that comment had the possibility of being useful. Clearly you don’t think so, so my apologies.
  • softworkz likes this

#24 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 1863 posts
  • Local time: 11:55 AM

Posted 20 May 2019 - 01:40 AM

Nevermind. I guess I've seen too many "it's not our fault" support replies and I just don't want to appear like that.. 



#25 esseki OFFLINE  

esseki

    Advanced Member

  • Members
  • 37 posts
  • Local time: 11:55 AM

Posted 21 May 2019 - 03:56 PM   Best Answer

Hi @softworkz,

 

Thanks a lot for your help and patience with my problem. I finally got it working.

Let me share the solution in case it can help others :

 

First of all, my NAS is a Synology. Then i confirm that when i mounted the network share in the Shield settings, i did use a username and password. 

 

I eventually had a look at the SMB server settings and i tried a few options until i got it working.

 

To do so you have to go into the Synology "Control Pannel -> File Services -> SMB / AFP NFS tab -> SMB section -> Advanced settings" and set 

  • Maximum SMB protocol : SMB3
  • Minimum SMB protocol : SMB1

As a result the SMB range should show : "SMB range SMB1,SMB2,SMB2 and Large MTU,SMB3".

The permissions are now properly inherited for the folder created by the Backup plugin.

 

That did the trick :)


Edited by esseki, 21 May 2019 - 04:00 PM.

  • Happy2Play and softworkz like this

#26 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 140472 posts
  • Local time: 05:55 AM

Posted 21 May 2019 - 03:57 PM

Thanks for the feedback !



#27 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 1863 posts
  • Local time: 11:55 AM

Posted 21 May 2019 - 08:39 PM

Hi @softworkz,

 

Thanks a lot for your help and patience with my problem. I finally got it working.

Let me share the solution in case it can help others :

 

Thanks for reporting back. I'm glad I could help you solving this!

 

@Happy2Play - Maybe we should copy this solution over to some place where it can be found more easily? And mark it as answer..



#28 shackbill OFFLINE  

shackbill

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:55 AM

Posted 14 June 2019 - 07:07 PM

Hi @softworkz,

 

Thanks a lot for your help and patience with my problem. I finally got it working.

Let me share the solution in case it can help others :

 

First of all, my NAS is a Synology. Then i confirm that when i mounted the network share in the Shield settings, i did use a username and password. 

 

I eventually had a look at the SMB server settings and i tried a few options until i got it working.

 

To do so you have to go into the Synology "Control Pannel -> File Services -> SMB / AFP NFS tab -> SMB section -> Advanced settings" and set 

  • Maximum SMB protocol : SMB3
  • Minimum SMB protocol : SMB1

As a result the SMB range should show : "SMB range SMB1,SMB2,SMB2 and Large MTU,SMB3".

The permissions are now properly inherited for the folder created by the Backup plugin.

 

That did the trick :)

 

I'm having this problem as well. i adjusted the SMB section as you described.  Im 'pretty sure' i used a username/password when i mounted the share but i cant seem to find where that is to verify. I went into shield storage and found where the share is mounted and says connected but i dont see where the username/password wouldbe. Would i have had to Manually mount that?   i *DO* have a user account for network shares and i modified it to Read/Write but still same issue. Any assistance is appreciated.

 

bill



#29 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 1863 posts
  • Local time: 11:55 AM

Posted 14 June 2019 - 07:38 PM

To find out about username/password, I would remove the mounted storage from the Shield storage configuration and then try to re-add (mount).



#30 shackbill OFFLINE  

shackbill

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:55 AM

Posted 14 June 2019 - 09:37 PM

so i did that and selected REGISTERED USER and entered username and password. Share mounted fine. but still cant make backup. checked permissions are selected for that share READ/WRITE.  Other idea?

 

thanks.



#31 softworkz OFFLINE  

softworkz

    Advanced Member

  • Developers
  • 1863 posts
  • Local time: 11:55 AM

Posted 14 June 2019 - 10:03 PM

so i did that and selected REGISTERED USER and entered username and password. Share mounted fine. but still cant make backup. checked permissions are selected for that share READ/WRITE.  Other idea?.

 

I'd really wish that those things would work out-of-the-box. Unfortunately I can't help from personal experience as I don't have this device combination available.

The only thing I can suggest is going through this conversation from first-to-last and compare your results with those from the OP. That's what I would do. 

I apologize for not having a more convenient advice!



#32 shackbill OFFLINE  

shackbill

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:55 AM

Posted 15 June 2019 - 12:40 PM

thanks for your help i will keep trying some other things. Maybe someone else will have a suggestion.



#33 shackbill OFFLINE  

shackbill

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:55 AM

Posted 10 August 2019 - 12:10 AM

Just thought i would check back in to see if anyone had some new ideas on why i still cant get Backups to work with my Synology NAS. Ive done the following:

 

1. Ensured the share is connected using a registered user account and password

2. Ensured read/write access is enabled on the share

3. Configured the SMB settings as directed in above stated solution (  "SMB range SMB1,SMB2,SMB2 and Large MTU,SMB3".)

 

The error messages are below...

 

Access to the path "/storage/SYNOLLOGY/Media/Backups/Emby Backup - 2019-08-09 10.46.32 - Auto" is denied.
at System.IO.Directory.CreateDirectoriesInternal (System.String path) [0x0004b] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
at System.IO.Directory.CreateDirectory (System.String path) [0x00075] in <d4a23bbd2f544c30a48c44dd622ce09f>:0 
at Emby.Server.Implementations.IO.ManagedFileSystem.CreateDirectory (System.String path) [0x0001b] in <5837600bbe23491d837720283845e3f2>:0 
at MBBackup.ServerEntryPoint+<ExecuteBackup>d__61.MoveNext () [0x00199] in <b48c1b9ae14d440baa732016b620ddb8>:0 
--- End of stack trace from previous location where exception was thrown ---
at MBBackup.Entities.ScheduledBackupTask+<Execute>d__8.MoveNext () [0x00085] in <b48c1b9ae14d440baa732016b620ddb8>:0 
--- End of stack trace from previous location where exception was thrown ---
at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker+<ExecuteInternal>d__68.MoveNext () [0x00156] in <5837600bbe23491d837720283845e3f2>:0

 

 

5d4e434b378f1_BackupPath.png

 

5d4e435b2a402_SharePerms.png

 

5d4e436ac9ca0_SMB.png

 

As you can see i even allowed GUEST full access in hopes of getting this to work.  Any advice is deeply appreciated. Im reluctant to update to latest server version until i can get some kind of backup. thanks.


Edited by shackbill, 10 August 2019 - 12:11 AM.


#34 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 140472 posts
  • Local time: 05:55 AM

Posted 10 August 2019 - 12:30 AM

So you mounted that SMB path within the android OS?



#35 shackbill OFFLINE  

shackbill

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:55 AM

Posted 10 August 2019 - 12:37 AM

Well..its a SHIELD PRO server so i connected the share thru the user interface as a registered user and i used the account i use to access the media on my synology nas.

 

bill



#36 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 140472 posts
  • Local time: 05:55 AM

Posted 12 August 2019 - 02:20 PM

You mean you used the Shield interface to mount the share, right?



#37 shackbill OFFLINE  

shackbill

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:55 AM

Posted 12 August 2019 - 02:49 PM

Correct.

#38 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 140472 posts
  • Local time: 05:55 AM

Posted 13 August 2019 - 02:24 PM

And did you configure the network connection in the shield interface so that it would have write access?

 

You'll need to ensure that the network share is writeable. Once you do that, the write error that you're seeing in the server log will go away.



#39 shackbill OFFLINE  

shackbill

    Advanced Member

  • Members
  • 50 posts
  • Local time: 04:55 AM

Posted 15 August 2019 - 09:37 PM

message #33 in this thread has screen shots of everything ive done. Am i missing something? I guess i'm not sure how to configure the network connection in shield to have write access - ive never heard of giving a network interface write access... unless you are referring to the share - in which case, i refer you again to message #33 in this thread. thanks.



#40 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 140472 posts
  • Local time: 05:55 AM

Posted 15 August 2019 - 10:19 PM

Well you want the shield to write to a network share on another device, right? so it's that other device where you need to make sure write access is granted.

 

Are you able to use a file explorer on the shield to browse to that mounted path and create a new text file?







Also tagged with one or more of these keywords: SMB

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users