The support forum

WNetAddConnection2() failed with 1312

Obi-Wan-YJ :

Dec 18, 2016

For nearly a year, I've been using Bvckup2 to backup my Windows 7 laptop to a SAMBA-shared filesystem that resides on my Linux (Ubuntu 16.10) server on the same LAN.  A month or so ago, the backup stopped working.  I'm currently running release 76.13.

When I  open the Bvckup2 user interface and run the backup manually, it runs through "Checking destination location" and "Logging in," then fails with "WNetAddConnection2() failed with 1312".  It sends me an email alert stating "Destination requires a logon."

I've read other forum posts, and I've already configured conf.dst_net_login to be 2, and rebooted many times.

For a while, it looked like the problem was that my Win7 box was trying to connect to a WebDAV service on the linux box, which isn't set up.  I finally disabled WebClient on the Win7 box, but the Bvckup2 problem persists unchanged.

The Windows file manager  has no problem navigating to the shared folder (\\tatooine\NabooBackup) and creating files there, so it doesn't appear to be a permission problem.

What do I need to be looking at now?

Obi-Wan-YJ :

Dec 18, 2016

I should add that it is a password-protected share, and the password listed in the Bvckup2 config is required & works when mounting that path through the Windows file explorer.

Obi-Wan-YJ :

Dec 18, 2016

Just updated.  Same problem with release 76.14.

Alex Pankratov :

Dec 18, 2016

"conf.dst_net_login" has been exposed in the UI since R75, let me know what exactly you see there?  https://bvckup2.com/wip/05042016-2

For your setup a combination of (Logon: always), (Override: forcibly) should work, at least in theory.

Secondly, have a look in %LocalAppData%\Bvckup2\bvckup2.log and search for "voodoo". This has to do with a part of the app that monitors the accessibility of network locations. When the app's running elevated ("as admin") and the "voodoo" is enabled, it will try and check if there's an existing share session in user's un-priviliged session. If there is one, it will try establishing connection to that share using just the username and with no password. In theory this shouldn't work, in practice it does - hence the "voodoo" name. There were some changes to how and when this trick done in recent versions, but it shouldn't really matter in your case...

All in all, no idea what's wrong. It should work.

Obi-Wan-YJ :

Dec 18, 2016

conf.dst_net_login is 2.  Logon: always and Override: forcibly are already set.  "voodoo" does not occur in the bvckup2.log file.  I've included today's portion of that file below.  I'm just confused about why this was working just fine, then stopped all by itself.

2016.12.18 10:22:48.987 (UTC-6) 2

New run

