Standalone backup agent for Microsoft Windows servers and workstations (formerly Veeam Endpoint Backup FREE)
Post Reply
SlothCroissant
Lurker
Posts: 1
Liked: never
Joined: Jun 23, 2019 3:27 pm
Full Name: Ryan Borstelmann

"Item is locked by running session"

Post by SlothCroissant »

Hi there,

I opened a support case for this but was unfortunately automatically closed due to high support volume (which is a disappointment in itself but not what I'm here for today).

I'm getting the following error when backing up to an SMB share via Veeam Agent for Windows:

Code: Select all

6/23/2019 8:57:03 AM :: Full backup file merge failed Error: Item [svr01-backup2019-06-10T003010.vib] is locked by running session svr01-backup [Agent Backup] 
This has been failing since June 10th. There are certainly no backups being performed to that VIB - I've rebooted the Veeam Agent service as well as rebooted the machine with no change.

There are docs for what to do if Veeam Backup & Replication has this issue, but not for the Windows Agent > SMB. Can someone point me in the right direction for how to resolve this, aside from nuking the backup history and starting fresh?

Thanks!
HannesK
Product Manager
Posts: 14844
Liked: 3086 times
Joined: Sep 01, 2014 11:46 am
Full Name: Hannes Kasparick
Location: Austria
Contact:

Re: "Item is locked by running session"

Post by HannesK »

Hello,
and welcome to the forums.

Usually I would say "ask support", but as you already mentioned, you use the free version which has only "best effort" support.

Did you already try to to run a new active full backup? If that does not work, then you could try to remove VAW and re-install it. Keep in mind that uninstall / install always requires a new full backup. You do not need to delete the old backups in any case.

Probably there is a better way to solve that, but that brings us back to point 1...

Best regards,
Hannes
mdxyz
Service Provider
Posts: 28
Liked: 2 times
Joined: Jan 05, 2018 3:19 am
Contact:

Re: "Item is locked by running session"

Post by mdxyz »

I realize this is an old thread, but I had this same issue on my home PC and found the fix. Thought I'd post it here for others as this thread is one of the top hits on google.
  1. Install SQL management studio
  2. Stop the VeeamEndpointBackupSvc service
  3. Open SQL management studio as SYSTEM and connect to (LocalDb)\VeeamEndPoint
  4. Run the following query on the Veeam db (back it up first if you wish):

    Code: Select all

    delete from [Backup.TrackedActions.Leases]
    delete from [Backup.TrackedActions.LockItems]
    delete from [Backup.TrackedActions.Locks]
  5. Start the VeeamEndpointBackupSvc
I did a more detailed write up here
mdxyz
Service Provider
Posts: 28
Liked: 2 times
Joined: Jan 05, 2018 3:19 am
Contact:

Re: "Item is locked by running session"

Post by mdxyz »

Since I can't edit my post, a much quicker option is to use sqlcmd. open cmd.exe as system and paste

Code: Select all

sqlcmd -S (LocalDb)\VeeamEndPoint -d "VeeamBackup" -Q "delete from [Backup.TrackedActions.Leases]"
sqlcmd -S (LocalDb)\VeeamEndPoint -d "VeeamBackup" -Q "delete from [Backup.TrackedActions.LockItems]"
sqlcmd -S (LocalDb)\VeeamEndPoint -d "VeeamBackup" -Q "delete from [Backup.TrackedActions.Locks]" 
Antoine F
Novice
Posts: 3
Liked: never
Joined: Nov 13, 2019 2:33 pm
Full Name: Antoine Forget
Contact:

Re: "Item is locked by running session"

Post by Antoine F »

I know this is a pretty old post but did any of you attempted stopping the session via the interface instead of applying the kb 1487(https://www.veeam.com/kb1487)? (right click stop in the running section).

Would like to know if three is a more recent resolution for this...
pstoric83
Enthusiast
Posts: 58
Liked: 1 time
Joined: Aug 25, 2015 7:08 pm
Full Name: Paul Storic
Contact:

Re: "Item is locked by running session"

Post by pstoric83 »

I'm having the same issue but can't seem to clear it with sqlcmd. My SQL skills are limited. What do I need to do to get this to work? I tried connecting with SMSS but had no idea what to use at the login screen.

"C:\WINDOWS\system32>sqlcmd -S (LocalDb)\VeeamEndPoint -d "VeeamBackup" -Q "delete from [Backup.TrackedActions.Leases]"
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : SQL Server Network Interfaces: .
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..

C:\WINDOWS\system32>"
pmckay
Novice
Posts: 5
Liked: never
Joined: Jul 30, 2015 12:18 am
Contact:

Re: "Item is locked by running session"

Post by pmckay »

I have the same issue...
log shows:
Initializing
Err: Item [Job xxx] is locked by running session Job xxx [Agent Backup]
Processing finished with errors at d/m/y

running the above sqlcmd gives me the same error as above: "Server is not found or not accessible"
pstoric83
Enthusiast
Posts: 58
Liked: 1 time
Joined: Aug 25, 2015 7:08 pm
Full Name: Paul Storic
Contact:

Re: "Item is locked by running session"

Post by pstoric83 »

Follow mdxyz's detailed write up at the end of his post. It worked for me, I just needed to empty the backups folder after and start a new full backup. Did it last night
pmckay
Novice
Posts: 5
Liked: never
Joined: Jul 30, 2015 12:18 am
Contact:

Re: "Item is locked by running session"

Post by pmckay »

Thanks pstoric83... I went back and re-read the instructions. I didn't notice you had to use psexec to get the right permissions to use sqlcmd.
I incorrectly thought running as administrator was enough.
Also, fyi, resetting the database is easy to do, even without sqlcmd. https://www.veeam.com/kb2335. Thanks again.
pstoric83
Enthusiast
Posts: 58
Liked: 1 time
Joined: Aug 25, 2015 7:08 pm
Full Name: Paul Storic
Contact:

Re: "Item is locked by running session"

Post by pstoric83 »

Yep I did thte exact same thing lol
meozturk
Lurker
Posts: 1
Liked: never
Joined: Apr 22, 2024 8:17 am
Full Name: Mertcan ÖZTÜRK
Contact:

Re: "Item is locked by running session"

Post by meozturk »

Look at the machine services where the error occurred. There will be 2 services. Restart veeam transport svc and veeamdeploymentSvc. The problem will be fixed. :)
Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests