Recast Agent not Connecting

There are times when a Recast Agent attempts to connect to a Recast Management Server, but is unable. You'll see a warning in the Recast Management Server telling you that there is an Agent that is trying to connect, but it is not approved. This most often occurs if you delete the Agent from the Recast Management Server manually. Because the Agent information is deleted, there is no way to approve this Agent.

Error: A Recast Agent is trying to connect, but is not approved.

Resolution

Forcing the Agent to re-enroll gives you a way to approve an Agent, allowing it to connect again.

To re-enroll an Agent:

1. Log onto the computer where the Agent is not connecting.

2. Navigate to the agent.sqlite file location:

Version 5.X Recast Agent: C:\ProgramData\Recast Software\Recast Agent

Version 4.X Recast Agent: C:\Windows\System32\config\systemprofile\AppData\Roaming\Recast Software\Recast Agent

3. Delete the agent.sqlite file in that folder.

4. Restart the Recast Agent Service.Restarting the Recast Agent Service

The Agent Computer should appear on the Recast Agents page in the Remote Software Center and in the Recast Management Server interface. The Agent will be auto-approved or available to be approved depending on the settings in your Recast Management Server.Recast Agent is Back!

Builder Template

For v5 Recast Agent: Coming soon

For v4 Recast Agent: Re-EnrollAgent.xml

PowerShell Script

$agent4Sqlite = "$env:windir\System32\Config\Systemprofile\Appdata\Roaming\Recast Software\Recast Agent\agent.sqlite"
$agent5Sqlite ="$env:ProgramData\Recast Software\Recast Agent\RecastAgent.sqlite"
# Stops the Recast Agent Service and deletes 4.x and 5.x enrollment SQLites if they exist.

try {
    Write-Output "Attempting to stop the Recast Agent Service..."
    Stop-Service -DisplayName "Recast Agent Service" -ErrorAction Stop
    Write-Output 'The Recast Agent Service was stopped successfully!'
}  catch { 
    "Unable to stop Recast Agent Service due to: $($_.Exception.Message)"
}
If (test-path $agent4Sqlite)
{ 
try {
    Write-Output 'Found v4.x SQLite...'
    Remove-Item $agent4Sqlite -Force -ErrorAction Stop
    Write-Output '4.x SQLite successfully removed!' 
} catch {  
    "Unable to delete 4.x SQLite due to: $($_.Exception.Message)"  
} 
} 
else
{ 
    Write-Output 'No 4.x SQLite file was found.'
}
If (test-path $agent5Sqlite) { 
    try{
    Write-host 'Found v5.x SQLite...'
    Remove-Item $agent5Sqlite -Force -ErrorAction Stop
    Write-Output '5.x SQLite successfully removed!'
} catch {
    "Unable to delete 5.x SQLite due to: $($_.Exception.Message)"
}
} 
else
{ 
    Write-Output 'No 5.x SQLite file was found.'
} 
try{ 
    Write-Output 'Attempting to start Recast Agent Service...'
    Start-Service -DisplayName "Recast Agent Service" -ErrorAction Stop
    Write-Output 'Recast Agent service started successfully!'
} catch {
    "Unable to start Recast Agent Service due to: $($_.Exception.Message)"
 }


Copyright © 2023 Recast Software, LLC. All rights reserved.