2016.12.18 10:22:49.175 (UTC-6) 3   exe_file: C:\Program Files\Bvckup 2\bvckup2.exe, 882848 bytes
2016.12.18 10:22:49.237 (UTC-6) 3   exe_hash: 332d0d8f69f8c1826f38bc76883f91f1
2016.12.18 10:22:49.393 (UTC-6) 3   version:  1.76.14.0
2016.12.18 10:22:49.518 (UTC-6) 3   etc_path: C:\Users\bvh\AppData\Local\Bvckup2\
2016.12.18 10:22:49.658 (UTC-6) 3   lic_file: C:\Users\bvh\AppData\Local\Bvckup2\engine\bvckup2.lic
2016.12.18 10:22:49.736 (UTC-6) 3   windows:  7 / Windows 7 / 2 6.1.7601 (Service Pack 1) 1.0 00000100/1
2016.12.18 10:22:49.736 (UTC-6) 3   uptime:   46478 sec, GTC 46482
2016.12.18 10:22:49.736 (UTC-6) 3   ticker:   122274900525 @ 2630800 Hz
2016.12.18 10:22:49.736 (UTC-6) 3   process:  1 / 0 / 0  (x64/wow64/service)
2016.12.18 10:22:49.736 (UTC-6) 3   account:  admin 1, elevation 3
2016.12.18 10:22:49.736 (UTC-6) 3   args:     -c C:\Users\bvh\AppData\Local\Bvckup2\
2016.12.18 10:22:49.736 (UTC-6) 3   whoops'd: -
2016.12.18 10:22:49.736 (UTC-6) 3   exe_id:   0000000030e1c7fd001200000006181b
2016.12.18 10:22:49.736 (UTC-6) 3   etc_id:   0000000030e1c7fd00100000000611e7
2016.12.18 10:22:49.736 (UTC-6) 3   svc_id:   00000000000000000000000000000000
2016.12.18 10:22:49.736 (UTC-6) 3   registry: EnableLinkedConnections = 1
2016.12.18 10:22:49.736 (UTC-6) 3 Loading C:\Users\bvh\AppData\Local\Bvckup2\bvckup2.ini...
2016.12.18 10:22:49.736 (UTC-6) 2 Loading settings from C:\Users\bvh\AppData\Local\Bvckup2\bvckup2.ini...
2016.12.18 10:22:49.736 (UTC-6) 2   Loaded - size 224, checksum 00002931
2016.12.18 10:22:49.752 (UTC-6) 2 Loading settings from C:\Users\bvh\AppData\Local\Bvckup2\bvckup2.ini.copy...
2016.12.18 10:22:49.752 (UTC-6) 2   Loaded - size 224, checksum 00002931
2016.12.18 10:22:49.767 (UTC-6) 3 Elevation context - as_admin 1, is_admin 1, elevation 3, elevating 0
2016.12.18 10:22:49.767 (UTC-6) 3 Service "bvckup2" exists. Will try to attach to it next...
2016.12.18 10:22:49.767 (UTC-6) 3 Grabbing Global\Bvckup2.etc-0000000030e1c7fd00100000000611e7.Running mutex, timeout = 0 seconds...
2016.12.18 10:22:49.767 (UTC-6) 3 Got the mutex
2016.12.18 10:22:49.767 (UTC-6) 3 Starting in a service UI mode...
2016.12.18 10:22:49.767 (UTC-6) 2 Starting in a threaded mode...
2016.12.18 10:22:49.783 (UTC-6) 3 B8:70 ui | Initializing UI context...
2016.12.18 10:22:49.830 (UTC-6) 3 B8:70 ui | Loading C:\Users\bvh\AppData\Local\Bvckup2\ui\bvckup2-ui.ini...
2016.12.18 10:22:49.830 (UTC-6) 2 B8:70 ui | Loading settings from C:\Users\bvh\AppData\Local\Bvckup2\ui\bvckup2-ui.ini...
2016.12.18 10:22:49.928 (UTC-6) 2 B8:70 ui |   Loaded - size 1077, checksum 0000dd15
2016.12.18 10:22:50.005 (UTC-6) 2 B8:70 ui | Loading settings from C:\Users\bvh\AppData\Local\Bvckup2\ui\bvckup2-ui.ini.copy...
2016.12.18 10:22:50.118 (UTC-6) 2 B8:70 ui |   Loaded - size 1077, checksum 0000dd15
2016.12.18 10:22:50.170 (UTC-6) 2 B8:70 ui | Loaded UI configuration from C:\Users\bvh\AppData\Local\Bvckup2\ui\bvckup2-ui.ini
2016.12.18 10:22:50.177 (UTC-6) 2 Launching the UI thread...
2016.12.18 10:22:50.185 (UTC-6) 2 Up and running
2016.12.18 10:22:50.252 (UTC-6) 2 B8:FC ui | Initializing...
2016.12.18 10:22:50.253 (UTC-6) 3 B8:FC ui | Creating event Local\Bvckup2.etc-0000000030e1c7fd00100000000611e7.Ui.BringUp...
2016.12.18 10:22:50.253 (UTC-6) 3 B8:FC ui | Initialized
2016.12.18 10:22:50.253 (UTC-6) 2 B8:FC ui | Starting up...
2016.12.18 10:22:50.255 (UTC-6) 3 B8:FC ui | Connecting to the service...
2016.12.18 10:22:50.265 (UTC-6) 2 B8:FC ui | Connecting to Global\Bvckup2.etc-00000000000000000000000000000000.Ipc...
2016.12.18 10:22:50.272 (UTC-6) 3 B8:FC ui | Sending 'hello'...
2016.12.18 10:22:50.369 (UTC-6) 2 B8:FC ui | Connected
2016.12.18 10:22:50.391 (UTC-6) 3 B8:FC ui | Creating event Global\Bvckup2.etc-00000000000000000000000000000000.Ui.Shutdown...
2016.12.18 10:22:50.392 (UTC-6) 3 B8:FC ui | Connected
2016.12.18 10:22:50.562 (UTC-6) 2 B8:FC ui | Auto-start looks OK, set to 'Yes'
2016.12.18 10:22:50.627 (UTC-6) 3 B8:FC ui | Waiting for the sync to complete...
2016.12.18 10:22:50.737 (UTC-6) 3 B8:FC ui | Creating at-logon "Bvckup 2" task, priority 9...
2016.12.18 10:22:50.993 (UTC-6) 2 B8:FC ui | Loading settings from C:\Users\bvh\AppData\Local\Bvckup2\ui\backup-0001\settings.ini...
2016.12.18 10:22:51.048 (UTC-6) 2 B8:FC ui |   Not found
2016.12.18 10:22:51.058 (UTC-6) 3 B8:FC ui | Opening log for job 1 ...
2016.12.18 10:22:51.058 (UTC-6) 3 B8:FC ui |   2 handles
2016.12.18 10:22:51.058 (UTC-6) 3 B8:FC ui |   C:\ProgramData\Bvckup2\engine\backup-0001\backup.log
2016.12.18 10:22:51.058 (UTC-6) 3 B8:FC ui |   1 <- [backup.0.tdb]
2016.12.18 10:22:51.058 (UTC-6) 3 B8:FC ui |   0 <- [backup.tdb]
2016.12.18 10:22:51.308 (UTC-6) 3 B8:FC ui | Starting regular event poller...
2016.12.18 10:22:51.308 (UTC-6) 3 B8:FC ui | Entering the UI code...
2016.12.18 10:22:51.425 (UTC-6) 0 B8:FC ui | Systray icon added

