TOEC registration problem on not syspreped images
-
The installation id is the only thing that matters. If 2 pc's have the same id, it's going to show the behavior you are describing. Are you certain that it's not already on the image? It's nearly impossible for 2 machines to have the same installation id. Here is the code for how it is generated.
UpdateDbSetting(Guid.NewGuid().ToString(), "installation_id");
It is basically randomly creating a guid upon installation. The guid is not based on anything on the computer such as hardware or sids.
I'm also not sure whats going on with your script. Is that how you are installing on the client or what you are trying to do to fix it?
-
@theopenem_admin if the GUID is generated as you describe, it is clear that at some point it has been installed in the master image (don't remember, but could be). What is certain is that TOEC has been installed after deployment (maybe again) on each machine.
I will then execute the command with the argument "--prepareimage" as, if I understand correctly, this way it generates a new installation ID, which is the only ID that matters.
Do I have to enforce registration after this command with "resetpartial"?
Thanks again for you answers.
-
A few options:
Rebuild the image - Make sure you delete the program files\toec folder if it exists, otherwise install Toec, then run the --prepareImage, leaving Toec installed on the image.
Keep existing image - Delete program files\toec before installing again.
Keep existing image - Install Toec, then run --prepareImage and restart service
-
@theopenem_admin Useful information, thanks. Sorry for hopping in, just trying to help where I can.
-
@theopenem_admin Thanks. I kept existing image and did what you pointed. I've dropped PS script below in case it could be useful to someone.
Set-ExecutionPolicy Bypass -Scope Process -Force $NetworkPath = "\\server\share" $User = "XXX" $PWord = "XXXX" $logPath = "k:\Theopenem\logs\$env:computername.log" New-SMBMapping -LocalPath "K:" -RemotePath $NetworkPath -ErrorAction Stop -UserName $User -Password $PWord Start-Transcript -Path $logPath -Force -Append write-host 'Testing URLs' $(Invoke-RestMethod -Uri 'http://192.168.1.142:8888/Provision/VerifyDb') -eq "60" $(Invoke-RestMethod -Uri 'http://192.168.1.142:8888/Setting/VerifyDb') -eq "60" Get-Package -Provider Programs -IncludeWindowsInstaller -Name "Toec 1.4.4.0 x64" | Uninstall-Package -Force Remove-Item -Path "C:\Program Files\Toec" -Recurse -Force -ErrorAction SilentlyContinue Import-Certificate -FilePath "k:\Theopenem\toems - root CA.cer" -CertStoreLocation 'Cert:\LocalMachine\Root' -Verbose Import-Certificate -FilePath "k:\Theopenem\toems - intermediate.cer" -CertStoreLocation 'Cert:\LocalMachine\CA' -Verbose Start-Process 'c:\windows\System32\msiexec.exe' -ArgumentList "/i `"k:\Theopenem\Toec-1.4.4-x64.msi`" /quiet /passive" -Wait #get-service -DisplayName 'TOEC' | Stop-Service Start-Process 'C:\Program Files\Toec\toec.exe' -ArgumentList '--prepareimage' -Wait get-service -DisplayName 'TOEC' | Start-Service Remove-SmbMapping -LocalPath "K:" Stop-Transcript
Now, every PC is registered, but, I'm having problems with TOEC-API site/app pool. It answers correctly to http://localhost:8888/Provision/VerifyDb just after I start it. But, then. If I perfom a client inventory task for example, it stops responding. I have to manually restart IIS and it starts working again, but it ends hanging again.
TOEC client log:
2021-07-10 01:09:39,841 ERROR [4] ApiRequest - Error Retrieving API Response: System.Net.WebException: Anulada la solicitud: Se excedió el tiempo de espera de la operación. en System.Net.HttpWebRequest.GetResponse() en RestSharp.Http.GetRawResponse(HttpWebRequest request) en RestSharp.Http.GetResponse(HttpWebRequest request)
I've enabled full log ("ALL" log4net level in web.config for TOEC-API backend), but can't see any error. Only debug info.
Only things I've done after image deployment:
- disabled tftpd32 service and set service to disabled.
- disabled proxy service and set service to disabled.
-
What version of Windows did you install Theopenem on?
-
@theopenem_admin All pcs are W10 Home, included the one in which toems is installed.
-
Windows 10 can only handle 10-20 concurrent connections(OS limitation). Anymore than that and IIS will stop responding. It's in the getting started documentation. You'll need to use a server version for more than that.
-
@theopenem_admin OMG, I missed that one. Thanks!
10 concurrent connections for IIS on W10 Pro. I will take a look at IIS logs and investigate if there is a workaround (apart from paying a server license :/) -
I've migrated the installation to an IIS Express and it is working great so far.