[英]Chef Cookbooks: Installing Jenkins plugin with chef failing
I am trying to setup a Jenkins server using one of the Chef cookbooks from the supermarket. 我正在尝试使用来自超市的厨师食谱之一来设置Jenkins服务器。 Unfortunately it is failing with the below error.
不幸的是,它失败并显示以下错误。 The plugin recipe requires for the Global security configuration - "Enable CLI with remoting" to be enabled.
插件配方要求全局安全性配置-启用“通过远程处理启用CLI”。 Can anybody help me to enable it from a Chef recipe so that java -jar jenkins-cli.jar -s http://localhost:8080 -remoting installs the plugin.
谁能帮我从Chef食谱中启用它,以便java -jar jenkins-cli.jar -s http:// localhost:8080 -remoting安装该插件。
Thanks 谢谢
Here is the error log 这是错误日志
java.io.IOException: No X-Jenkins-CLI2-Port among [X-Jenkins, null, Server, X-Content-Type-Options, X-You-Are-In-Group-Disabled, X-Hudson, X-Permission-Implied-By, Date, X-Jenkins-Session, X-You-Are-Authenticated-As, X-Required-Permission, Set-Cookie, Expires, Content-Length, Content-Type]
at hudson.cli.CLI.getCliTcpPort(CLI.java:311)
at hudson.cli.CLI.<init>(CLI.java:137)
at hudson.cli.CLIConnectionFactory.connect(CLIConnectionFactory.java:82)
at hudson.cli.CLI._main(CLI.java:615)
at hudson.cli.CLI.main(CLI.java:426)
Suppressed: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/cli?remoting=true
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
at hudson.cli.FullDuplexHttpStream.<init>(FullDuplexHttpStream.java:101)
at hudson.cli.CLI.connectViaHttp(CLI.java:163)
at hudson.cli.CLI.<init>(CLI.java:141)
As per the official documentation, remoting
option is disabled by default. 根据官方文档,默认情况下禁用
remoting
选项。 you can enable it by going to Configure Global Security
. 您可以通过“
Configure Global Security
启用它。 I don't think by programatically we can't enable it. 我不认为通过编程我们无法启用它。 For more details use this official link.
有关更多详细信息,请使用此官方链接。 Remoting Connection Mode |
远程连接模式 official Jenkins
詹金斯官方
This is the solution they are providing for your problem. 这是他们为您提供的解决方案。 Hope this helps.
希望这可以帮助。
Go to Manage Jenkins > Configure Global Security and choose "Fixed" or "Random" under TCP port for JNLP agents.
转到“管理Jenkins”>“配置全局安全性”,然后在JNLP代理的TCP端口下选择“固定”或“随机”。
You can enable the remoting option by writing a bit of Groovy that gets run when Jenkins starts, but a better option is to configure the proper authentication and use the ssh or http methods. 您可以通过编写一些在Jenkins启动时运行的Groovy来启用远程处理选项,但是更好的选择是配置正确的身份验证并使用ssh或http方法。
https://github.com/chef-cookbooks/jenkins#authentication https://github.com/chef-cookbooks/jenkins#authentication
See also: https://stackoverflow.com/a/51106793/3794873 另请参阅: https : //stackoverflow.com/a/51106793/3794873
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.