Obi-Wan-YJ :

Dec 18, 2016

And here's the paragraph from the specific backup's log file generated by a manual run last night:

2016.12.17 20:21:49.909 (UTC-6) 2 0 Running the backup ...
2016.12.17 20:21:49.909 (UTC-6) 2 1     Preparing ...
2016.12.17 20:21:49.909 (UTC-6) 3 2         Run number: 347
2016.12.17 20:21:49.909 (UTC-6) 3 3             App: 76.14
2016.12.17 20:21:49.909 (UTC-6) 3 2         Source: C:\
2016.12.17 20:21:49.909 (UTC-6) 3 2         Destination: \\tatooine\NabooBackup\Bvckup2\
2016.12.17 20:21:49.909 (UTC-6) 3 2         Copying: contents, timestamps (created, modified, accessed), attributes
2016.12.17 20:21:49.909 (UTC-6) 3 3             Using delta copier
2016.12.17 20:21:49.909 (UTC-6) 2 2         Running external pre-backup command ...
2016.12.17 20:21:49.924 (UTC-6) 3 3             Command: C:\Users\bvh\Backups\registry_backup.bat
2016.12.17 20:21:49.924 (UTC-6) 3 4                 Type: shell command
2016.12.17 20:21:49.924 (UTC-6) 3 4                 Critical: no
2016.12.17 20:21:49.924 (UTC-6) 3 4                 Timeout: 1 hour
2016.12.17 20:22:01.886 (UTC-6) 3 3             Completed
2016.12.17 20:22:01.886 (UTC-6) 3 4                 Exit code: 0
2016.12.17 20:22:01.886 (UTC-6) 2 2         Verifying configuration ...
2016.12.17 20:22:01.886 (UTC-6) 3 3             Normalized src path: \\?\C:\
2016.12.17 20:22:01.886 (UTC-6) 3 3             Normalized dst path: \\?\UNC\tatooine\NabooBackup\Bvckup2\
2016.12.17 20:22:01.886 (UTC-6) 2 2         Checking source location ...
2016.12.17 20:22:01.886 (UTC-6) 3 3             OK
2016.12.17 20:22:01.886 (UTC-6) 2 2         Checking destination location ...
2016.12.17 20:22:01.886 (UTC-6) 3 3             Logging in...
2016.12.17 20:22:01.902 (UTC-6) 0 4                 WNetAddConnection2() failed with 1312
2016.12.17 20:22:01.902 (UTC-6) 3 5                     Context: \\tatooine\NabooBackup
2016.12.17 20:22:01.902 (UTC-6) 2 2         Sending email alert...
2016.12.17 20:22:02.042 (UTC-6) 3 3             OK
2016.12.17 20:22:02.042 (UTC-6) 2 1     Completed in 12 sec with 1 error

Alex Pankratov :

Dec 18, 2016

You are running in a service mode. I will need a snippet from %ProgramData%\Bvckup2\bvckup2.log then. Better yet, please email me the whole thing at support@pipemetrics.com

Alex Pankratov :

Dec 18, 2016

Btw, one thing to try is switching the app to the desktop mode and then back to the service mode. This will reinstall the service to run under a dedicated user account.

Conversely, if you tried this, this might've actually been something that broke you setup, in which case click on More in the Mode Switch window (when switching to desktop mode) and set the service to run under LocalSystem account - https://bvckup2.com/wip/03112016

Obi-Wan-YJ :

Dec 19, 2016

When I switched to desktop mode and ran a manual backup, it died with this error:

Logging in...
Error: specified location has an active connection under a different user name
WNetCancelConnection2() failed with 2250
Error: specified location has an active connection under a different user name

I don't know what other connection there might be.  The file browser doesn't show any connections to that share, although there are connections to different shares on that machine.

However, after switching back to service mode again and forcing another backup run, it seems to be working.  I'll keep an eye on it for a few days and see how it behaves.  It's *supposed* to run a backup once each morning.

Thanks so much for your help.

guybor :

Aug 04, 2020

Just want to add to this post for anyone looking in the future.  I too was getting this error.  I was able to get to the shared drive (on my Synology NAS) by browsing in bvckup2 and also in windows explorer.  But when trying to run the backup it was failing.  

I switched to desktop mode and it ran fine.  Switched back to service mode, and it now ran fine.  So switching to desktop and back cleared some strange issues.

Another FYI note....this started failing after a windows update on the computer last night.

New topic

Create
Made by IO Bureau in Switzerland
Support

Updates
Blog / RSS
Follow Twitter
Reddit
Miscellanea Press kit
Testimonials
Company Imprint

Legal Terms
Privacy