无法在服务器日志中找到TeamCity的维护令牌

时间:2015-07-17 16:03:14

标签: teamcity teamcity-9.0

我在Windows Server 2012上安装了TeamCity。它已经设置好了几个版本。然后,我尝试通过将.zip文件放在〜/ .BuildServer / plugins文件夹中来安装一些插件。我通过cd到c:\ TeamCity \ bin并运行“runAll stop”然后“runAll start”重新启动服务器。

然后当我进入teamcity页面几分钟时,我得到一个“输入维护认证令牌”页面。它在页面上显示在teamcity-server.log文件中找到维护令牌(参见下面的屏幕截图)。我查看c:\ TeamCity \ logs \ teamcity-server.log,它有几个“超级用户令牌”和“代理授权语言”。我尝试使用这些令牌,但获得了无效的维护令牌错误。

TeamCity Enter the Maintenance Authentication Token

所以我的问题是在哪里找到维护令牌?

编辑:自从升级到最新的TeamCity版本以来,这已经为我解决了。当我遇到这个问题时,所提出的答案都没有起作用,这就是为什么我没有将任何标记作为可接受的答案。

9 个答案:

答案 0 :(得分:9)

请查看Teamcity的logs子文件夹中的文件teamcity-winservice.log。 验证令牌应该在这里。

答案 1 :(得分:5)

打开<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Multiple Coice Quiz</title> <link href="http://glpjt.s3.amazonaws.com/_css/01.css" rel="stylesheet" /> <style> iframe { border-radius: 8px; margin-top: 20px; } .ui { border-radius: 8px; max-width: 300px; border: 2px ridge #8cf; padding: 10px; } legend, figcaption { color: #8cf; font-size: 1.35rem; font-variant: small-caps; } #php { background: #fff; } dt { margin-top: 12px; } </style> </head> <body> <section id="ii"> <form id="quizForm" name="quizForm" action="http://examples.funwebdev.com/process.php" target="php" method="post" onsubmit="submitAnswers();"> <dl> <dt>1. In which HTML element do we put in JavaScript code?</dt> <dd> <input type="radio" name="q0" value="a" id="q0a" />a. &lt;js&gt;</dd> <dd> <input type="radio" name="q0" value="b" id="q0b" class="correct" />b. &lt;script&gt;</dd> <dd> <input type="radio" name="q0" value="c" id="q0c" />c. &lt;body&gt;</dd> <dd> <input type="radio" name="q0" value="d" id="q0d" />d. &lt;link&gt;</dd> <dt>2. Which HTML attribute is used to reference an external JavaScript file?</dt> <dd> <input type="radio" name="q1" value="a" id="q1a" class="correct" />a. src</dd> <dd> <input type="radio" name="q1" value="b" id="q1b" />b. rel</dd> <dd> <input type="radio" name="q1" value="c" id="q1c" />c. type</dd> <dd> <input type="radio" name="q1" value="d" id="q1d" />d. href</dd> <dt>3. How would you write "Hello" in an alert box?</dt> <dd> <input type="radio" name="q2" value="a" id="q2a" />a. msg("Hello");</dd> <dd> <input type="radio" name="q2" value="b" id="q2b" />b. alertBox("Hello");</dd> <dd> <input type="radio" name="q2" value="c" id="q2c" />c. document.write("Hello");</dd> <dd> <input type="radio" name="q2" value="d" id="q2d" class="correct" />d. alert("Hello");</dd> <dt>4. JavaScript is directly related to the "Java" programming language</dt> <dd> <input type="radio" name="q3" value="a" id="q3a" />a. True</dd> <dd> <input type="radio" name="q3" value="b" id="q3b" class="correct" />b. False</dd> <dt>5. A variable in JavaScript must start with which special character</dt> <dd> <input type="radio" name="q4" value="a" id="q4a" />a. @</dd> <dd> <input type="radio" name="q4" value="b" id="q4b" />b. $</dd> <dd> <input type="radio" name="q4" value="c" id="q4c" />c. #</dd> <dd> <input type="radio" name="q4" value="d" id="q4d" class="correct" />d. No Special Character</dd> </dl> <fieldset class="ui"> <legend>Post Data to Server</legend> <input id="btn" type="submit" value="Submit" /> <label for="results">&nbsp;&nbsp;&nbsp;Results: <output for="quizForm" id="results">0</output><span id="outOf"></span> </label> </fieldset> </form> </section> <figure> <figcaption>Data Received by Server</figcaption> <iframe id="php" name="php" src="http://examples.funwebdev.com/process.php" frameborder="2" scrolling="yes"></iframe> </figure> <footer>&nbsp;</footer> <script> function submitAnswers() { var res = document.getElementById('results'); var keys = document.querySelectorAll('.correct'); var total = keys.length; var score = 0; var outOf = document.getElementById('outOf'); var keyArray = Array.prototype.slice.call(keys); for (var k = 0; k < total; k++) { var keyVal = keyArray[k].value; var ansVal = document.forms['quizForm']['q' + k].value; if (ansVal == keyVal) { score++; } else { continue; } } console.log('Score: ' + score); outOf.innerHTML = ' / ' + total; return res.value = score; } </script> </body> </html>转到TeamCity安装文件夹

cmd

输入

C:\TeamCity\bin

等到服务停止,然后输入

runAll.bat stop

你将在控制台中看到当前的身份验证令牌。

答案 2 :(得分:4)

它应该位于TeamCity安装的teamcity-server.log子文件夹中的文件logs中 - 查找文本“使用身份验证令牌从Web UI进行管理员登录”以及之后的长号这是你的代币。

另请参阅TeamCity Maintenance Mode的文档。

答案 3 :(得分:2)

有同样的问题,它是你想要的超级用户令牌(它将是日志中的最后一行,除非你试图登录 - 这将在这里显示为失败)

沿着

的路线
  

管理员可以使用身份验证令牌从Web UI登录:1234567890

/编辑所以日志文件中的行更明显是引用并添加了示例令牌,感谢@Kleopatra,

答案 4 :(得分:2)

我花了一段时间才找到它,但它已经显示在文件中,但它是最后一行。

答案 5 :(得分:0)

如果您在TeamCity(v10.0.4)中针对此问题遇到此问题https://youtrack.jetbrains.com/issue/TW-43100,您可能需要启用javascript并将该网址添加到IE可信站点列表中。

答案 6 :(得分:0)

如果在日志中找不到,只需输入随机值即可。 web ui将通知您输入了无效令牌。

然后转到日志(TeamCity/logs/teamcity-server.log)并检查最后一行:

[2018-03-27 17:55:20,258] WARN - jetbrains.buildServer.STARTUP - Failed maintenance authentication from IP address /86.234.23.62 with token: "6056431478480274143". Current authentication token: "6418830881320521552"

答案 7 :(得分:0)

  • 我尝试重新启动Teamcity服务。
  • 我尝试过runAll停止启动的事情。

不是为我工作。

重启,然后在TeamCity / logs / teamcity-server.log中找到了超级用户令牌

答案 8 :(得分:0)

您将在指定的文件(TeamCity \ logs \ teamcity-server)中找到多个超级用户身份验证令牌。您始终可以使用文件中的最后一个。 (如果最后一行没有一个,请尝试使用随机数登录,您会收到包含令牌号的授权失败消息,它将被添加到文件中)

相关问题