Agent randomly disconnects

Hi,

I've been searching for any help about this issue and I couldn't find. My agent is disconnected after few minutes I start it. Why? Where can I setup to keep it alive for longer? I am checking the teamcity-agent.log and teamcisty-server.log and I don't find any issue for it disconnects.

Version: TeamCity Professional 2024.03.1 (build 156270)

teamcity-server.log

[2024-05-07 14:44:49,315]   INFO -    jetbrains.buildServer.AGENT - Agent has been registered: "azureServer01" {id=1, protocol=unidirectional, host=127.0.0.1:9090, version: 156270/156270-md5-d99d7ee1a7b6c8f53db5d72f40cc494e, agentTypeId=1, pool=Default, registered since 2024-05-07 14:44:49.311}, not running a build
[2024-05-07 14:48:31,621]   INFO -    jetbrains.buildServer.AGENT - Agent is not alive, last communication time: 2024-05-07 14:47:16.154, agent: "azureServer01" {id=1, protocol=unidirectional, host=127.0.0.1:9090, version: 156270/156270-md5-d99d7ee1a7b6c8f53db5d72f40cc494e, agentTypeId=1, pool=Default, registered since 2024-05-07 14:44:49.311}
[2024-05-07 14:48:31,622]   INFO -    jetbrains.buildServer.AGENT - Agent "azureServer01" {id=1} has been unregistered. Reason: Cannot access agent
 

teamcity-agent.log

[2024-05-07 14:44:11,603]   INFO -   jetbrains.buildServer.SERVER - Starting TeamCity agent
[2024-05-07 14:44:11,606]   INFO - s.buildServer.agent.AgentMain2 -

