I'm deploying a brand new WEM 2507 deployment and ...
# citrix-wem
m
I'm deploying a brand new WEM 2507 deployment and for whatever reason I can't get the agents to register: Failed to determine site for agent machine What I've done: • Install two broker • Make use of a service user for ADC load balancing • Register SPN for the Service user • Create the database • Configure the broker service with the service account user and the vuem sql password • Configure the Load Balancer • Install the agent to the master image • Configure the GPO with FQDN, port, deployment port • Added the OU to the configuration set in the WEM admin console. And I ever get from the logs is:
171657 Event -> MainServiceHost.StartAgentHostService() : Agent Host Service started
171657 Event -> MainServiceHost.LogNotificationServiceRegistry() : Winlogon registry key check passed.
171657 Event -> MainServiceHost.OnStart() : Agent host Windows service started. Netlogon could start now.
171657 Warning -> VuemAgentServiceConfigurationHelper.ReadControlSettings() : No Last Known Configuration Set detected -> Offline mode will not work
171657 Event -> VuemAgentServiceConfigurationHelper.DoCfgReport() : Registry Configuration Report:
Agent Deployment Type: On-premises
Agent Broker Server: citrix-wem.customer.intra
Agent Broker Port: 8286
Cached Data Sync Port: 8288
Agent Last Known Site Id: 0
Agent Last Known Site Name: Unknown
Agent Path: C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\
RDS Host: True
Enable user centric intelligent optimization: True
Use Non Persistent Compliant History: False
171657 Event -> VuemAgentServiceConfigurationHelper.TryRefreshNetworkInformation() : Local network information:
Local address: 172.23.100.48
Subnet mask: 255.255.254.0
Nic name: Ethernet0
Nic description: vmxnet3 Ethernet Adapter
DNS suffix: amm-nbg.intra
Gateway address: 172.23.100.1
Local MAC address: 005056B3E089
171657 Event -> AgentHostService.CheckAgentSqliteDatabases() : Checking hardware id and agent version of existing agent local database: C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\Local Databases\LocalAgentDatabase.db
171658 Event -> OpenSqliteLocalDatabase() : Open agent local database connection -> C:\Program Files (x86)\Citrix\Workspace Environment Management Agent\Local Databases\LocalAgentDatabase.db
171658 Event -> OpenSqliteLocalDatabase() : Trimmed 0 agent local database items.
171658 Event -> ConfigurationDataSourcesHelper.CheckBrokerSvcConnection() : Broker Svc Check -> OK
171658 Event -> AgentServiceHelper.OpenDataConnection() : Detected connection security -> Negociated
171659 Exception -> VuemAgentServiceConfigurationHelper.UpdateConfigurationSet() : Failed to determine site for agent machine.
171659 Event -> VuemAgentServiceConfigurationHelper.ReadRepositorySettings() : Checking agent settings timestamp. Remote: ; Current:
171659 Exception -> VuemAgentServiceConfigurationHelper.ReadRepositorySettings() : Error happened while getting global parameters. Exception: Failed to determine site for agent machine.
171659 Event -> VuemAgentServiceConfigurationHelper.DoCentralCfgReport() : Central Configuration Report:
c
even though it says optional, did you try the override? Override Agent Deployment Type. Overrides the WEM agent deployment type. You can choose Cloud service, On-premises, or Basic deployment.
r
Did you create a gpo to define the required ports. This is mine
m
Yes. All set via GPO. FQDN, Ports and Override. I learned from my last mistake ;-)
r
👍
m
Yes. But this suggests to set to the broker server, but for load balancing I need to set set to the service user. So I don’t see this as a solution.
r
Yea though it implies a problem with the spn
m
I suspected something like this. But the instructions are clear to point SPN to a user. Also this is not the first WEM environment. They all run as a service account.
From the agent log, it can't identify the root cause. Could you help collect the logs from the two WEM broker server? thanks! You can use the WEM health check tool to collect the logs easily.
m
I‘m in the office soon. Will do. Where to post the logs. Here or create a support case?
image.png
@Sharp Guo Case created with (hopefully) all logs: 101727485
blob thanks 1
c
This is the SPN setup when i set up WEM broker load balancing previously
You got three seperate Virtual Servers and service groups configured for the different WEM ports ? DNS A record configured for wem load balancing VIP that the WEM agent points to via WEM infrastructure server policy setting
I would also check your ports are open from VDA with WEM agent to WEM LB VIPs
m
I've done all of that. Was also on the phone with Citrix support yesterday for three hours.
SPN
GPO
ADC
FQDN
c
Telnet on the wem ports all good ?
m
TCP all good
I just dropped the DB, reinstalled the infra services, re-created the SPN, created the DB, configured the infra service. No difference, the Agents still don't register.
I was hasty! The reinstallation seems to have worked ffs
The first agent registered.
I guess this puzzle will remain unsolved..
Interestingly, only 3 out of 4 Agents registered so I got curios. It seems like Broker1 ist the issue. I can simulate the error now, by switching the Brokers in the Load Balancing ADC.
In the Eventlog of Broker1 is an Error, that is not in the Eventlog of Broker2
This looks like the root cause. Now I need to find out, what causes this error.
The error:
Copy code
Error happened while retrieving site id. Exception: System.TypeLoadException: Could not load type 'Microsoft.Extensions.Logging.Abstractions.Internal.NullScope' from assembly 'Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
   at Microsoft.Extensions.Logging.Logger.BeginScope[TState](TState state)
   at Microsoft.EntityFrameworkCore.Query.EntityQueryModelVisitor.CreateQueryExecutor[TResult](QueryModel queryModel)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](Expression query, IQueryModelGenerator queryModelGenerator, IDatabase database, IDiagnosticsLogger`1 logger, Type contextType)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass13_0`1.<Execute>b__0()
   at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func`1 compiler)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
   at Remotion.Linq.QueryableBase`1.GetEnumerator()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Citrix.Wem.Common.Data.Sqlite.CacheSqliteDataClient.GetCachedVUEMADObjectsByType(Int32 type)
   at Citrix.Wem.Common.Data.Broker.Sqlite.BrokerCacheDataProvider.LockedInvoke[T](Func`1 func)
   at Norskale.Broker.Agent.AgentBrokerService.setADSearchTimeout()
   at Norskale.Broker.Agent.AgentBrokerService.RetrieveSiteId()
@Corey Tracey @Rob Zylowski @c4rm0 @Sharp Guo This has been confirmed as a bug in WEM 2507.
👍 2
Workaround: Disabling "Use cache even if online" in the WEM Infra config utility.