Salesforce

Trados GroupShare 2020 SR1 CU09 - TM Service Agent unexpectedly listens on port 5000

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentTrados GroupShare 2020 SR1 CU09
Symptoms/Context
The TM Service Agent service starts and then it stops. The error message seen in the TMServiceAgent.log file:
 
2023-08-21 15:11:51.6176|SERVERNAMEHERE|ERROR|THREAD_ID:1  |TR_ID:Main-f33cb433-d63d-4bf4-bb9a-02720b70addd|EX:System.InvalidOperationException: 
No service 
for type 'Microsoft.Extensions.Hosting.IHostLifetime' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.Extensions.Hosting.HostBuilder.<CreateServiceProvider>b__28_2(IServiceProvider _)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext
 context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope
 scope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.Extensions.Hosting.HostBuilder.Build()
   at Sdl.TranslationModelService.RestService.Program.Main(String[] args) in D:\a\1\s\Sdl.TranslationModelService.RestService\Program.cs:line 42|
Stopped program because of exception

 
Resolution
In Trados GroupShare 2020 SR1 CU09, the TM Service Agent listens on port 5000 (Asp.NET Core default) and might cause problems on any server (when another service or application is set to listen by default on port 5000), the following workarounds can be applied:

Solution. Update to Trados GroupShare 2020 SR1 CU10 (build 15.1.10.13194 released on December 11th, 2023)

Workaround 1

If another application is set to listen on port 5000, simply change that port to something different.

Workaround 2

1. Open "C:\Program Files\SDL\SDL Server\TMServiceAgent\appsettings.json" for editing
2. Add the following lines (e.g. on the 3rd line in the .json file):
"Kestrel": {
    "EndPoints": {
      "Http": {
        "Url": "http://+:41266"
      }
    }
  },
Before the change:
{	
  "$schema": "https://json.schemastore.org/launchsettings.json",
  "Logging": {
    "LogLevel": {
        "Default": "Warning",
        "Microsoft.AspNetCore": "Warning",
        "Sdl": "Debug",
        "Rws": "Debug"
    }
  },

After implementing the change:
{	
  "$schema": "https://json.schemastore.org/launchsettings.json",
  "Kestrel": {
    "EndPoints": {
      "Http": {
        "Url": "http://+:41266"
      }
    }
  },
  "Logging": {
    "LogLevel": {
        "Default": "Warning",
        "Microsoft.AspNetCore": "Warning",
        "Sdl": "Debug",
        "Rws": "Debug"
    }
  },

Note! Port 41266 could be replaced by any desired port in the above config line.
Note2! This was already reported to our Dev team under ID CRQ-35496. We should have a fix for this in an upcoming Trados GroupShare 2020 release - having the default 41266 port being used again.

 
Root Cause

Doing some checks via the Task Manager - Resource Monitor - Network sections, we could see that the Sdl.TMService.Agent.exe process is using the Port 5000, instead of the normally used one 41266. To double check this, run the following command in cmd.exe:
C:\Users\username>netstat -ano -p tcp | find "5000"
The output will look this way (where 1668 is the Process ID - PID):
TCP    127.0.0.1:5000         0.0.0.0:0              LISTENING       1668

User-added image
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by