[2024-05-07 14:44:11,606]   INFO - s.buildServer.agent.AgentMain2 - ===========================================================
[2024-05-07 14:44:11,620]   INFO - s.buildServer.agent.AgentMain2 - TeamCity Build Agent 2024.03.1 (build 156270)
[2024-05-07 14:44:11,635]   INFO - s.buildServer.agent.AgentMain2 - OS: Windows Server 2022, version 10.0, amd64, Current user: bvg_fileshareaccess, Time zone: AEST (UTC+10:00)
[2024-05-07 14:44:11,636]   INFO - s.buildServer.agent.AgentMain2 - Java: 17.0.7, OpenJDK 64-Bit Server VM (17.0.7+7-LTS, mixed mode, sharing), OpenJDK Runtime Environment (17.0.7+7-LTS), Amazon.com Inc.; JVM parameters: -ea -XX:+DisableAttachMechanism --add-opens=java.base/java.lang=ALL-UNNAMED -XX:+IgnoreUnrecognizedVMOptions -Xmx384m -Dlog4j2.configurationFile=file:../conf/teamcity-agent-log4j2.xml -Dteamcity_logs=../logs/
[2024-05-07 14:44:11,637]   INFO - s.buildServer.agent.AgentMain2 - Agent home is "C:\TeamCity\buildAgent"
[2024-05-07 14:44:11,637]   INFO - s.buildServer.agent.AgentMain2 - Starting...
[2024-05-07 14:44:21,447]   INFO -    jetbrains.buildServer.AGENT - Calculating CPU benchmark index...
[2024-05-07 14:44:21,694]   INFO - dAgentConfigurationInitializer - Loading build agent configuration from C:\TeamCity\buildAgent\conf\buildAgent.properties
[2024-05-07 14:44:21,950]   INFO - s.buildServer.agent.AgentMain2 - Working dir: C:\TeamCity\buildAgent\work
[2024-05-07 14:44:21,950]   INFO - s.buildServer.agent.AgentMain2 - Temp dir: C:\TeamCity\buildAgent\temp
[2024-05-07 14:44:21,963]   INFO - rver.plugins.PluginManagerImpl - ===========================================================
[2024-05-07 14:44:21,964]   INFO - rver.plugins.PluginManagerImpl - Plugins initialization started...
[2024-05-07 14:44:21,964]   INFO - rver.plugins.PluginManagerImpl - Scanning plugins folders
[2024-05-07 14:44:21,967]   INFO - .plugins.files.JarSearcherBase - Scanning plugin folder: C:\TeamCity\buildAgent\plugins
[2024-05-07 14:44:22,111]   INFO - .plugins.files.JarSearcherBase - Scanning plugin folder: C:\TeamCity\buildAgent\tools
[2024-05-07 14:44:22,136]   INFO - rver.plugins.PluginManagerImpl - Found 60 non bundled plugins: [agentSystemInfo, amazonEC2, ant, ant-net-tasks, antPlugin, aws-core-agent, cloud-vmware-agent, commandLineRunner, coveragePlugin, crashDetector, deploy-runner-agent, docker-support, dotnet, dotnetPlugin, dotNetRunners, duplicatePlugin, environment-fetcher, file-content-replacer, file-to-build-log-streaming-plugin-agent, fxcop, gant, gantPlugin, golang-agent, gradle-runner, hashicorp-vault-plugin, idea-runner, inspectionPlugin, java-dowser, jetbrains.git, jps, junitPlugin, jvm-update, kotlin-script-runner-agent-156270, mavenPlugin, mercurial, meta-runner, nodejs-agent-156270, nuget-agent, NuGet.CommandLine.6.9.1, perfmon-agent, perforce-agent, plugin-agent, python-agent-156270, qodana, rake-runner, remoteAccess, s3-artifact-storage-agent, sbt-runner-agent, ssh-manager, stacktracesPlugin, svnAgent, swabra, teamcity-agent-terminal-plugin-agent, teamcity-kubernetes-plugin-agent, teamcity-parallel-tests-agent, testNGPlugin, tfs-agent, visualstudiotest, xcode-runner, xml-report-plugin]
[2024-05-07 14:44:22,136]   INFO - rver.plugins.PluginManagerImpl - Found 0 bundled plugins: []
[2024-05-07 14:44:22,142]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\tools\gant\bin\gant
[2024-05-07 14:44:22,143]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\tools\gant\bin\startGroovy
[2024-05-07 14:44:22,143]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\ant
[2024-05-07 14:44:22,144]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\antRun
[2024-05-07 14:44:22,144]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\ant.bat
[2024-05-07 14:44:22,144]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\ant.cmd
[2024-05-07 14:44:22,144]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\antenv.cmd
[2024-05-07 14:44:22,144]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\envset.cmd
[2024-05-07 14:44:22,144]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\lcp.bat
[2024-05-07 14:44:22,145]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\runrc.cmd
[2024-05-07 14:44:22,145]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\antRun.pl
[2024-05-07 14:44:22,145]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\complete-ant-cmd.pl
[2024-05-07 14:44:22,145]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\runant.pl
[2024-05-07 14:44:22,145]   INFO - les.ExecutableAttributesSetter - Setting executable bit for: C:\TeamCity\buildAgent\plugins\ant\bin\runant.py
[2024-05-07 14:44:22,147]   INFO - rver.plugins.PluginsCollection - Load shared classloader for 18 plugins [agentSystemInfo, ant, commandLineRunner, crashDetector, dotnetPlugin, dotNetRunners, environment-fetcher, file-content-replacer, fxcop, gradle-runner, java-dowser, jetbrains.git, mercurial, remoteAccess, ssh-manager, stacktracesPlugin, swabra, xml-report-plugin]
[2024-05-07 14:44:22,304]   INFO - rver.plugins.PluginsCollection - Load standalone classloaders for 38 plugins [amazonEC2, antPlugin, aws-core-agent, cloud-vmware-agent, coveragePlugin, deploy-runner-agent, docker-support, dotnet, duplicatePlugin, file-to-build-log-streaming-plugin-agent, gantPlugin, golang-agent, hashicorp-vault-plugin, idea-runner, inspectionPlugin, junitPlugin, jvm-update, kotlin-script-runner-agent-156270, mavenPlugin, meta-runner, nodejs-agent-156270, nuget-agent, perfmon-agent, perforce-agent, plugin-agent, python-agent-156270, qodana, rake-runner, s3-artifact-storage-agent, sbt-runner-agent, svnAgent, teamcity-agent-terminal-plugin-agent, teamcity-kubernetes-plugin-agent, teamcity-parallel-tests-agent, testNGPlugin, tfs-agent, visualstudiotest, xcode-runner]
[2024-05-07 14:44:22,945]   INFO - KubeAgentConfigurationProvider - Initializing Kube Provider...
[2024-05-07 14:44:23,393]   INFO - .vmware.VMWarePropertiesReader - VSphere plugin initializing...
[2024-05-07 14:44:23,396]   INFO - .vmware.VMWarePropertiesReader - Unable to locate vmware-rpctool. Looks like not a VMWare VM or VWWare tools are not installed
[2024-05-07 14:44:24,367]   INFO - t.golang.BuildMessagesListener - Init the Golang plugin
[2024-05-07 14:44:25,327]   INFO - .vault.agent.VaultBuildFeature - HashiCorp Vault integration enabled
[2024-05-07 14:44:26,435]   INFO - rver.plugins.PluginManagerImpl - Plugins initialization completed (60 plugins loaded): [agentSystemInfo, amazonEC2, ant, ant-net-tasks, antPlugin, aws-core-agent, cloud-vmware-agent, commandLineRunner, coveragePlugin, crashDetector, deploy-runner-agent, docker-support, dotnet, dotnetPlugin, dotNetRunners, duplicatePlugin, environment-fetcher, file-content-replacer, file-to-build-log-streaming-plugin-agent, fxcop, gant, gantPlugin, golang-agent, gradle-runner, hashicorp-vault-plugin, idea-runner, inspectionPlugin, java-dowser, jetbrains.git, jps, junitPlugin, jvm-update, kotlin-script-runner-agent-156270, mavenPlugin, mercurial, meta-runner, nodejs-agent-156270, nuget-agent, NuGet.CommandLine.6.9.1, perfmon-agent, perforce-agent, plugin-agent, python-agent-156270, qodana, rake-runner, remoteAccess, s3-artifact-storage-agent, sbt-runner-agent, ssh-manager, stacktracesPlugin, svnAgent, swabra, teamcity-agent-terminal-plugin-agent, teamcity-kubernetes-plugin-agent, teamcity-parallel-tests-agent, testNGPlugin, tfs-agent, visualstudiotest, xcode-runner, xml-report-plugin]
[2024-05-07 14:44:26,436]   INFO - rver.plugins.PluginManagerImpl - ===========================================================
[2024-05-07 14:44:26,467]   INFO -    jetbrains.buildServer.AGENT - Build Agent version: 156270, plugins signature: 156270-md5-d99d7ee1a7b6c8f53db5d72f40cc494e
[2024-05-07 14:44:26,793]   INFO - ggers.vcs.mercurial.HgDetector - Cannot detect installed mercurial
[2024-05-07 14:44:26,795]   INFO - dAgentConfigurationInitializer - Loading build agent configuration from C:\TeamCity\buildAgent\conf\buildAgent.properties
[2024-05-07 14:44:26,806]   INFO - KubeAgentConfigurationProvider - TeamCity Server URL was not provided. The instance wasn't started using TeamCity Kube integration.
[2024-05-07 14:44:26,889]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/ami-id
[2024-05-07 14:44:26,892]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/ami-launch-index
[2024-05-07 14:44:26,894]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/ami-manifest-path
[2024-05-07 14:44:26,896]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/instance-id
[2024-05-07 14:44:26,899]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/instance-type
[2024-05-07 14:44:26,902]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/local-hostname
[2024-05-07 14:44:26,905]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/local-ipv4
[2024-05-07 14:44:26,907]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/public-hostname
[2024-05-07 14:44:26,932]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/public-ipv4
[2024-05-07 14:44:26,934]   INFO - n.AmazonInstanceMetadataReader - Cannot read EC2 Instance Metadata key: meta-data/reservation-id
[2024-05-07 14:44:26,934]   INFO - .agent.AmazonPropertiesUpdater - Fetched AmazonEC2 instance metadata: 
[2024-05-07 14:44:26,937]   INFO - zon.agent.AmazonMetadataChecks - Amazon EC instance metadata contains no keys
[2024-05-07 14:44:26,937]   WARN - .agent.AmazonPropertiesUpdater - Fetched Amazon EC2 instance metadata does not contain required values. Probably this agent was not started inside Amazon EC2. Is proxy server used?
[2024-05-07 14:44:26,963]   INFO -    jetbrains.buildServer.AGENT - Start build agent
[2024-05-07 14:44:26,982]   INFO -    jetbrains.buildServer.AGENT - Agent Web server started on port 9090
[2024-05-07 14:44:26,985]   INFO -    jetbrains.buildServer.AGENT - Start probing plugins for the configuration parameters to store
[2024-05-07 14:44:26,989]   INFO - rver.agent.PropertiesExtension - Start: Fetched agent properties
[2024-05-07 14:44:27,078]   INFO - rver.agent.PropertiesExtension - DotNetCLI_Path="C:\Program Files\dotnet\dotnet.exe".
[2024-05-07 14:44:27,083]   INFO - rver.agent.PropertiesExtension - DotNetCoreRuntime3.1_Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.30".
[2024-05-07 14:44:27,083]   INFO - rver.agent.PropertiesExtension - DotNetCoreRuntime3.1.30_Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.30".
[2024-05-07 14:44:27,083]   INFO - rver.agent.PropertiesExtension - DotNetCoreRuntime6.0_Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.10".
[2024-05-07 14:44:27,083]   INFO - rver.agent.PropertiesExtension - DotNetCoreRuntime6.0.10_Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.10".
[2024-05-07 14:44:27,084]   INFO - rver.agent.PropertiesExtension - DotNetCoreRuntime8.0_Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.4".
[2024-05-07 14:44:27,084]   INFO - rver.agent.PropertiesExtension - DotNetCoreRuntime8.0.4_Path="C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.4".
[2024-05-07 14:44:27,868]   INFO - rver.agent.PropertiesExtension - MSBuildTools17.0_x86_Path="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin".
[2024-05-07 14:44:27,871]   INFO - rver.agent.PropertiesExtension - MSBuildTools17.0_x64_Path="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\amd64".
[2024-05-07 14:44:27,912]   INFO - rver.agent.PropertiesExtension - MSBuildTools2.0_x86_Path="C:\Windows\Microsoft.NET\Framework\v2.0.50727".
[2024-05-07 14:44:27,912]   INFO - rver.agent.PropertiesExtension - MSBuildTools3.5_x86_Path="C:\Windows\Microsoft.NET\Framework\v3.5".
[2024-05-07 14:44:27,912]   INFO - rver.agent.PropertiesExtension - MSBuildTools4.0_x86_Path="C:\Windows\Microsoft.NET\Framework\v4.0.30319".
[2024-05-07 14:44:27,912]   INFO - rver.agent.PropertiesExtension - MSBuildTools2.0_x64_Path="C:\Windows\Microsoft.NET\Framework64\v2.0.50727".
[2024-05-07 14:44:27,912]   INFO - rver.agent.PropertiesExtension - MSBuildTools3.5_x64_Path="C:\Windows\Microsoft.NET\Framework64\v3.5".
[2024-05-07 14:44:27,912]   INFO - rver.agent.PropertiesExtension - MSBuildTools4.0_x64_Path="C:\Windows\Microsoft.NET\Framework64\v4.0.30319".
[2024-05-07 14:44:27,917]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkTargetingPack3.0_Path="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.0".
[2024-05-07 14:44:27,917]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkTargetingPack3.5_Path="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5".
[2024-05-07 14:44:27,918]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkTargetingPack4.7.2_Path="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2".
[2024-05-07 14:44:27,919]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkTargetingPack4.8_Path="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8".
[2024-05-07 14:44:27,919]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkTargetingPack4.X_Path="C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X".
[2024-05-07 14:44:27,921]   INFO - .agent.CommandLineExecutorImpl - <--- ""C:\Program Files\dotnet\dotnet.exe" --version" exits with code: 0
[2024-05-07 14:44:27,921]   INFO - rver.agent.PropertiesExtension - DotNetCLI="8.0.204".
[2024-05-07 14:44:27,922]   INFO - rver.agent.PropertiesExtension - DotNetCoreSDK8.0_Path="C:\Program Files\dotnet\sdk\8.0.204".
[2024-05-07 14:44:27,922]   INFO - rver.agent.PropertiesExtension - DotNetCoreSDK8.0.204_Path="C:\Program Files\dotnet\sdk\8.0.204".
[2024-05-07 14:44:29,516]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkTargetingPack2.0_Path="C:\Windows\Microsoft.NET\Framework\v2.0.50727".
[2024-05-07 14:44:29,517]   INFO - rver.agent.PropertiesExtension - DotNetFramework2.0_x86="2.0.50727".
[2024-05-07 14:44:29,517]   INFO - rver.agent.PropertiesExtension - DotNetFramework2.0_x86_Path="C:\Windows\Microsoft.NET\Framework\v2.0.50727".
[2024-05-07 14:44:29,517]   INFO - rver.agent.PropertiesExtension - DotNetFramework2.0.50727_x86_Path="C:\Windows\Microsoft.NET\Framework\v2.0.50727".
[2024-05-07 14:44:29,517]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.0_x86="3.0.30729.4926".
[2024-05-07 14:44:29,518]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.0_x86_Path="C:\Windows\Microsoft.NET\Framework\v3.0".
[2024-05-07 14:44:29,518]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.0.30729.4926_x86_Path="C:\Windows\Microsoft.NET\Framework\v3.0".
[2024-05-07 14:44:29,518]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.5_x86="3.5.30729.4926".
[2024-05-07 14:44:29,518]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.5_x86_Path="C:\Windows\Microsoft.NET\Framework\v3.5".
[2024-05-07 14:44:29,518]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.5.30729.4926_x86_Path="C:\Windows\Microsoft.NET\Framework\v3.5".
[2024-05-07 14:44:29,518]   INFO - rver.agent.PropertiesExtension - DotNetFramework4.8_x86="4.8.04161".
[2024-05-07 14:44:29,518]   INFO - rver.agent.PropertiesExtension - DotNetFramework4.8_x86_Path="C:\Windows\Microsoft.NET\Framework\v4.0.30319".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework4.8.04161_x86_Path="C:\Windows\Microsoft.NET\Framework\v4.0.30319".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework2.0_x64="2.0.50727".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework2.0_x64_Path="C:\Windows\Microsoft.NET\Framework64\v2.0.50727".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework2.0.50727_x64_Path="C:\Windows\Microsoft.NET\Framework64\v2.0.50727".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.0_x64="3.0.30729.4926".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.0_x64_Path="C:\Windows\Microsoft.NET\Framework64\v3.0".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.0.30729.4926_x64_Path="C:\Windows\Microsoft.NET\Framework64\v3.0".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.5_x64="3.5.30729.4926".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.5_x64_Path="C:\Windows\Microsoft.NET\Framework64\v3.5".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework3.5.30729.4926_x64_Path="C:\Windows\Microsoft.NET\Framework64\v3.5".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework4.8_x64="4.8.04161".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework4.8_x64_Path="C:\Windows\Microsoft.NET\Framework64\v4.0.30319".
[2024-05-07 14:44:29,519]   INFO - rver.agent.PropertiesExtension - DotNetFramework4.8.04161_x64_Path="C:\Windows\Microsoft.NET\Framework64\v4.0.30319".
[2024-05-07 14:44:29,526]   INFO - rver.agent.PropertiesExtension - teamcity.dotnet.vstest.17.0="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe".
[2024-05-07 14:44:29,877]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkSDK4.0_x64="4.8.03928".
[2024-05-07 14:44:29,878]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkSDK4.0_x64_Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64".
[2024-05-07 14:44:29,878]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkSDK4.0_x86="4.8.03928".
[2024-05-07 14:44:29,878]   INFO - rver.agent.PropertiesExtension - DotNetFrameworkSDK4.0_x86_Path="C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools".
[2024-05-07 14:44:30,068]   INFO - rver.agent.PropertiesExtension - Finish: Fetched agent properties (3079 ms)
[2024-05-07 14:44:30,277]   INFO -    jetbrains.buildServer.AGENT - CPU benchmark index is set to 450
[2024-05-07 14:44:31,716]   INFO - ent.javaDowser.JavaDowserAgent - No java installations found.
[2024-05-07 14:44:31,735]   INFO - r.mono.MonoPropertiesExtension - Mono not found
[2024-05-07 14:44:31,737]   INFO - Server.powershell.agent.DETECT - Detecting PowerShell using RegistryPowerShellDetector
[2024-05-07 14:44:32,321]   INFO - Server.powershell.agent.DETECT - Found through registry: PowerShell Desktop Edition v5.1.20348.1 32-bit(C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe)
[2024-05-07 14:44:32,905]   INFO - Server.powershell.agent.DETECT - Found through registry: PowerShell Desktop Edition v5.1.20348.1 64-bit(C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)
[2024-05-07 14:44:32,906]   INFO - Server.powershell.agent.DETECT - Detecting PowerShell using CommandLinePowerShellDetector
[2024-05-07 14:44:34,891]   INFO - Server.powershell.agent.DETECT - Found: PowerShell Desktop Edition v5.1.20348.2400 64-bit(C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe)
[2024-05-07 14:44:35,543]   INFO - rains.buildServer.AGENT.DOCKER - Docker client is not available. Check whether it has been installed and PATH environment variable contains path to it.
[2024-05-07 14:44:35,543]   INFO - rains.buildServer.AGENT.DOCKER - Docker server is not available. Check whether docker service exists and it is up and running.
[2024-05-07 14:44:35,543]   INFO - rains.buildServer.AGENT.DOCKER - Failed to locate a running Podman container engine.
[2024-05-07 14:44:35,545]   INFO - ialProviderPropertiesExtension - Found .NET credential provider DotNetCredentialProvider4.0.0_Path at C:\TeamCity\buildAgent\plugins\nuget-agent\bin\credential-plugin\net46\CredentialProvider.TeamCity.exe
[2024-05-07 14:44:35,548]   INFO - ialProviderPropertiesExtension - Found .NET credential provider DotNetCredentialProvider1.0.0_Path at C:\TeamCity\buildAgent\plugins\nuget-agent\bin\credential-plugin\netcoreapp1.0\CredentialProvider.TeamCity.dll
[2024-05-07 14:44:35,548]   INFO - ialProviderPropertiesExtension - Found .NET credential provider DotNetCredentialProvider2.0.0_Path at C:\TeamCity\buildAgent\plugins\nuget-agent\bin\credential-plugin\netcoreapp2.0\CredentialProvider.TeamCity.dll
[2024-05-07 14:44:35,549]   INFO - ialProviderPropertiesExtension - Found .NET credential provider DotNetCredentialProvider3.0.0_Path at C:\TeamCity\buildAgent\plugins\nuget-agent\bin\credential-plugin\netcoreapp3.0\CredentialProvider.TeamCity.dll
[2024-05-07 14:44:35,550]   INFO - ialProviderPropertiesExtension - Found .NET credential provider DotNetCredentialProvider5.0.0_Path at C:\TeamCity\buildAgent\plugins\nuget-agent\bin\credential-plugin\net5.0\CredentialProvider.TeamCity.dll
[2024-05-07 14:44:35,550]   INFO - ialProviderPropertiesExtension - Found .NET credential provider DotNetCredentialProvider6.0.0_Path at C:\TeamCity\buildAgent\plugins\nuget-agent\bin\credential-plugin\net6.0\CredentialProvider.TeamCity.dll
[2024-05-07 14:44:36,749]   INFO - t.resolver.AgentPythonResolver - Python 2.x executable is not found in default directories. Searching for other paths.
[2024-05-07 14:44:37,550]   INFO - t.resolver.AgentPythonResolver - Python 2.x is not found
[2024-05-07 14:44:42,896]   INFO - .agent.impl.OsArchBitsDetector - Detecting via "wmic computersystem get systemtype", exit code: -2147217405, output: 
[2024-05-07 14:44:43,105]   INFO - r.mono.MonoPropertiesExtension - HKLM\Software\Novell\Mono\DefaultCLR wasn't found => no mono
[2024-05-07 14:44:43,296]   INFO - r.mono.MonoPropertiesExtension - HKLM\Software\Mono\DefaultCLR wasn't found => no mono
[2024-05-07 14:44:43,693]   INFO - .agent.AgentStartupGitDetector - Detected git at C:\Program Files\Git\bin\git.exe
[2024-05-07 14:44:47,964]   INFO - t.resolver.AgentPythonResolver - Python 3.x executable is not found in default directories. Searching for other paths.
[2024-05-07 14:44:48,752]   INFO - t.resolver.AgentPythonResolver - Python 3.x is not found
[2024-05-07 14:44:48,952]   INFO -    jetbrains.buildServer.AGENT - Stop probing plugins for the configuration parameters to store
[2024-05-07 14:44:48,961]   INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to C:\TeamCity\buildAgent\logs\buildAgent.xmlRpcPort
[2024-05-07 14:44:48,963]   INFO - agent.impl.AgentPortFileWriter - Launcher version is 2024.03-156270
[2024-05-07 14:44:48,964]   INFO - agent.impl.AgentPortFileWriter - Writing agent runtime file to C:\TeamCity\buildAgent\logs\buildAgent.xmlRpcPort :DONE!
[2024-05-07 14:44:48,994]   INFO - buildServer.AGENT.registration - Registering on server via URL "http://localhost:8111": AgentDetails{Name='azureServer01', AgentId=null, BuildId=null, AgentOwnAddress='null', AlternativeAddresses=[], Port=9090, Version='156270', PluginsVersion='156270-md5-d99d7ee1a7b6c8f53db5d72f40cc494e', AvailableRunners=[Ant, cargo-deploy-runner, csharpScript, dotcover, dotnet, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, jb.nuget.installer, jb.nuget.pack, jb.nuget.publish, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, kotlinScript, Maven2, MSBuild, NAnt, nodejs-runner, NUnit, python-runner, Qodana, rake-runner, SBT, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, VisualStudioTest, VS.Solution], AvailableVcs=[tfs, jetbrains.git, mercurial, svn, perforce], AuthorizationToken='80c050d4138707fcb1140537f7a4606c', PingCode='Juqag7SjD9W1koqVjbw7Ub6XuMk0YqR6'}
[2024-05-07 14:44:49,097]   INFO -    jetbrains.buildServer.AGENT - Build agent started
[2024-05-07 14:44:49,179]   INFO - buildServer.AGENT.registration - Server supports the following communication protocols: [polling]
[2024-05-07 14:44:49,179]   INFO - buildServer.AGENT.registration - Trying to register on server using 'polling' protocol.
[2024-05-07 14:44:49,323]   INFO - ldServer.AGENT.PollingProtocol - Start polling server for commands
[2024-05-07 14:44:49,324]   INFO - buildServer.AGENT.registration - Registered on server with id 1 and authorization token '80c050d4138707fcb1140537f7a4606c'
[2024-05-07 14:44:49,324]   INFO - buildServer.AGENT.registration - If this is the first time this agent registered on the server make sure it is authorized by administrator in the server web UI.
[2024-05-07 14:44:49,461]   INFO - r.artifacts.impl.HttpDiskCache - Cleaning up items with life time in cache greater than 172800 seconds
[2024-05-07 14:44:49,464]   INFO - r.artifacts.impl.HttpDiskCache - Finished cleaning up expired items, 0 items removed
[2024-05-07 14:44:50,101]   INFO - dDirectoryBasedCleanupRegistry - Removing files from C:\TeamCity\buildAgent\work\.old
[2024-05-07 14:44:50,163]   INFO - l.directories.DirectoryMapImpl - Cleaning up old checkout directories. Default lifetime = 192 hour(s)
[2024-05-07 14:44:50,211]   INFO - dDirectoryBasedCleanupRegistry - Removing files from C:\TeamCity\buildAgent\temp\.old
[2024-05-07 14:44:51,329]   INFO -    jetbrains.buildServer.AGENT - Updating agent parameters on the server: AgentDetails{Name='azureServer01', AgentId=1, BuildId=null, AgentOwnAddress='null', AlternativeAddresses=[], Port=9090, Version='156270', PluginsVersion='156270-md5-d99d7ee1a7b6c8f53db5d72f40cc494e', AvailableRunners=[Ant, cargo-deploy-runner, csharpScript, dotcover, dotnet, dotnet-tools-dupfinder, dotnet-tools-inspectcode, Duplicator, ftp-deploy-runner, FxCop, gradle-runner, Inspection, jb.nuget.installer, jb.nuget.pack, jb.nuget.publish, jetbrains.dotNetGenericRunner, jetbrains.mspec, jetbrains_powershell, JPS, kotlinScript, Maven2, MSBuild, NAnt, nodejs-runner, NUnit, python-runner, Qodana, rake-runner, SBT, simpleRunner, sln2003, smb-deploy-runner, ssh-deploy-runner, ssh-exec-runner, VisualStudioTest, VS.Solution], AvailableVcs=[tfs, jetbrains.git, mercurial, svn, perforce], AuthorizationToken='80c050d4138707fcb1140537f7a4606c', PingCode='Juqag7SjD9W1koqVjbw7Ub6XuMk0YqR6'}
 

