Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HyperV2012R2+] Can't find a job ID #146

Closed
berkut1 opened this issue Apr 24, 2023 · 2 comments
Closed

[HyperV2012R2+] Can't find a job ID #146

berkut1 opened this issue Apr 24, 2023 · 2 comments

Comments

@berkut1
Copy link
Contributor

berkut1 commented Apr 24, 2023

Describe the bug
An extremally rare error while converting VHD

SolidCP Info

  • SolidCP Version: Any

Additional context
When this error occurs, Windows still continues to convert the VHD, we just lost a job, that provide data to use that task.

Error while converting VHD: Server was unable to process request. ---> Invoke error: The command cannot find a job with the job ID 2. Verify the value of the Id parameter and then try the command again.
Server was unable to process request. ---> Invoke error: The command cannot find a job with the job ID 2. Verify the value of the Id parameter and then try the command again.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at SolidCP.Providers.Virtualization2012.VirtualizationServer2012.GetJob(String jobId)
at SolidCP.EnterpriseServer.Code.Virtualization2012.Helpers.JobHelper.JobCompleted(VirtualizationServer2012 vs, ConcreteJob job, Boolean resetProgressBarIndicatorAfterFinish)
at SolidCP.EnterpriseServer.Code.Virtualization2012.Helpers.JobHelper.TryJobCompleted(VirtualizationServer2012 vs, ConcreteJob job, Boolean resetProgressBarIndicatorAfterFinish)
at SolidCP.EnterpriseServer.Code.Virtualization2012.Tasks.CreateVirtualMachineTask.CreateVirtualMachineInternal(String taskId, VirtualMachine vm, LibraryItem osTemplate, Int32 externalAddressesNumber, Boolean randomExternalAddresses, Int32[] externalAddresses, Int32 privateAddressesNumber, Boolean randomPrivateAddresses, String[] privateAddresses, String summaryLetterEmail)

Possible solutions

  • Catch this exception and try to simulated a job with checking the VHD space change, if it still keeps growing then the VHD conversion is working.
  • Replace PowerShell converting commands into WMI, where exist more stable methods with async job tasks.
@berkut1 berkut1 changed the title [HyperV2012R2+] Can't find a job [HyperV2012R2+] Can't find a job ID May 4, 2023
@berkut1
Copy link
Contributor Author

berkut1 commented Dec 26, 2024

I have an idea that can be implemented using WMI, as well as finding lost "jobs" using WMI, instead of PowerShell. I will try this in January/February.

@berkut1
Copy link
Contributor Author

berkut1 commented Feb 9, 2025

Fixed in #221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant