Error "A specified logon session does not exist...

Error "A specified logon session does not exist. It may already have been terminated" when accessing a Windows network share (SMB)

Some SMB servers don't seem to accept multiple SMB login sessions, if they use the same SMB credentials from the same host from different Windows user accounts.

On Windows, each user session has its own set of network login sessions. Magnus Box performs the backup using a service user account. Therefore, this issue could occur with an affected SMB server if the interactive Windows user was logged in to the network share simultaneously.

Magnus Box has also been known to be strict regarding formatting of UNC paths and credentials. The IP address of the network share should be used over the hostname. Double forward slashes ("//") should precede any mention of the network share IP address in inclusion paths. Inclusion paths on a share should end in the appropriate file separator ("\" on Windows, "/" on Mac or Linux). The IP address may also be needed in the username field. Below is an example of the ideal configuration for backing up a network share.

Screenshot of ideal NAS setup

Known affected SMB servers 

If you are experiencing this issue, please contact support so that we can document any affected OSes and versions.

This issue is known to affect some Synology NAS devices.

  • Workaround: Enable SMB3 in Synology DSM web interface (requires Windows 8 or later client OS)

Verifying the issue 

The "Run as Administrator" session also has its own separate network login sessions.

  • Are you able to browse the network share from both an elevated and unelevated application? (e.g. "File > Open" from notepad and from a notepad launched with "Run as Administrator")

The interactive user account may have an open network session to the affected device.

  • From a command prompt, can you run net use to see if the interactive user is logged in to the network share?
  • From a command prompt, if you run net use \\server_name\share_name /DELETE to log the interactive user out of the network share, does this allow the backup to proceed?
    • Note that this may cause the same error to affect the interactive user. You may have to run this same command as an After command in the backup job, to log the background service account out of the network share, so that the interactive user can log back in.

Workarounds 

If you are backing up from the SMB server, you could work around this issue by

  • installing Magnus Box directly on the network device (e.g. for Synology, enabling SSH access and install the command-line Linux version), to back up the files directly. This may have significantly better performance, as less data needs to travel across the LAN and the disk access latency is significantly improved.

Alternatively, by

  • logging the interactive user account out of Windows entirely before the job starts. This will close their network sessions. Magnus Box will successfully log in to the network share; you should add net use /DELETE as an After command in Magnus Box to ensure the service user logs out again after the backup

Alternatively, by

  • logging the interactive user account out of the network share before the job starts, and logging them back in afterward. You may be able to use Windows Task Scheduler for this with the "Run only when user is logged on" option to ensure that the commands run inside the correct logon session:
    • net use /DELETE in Task Scheduler before the backup window, to log the interactive user out
    • Enter network credentials in Magnus Box, so the service user logs in
    • net use /DELETE as an After command in Magnus Box, so the service user logs out
    • net use in Task Scheduler after the backup window, to log the interactive user back in again

If you are backing up to the SMB server, you could work around this issue by

  • enabling the SFTP system, or the Minio S3-compatible app, and configuring your Storage Vault to use that instead. These protocols support explicitly entering credentials, that should avoid this issue.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us