Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find the maintenance token for TeamCity in the server log

I installed TeamCity on Windows Server 2012. It has been working fine setting up a few builds. I then attempted to install some plugins by putting .zip files in the ~/.BuildServer/plugins folder. I restarted the server by cd'ing to c:\TeamCity\bin and running "runAll stop" followed by "runAll start".

Then when I go to the teamcity page for several minutes I get a "Enter the maintenance authentication token" page. It says on the page to find the maintenance token in the teamcity-server.log file (see screenshot below). I look in c:\TeamCity\logs\teamcity-server.log and it has several "super user token" and "agent authorizationtoken". I tried using these token but get an invalid maintenance token error.

TeamCity Enter the Maintenance Authentication Token

So my question is where do I find the maintenance token?

Edit: This has resolved itself for me since upgrading to the latest TeamCity version. None of the suggested answers worked at the time I had this problem so that's why I am not marking anything as the accepted answer.

like image 668
fredw Avatar asked Jul 17 '15 16:07

fredw


People also ask

How to configure logging in TeamCity?

TeamCity uses log4j library for the logging and its settings can be customized. By default, log files are located under the < TeamCity Server home >/logs directory. Other files can also be created on changing Logging Configuration. Some of the files can have .N extensions — that are files with previous logging messages copied on main file rotation.

How do I restart a disconnected TeamCity agent?

ssh to the server that the disconnected agent is on. go to the build agent’s bin directory (i.e. /opt/teamcity/buildagent/buildagent01/bin/) That will start the agent, and after a few seconds or so, the next time you go to TeamCity, it will be connected.

What is the default port number for TeamCity agent?

The default value is 8080, but you can just add the property and value you want like this: ## Defines which port the agent will use to receive messages from TeamCity. ## Defaults to 8080 if not present. ownPort=9091 I found the agent is connected this morning. Looks any fresh teamcity agent needs time to refresh itself.

How to enable/disable reveal maintenance token?

Note: Reveal maintenance token will be disabled if bulk maintenance token is enabled. Optionally, input a Reason for Token Reveal and then click Reveal Token. Record the hostname Maintenance Token and then click Done. Note: The Maintenance Token will differ in your environment.


2 Answers

open cmd goto TeamCity instalation folder

C:\TeamCity\bin

type

runAll.bat stop

wait until services stoped then type

runAll.bat start

u will see current authentication token in console,.

like image 82
SSGeek Avatar answered Oct 11 '22 08:10

SSGeek


Please check out file teamcity-winservice.log in logs subfolder of your Teamcity. Auth token should be here.

like image 26
Nikolay Rumyantsev Avatar answered Oct 11 '22 08:10

Nikolay Rumyantsev