Clone agent offline

We have a clone agent that shows online in dashboard but offline when you try to use it as a source fro creating images.
The service account that clone is running as has admin privileges on the server. 
Tagged:

Answers

  • ShawnTaylorShawnTaylor Posts: 5 New member
    Has anyone else seen this behaviour?
  • owen.hallowen.hall Posts: 57 Silver 4
    edited April 20, 2018 1:33PM
    That's unusual. Could I ask you to use Clone's PowerShell cmdlets to help diagnose this? (The module can be downloaded from the UI's settings page.) The Get-SqlCloneMachine cmdlet should return information on your agents, including their state. Ordinarily the web UI would be a perfectly good source of information for this, but it seems as though in this case it's disagreeing with itself.
    Software Engineer
    Redgate Software
  • ShawnTaylorShawnTaylor Posts: 5 New member
    edited April 20, 2018 1:42PM
    Absolutely!

    PS C:\temp> get-sqlclonemachine -name vwrintsql02

  • Looks like the agent is online and happy from that - just the web UI doesn't agree. I'll have to identify some diagnostic steps to help us figure out why. In the meantime, to confirm that the agent is functioning normally, could you try creating a clone or image using that agent's SQL Server instance(s)?
    Software Engineer
    Redgate Software
  • ShawnTaylorShawnTaylor Posts: 5 New member
    edited April 20, 2018 2:04PM
    Unfortunately no, that is what fails. When you try to use the node it shows as agent disconnected in the server drop down.


  • owen.hallowen.hall Posts: 57 Silver 4
    edited April 23, 2018 10:05AM
    Ah, of course. I assume the same thing persists when opening Clone in an incognito browser window? The UI retains a small state cache (which is cleared out in an incognito window or via a ctrl-F5 hard refresh), and I'm keen to rule out some odd transient error.

    In the meantime, it might be worth trying to do the same thing you're trying to do on the UI, but through PowerShell instead (e.g. with New-SqlCloneImage). This would rule out a functional issue on the agent, and should unblock you while the UI issue is tracked down.
    Software Engineer
    Redgate Software
  • ShawnTaylorShawnTaylor Posts: 5 New member
    Owen,

    Thanks for the response. When I use powershell I get this error:
    Get-SqlCloneSqlServerInstance : Sequence contains no matching element at line:1 char:21

    Thanks,

    Shawn

  • For general reference, we took this to support@red-gate.com and determined that, after deleting an old agent and installing a fresh one on a machine with the same machine name and SQL Server instance names (i.e. a VM refresh), the associated SQL Server instances weren't getting hooked up to the new agent.

    We'll be looking to improve Clone's behaviour here, but as a workaround, destroyed agents can be cleaned up with the Remove-SqlCloneMachine cmdlet, which should make all this behave more sensibly for now. If that's done after the agent is destroyed, but before the new one is installed, this issue shouldn't arise.
    Software Engineer
    Redgate Software
  • robertenglehornrobertenglehorn Posts: 5 New member
    edited August 5, 2020 4:39PM
    I am able to get machine information using Get-SqlCloneMachine yet Get-SqlCloneImageLocation -MachineName $machine.MachineName is throwing the error: Get-SqlCloneSqlServerInstance : Sequence contains no matching element.  I've stopped and re-installed the agent on $machine, along with following your instructions to Remove-SqlCloneMachine.  Does Get-SqlCloneSqlServerInstance use a different port to communicate?  Any suggestions on what to try next?
  • owen.hallowen.hall Posts: 57 Silver 4
    edited August 12, 2020 8:16AM
    Hi Robert,
    We fixed an issue that sounds similar to what you're experiencing in Clone 4.4.33. Could you try updating the Clone server to that version (or newer), downloading and installing its PowerShell cmdlets from Settings, and retrying?
    Regarding your question, Clone server uses two ports - 14145 for communication with clients (that is, PowerShell cmdlets, and the web UI - it can also be configured to use a different port, and HTTPS) and 14146 for communication with agents. It won't vary by which cmdlet is called. Clients will always talk to the client port, and agents will always talk to the agent port, and they won't need to do otherwise.
    Software Engineer
    Redgate Software
  • This does not seem to have fixed the problem.  Using these 2 lines of code:
    $machine = Get-SqlCloneMachine -Name $sqlserver
    $sqlServerInstance = Get-SqlCloneSqlServerInstance -MachineName $machine.MachineName -InstanceName $sqlinstance

    $machine validates successfully.
    $sqlinstance = ''
    $sqlServerInstance fails with :

    Get-SqlCloneSqlServerInstance : Sequence contains no matching element
    At C:\bin\script\CreateImagesByServer.ps1:23 char:22
    + ... rInstance = Get-SqlCloneSqlServerInstance -MachineName $machine.Machi ...
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-SqlCloneSqlServerInstance], InvalidOperationException
        + FullyQualifiedErrorId : RedGate.SqlClone.PowerShell.Commands.GetSqlCloneSqlServerInstanceCommand
Sign In or Register to comment.