我將jenkins.war部署到tomcat webapps。並將安全設置更改爲「僅允許登錄用戶...」,但尚未創建任何用戶。無法登錄jenkins,並且無法禁用登錄選項
所以,現在我無法登錄jenkins,也無法禁用登錄選項。
Googling around後,似乎可以通過編輯jenkins根目錄下的config.xml文件來解決;但是,我的jenkins根目錄中沒有這樣的xml。
如何從這裏恢復?
非常感謝!
更新:
- 其實詹金斯在Windows 7操作系統運行。
- 後特別設置環境變量如JENKINS_HOME = 「F:\工具\ Apache的Tomcat的7.0.50 \ web應用\詹金斯」
- 然後導航到
http://localhost:8080/jenkins/
予見下文錯誤 -
*hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read F:\Tools\apache-tomcat-7.0.50\webapps\jenkins\config.xml
at hudson.WebAppMain$3.run(WebAppMain.java:234)
Caused by: org.jvnet.hudson.reactor.ReactorException: java.io.IOException: Unable to read F:\Tools\apache-tomcat-7.0.50\webapps\jenkins\config.xml
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:910)
at jenkins.model.Jenkins.<init>(Jenkins.java:809)
at hudson.model.Hudson.<init>(Hudson.java:82)
at hudson.model.Hudson.<init>(Hudson.java:78)
at hudson.WebAppMain$3.run(WebAppMain.java:222)
Caused by: java.io.IOException: Unable to read F:\Tools\apache-tomcat-7.0.50\webapps\jenkins\config.xml
at hudson.XmlFile.unmarshal(XmlFile.java:167)
at jenkins.model.Jenkins$17.run(Jenkins.java:2562)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:899)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.InstantiationError: hudson.security.AuthorizationStrategy
at sun.reflect.GeneratedSerializationConstructorAccessor5.newInstance(Unknown Source)*
你可以試試命令'ps -aef | grep jenkin'並檢查'JENKINS_HOME'確切的地方,你正在尋找config.xml –