0
14 comments
Hi,

It doesn't look like a full teamcity-agent.log, as it ends abruptly. Could you share the full log? You can upload it using the https://uploads.jetbrains.com/ and share the upload ID. Thanks!

Best regards,
Anton
0

Upload id: 2024_05_09_CbFaDSo4yhCtKVraPzCnZm (files: teamcity-server.log, teamcity-agent.log)

Thanks

0
Hi,

Thanks for the logs.
In the meantime, I can't pinpoint possible causes from the logs. Could you provide the following information?
1. Is this build agent installed on the same machine as a server, or is it remote?
2. Is the build agent started as a Windows Service or as a process?
3. Do you use a proxy to access the TeamCity server?
4. Do you have a failover (multinode) setup of TeamCity?
5. Were there any changes to the installation when this issue started to occur?
Thank you!

Best regards,
Anton
0

Hi Anton, sorry for the delay. I've been in annual leave for a week.

1. It's installed in the same machine.

2. As a process.

3. No.

4. No.

5. No. This issue is happening since we installed the application.

I hope the answers help you to help us with this issue.

0
Hi,

It could be a resource issue. Could you share all other build agent logs in the build agent's logs directory (launcher.log, etc.)? There may be some related records in them, as the records in teamcity-agent.log end abruptly, indicating that the process hanged.

Best regards,
Anton
0

Hi Anton, here is the weblink where I've uploaded all the files.
Upload id: 2024_05_21_CBk8cVLWXKXbtd2NVH9kge (files: launcher.log and 4 more)

0
Hi,

I can see that the agent starts with the -Xmx384m parameter, meaning it has only 384 MB of memory available. It doesn't report any errors in other logs; it probably just can't because the agent's process hangs.
As you are running the agent as a process, open the script you are using to run the agent (agent.sh or agent.bat), find the -Xmx384m value, and replace it with at least -Xmx512m or -Xmx1024m if you have enough memory on the machine and see if it helps.

Best regards,
Anton
0

Hi Anton,

Thanks for your help. I have changed the parameters in both files to 1024 but the agent stays up just for one minute. It looks like your approach is not working. Any other idea?

0
Hi,

Thank you for the confirmation. Could you share the build log for such a build that is causing the agent to hang?

Best regards,
Anton
0

Here are the agent log files.
Upload id: 2024_05_24_216BguMz4ocSgZteJs9DVP (files: agent.bat and 7 more)

Additionally, I am not running any build, I just start the agent and leave it ready and running for a build, but it disconnects after one minute. I am in contact with our IT team to check the server performance.

Let me know if you need any other log.

0
Could you check if the issue will be reproduced if you install and run the TeamCity build agent as a service?
It may help narrow the scope of the investigation.

Best regards,
Anton
0

Hi Anton, do you have a link where I can check how to install it as a service? I couldn't find any information about how to install and run it as service or not. As far as know, it is running as a service.

Additionally, the installation was done using the default settings provided during the installation, nothing was changed. I hope this helps.

0
Hi,

Earlier you replied that you are running the build agent as a process, not as a service. Because of this, when we were trying to increase the memory for the build agent, I guided you to increase the memory in the script that you use to start the build agent process. Please confirm how do you start your build agent and if it is running as a process or a Windows service.

Best regards,
Anton
0

Please sign in to leave a comment.