Articles of jenkins

Tomcat和Jenkins分别在同一台服务器上

我从来没有在CentOS上安装过Jenkins,但是现在我尝试了,它似乎并不能和独立的Tomcat服务器并行运行。 首先,我通过yum install tomcat tomcat来yum install tomcat (我正在使用CentOS 7)。 接下来,我添加Jenkins回购和运行yum install jenkins 。 它并没有从头开始,因为Tomcat正在运行,港口被绑定。 我已经在/ect/sysconfig/jenkins中将端口设置为8081。 现在看起来工作正常,jenkins跑起来了。 但是,我无法启动Tomcat, Caused by: java.net.BindException: Address already in use <null>:8009 。 如果我第一次启动tomcat ,然后启动jenkins ,同样如此:jenkins失败, Failed to start Jetty 。 我怎样才能pipe理这两个,而不是通过jenkins.war手动安装Jenkins到tomcat?

Apache httpd下的Jenkins有时会从SSL切换到普通的HTTP

我有安装了反向代理的Jenkins和Apache httpd 。 它们安装在同一台PC上。 我可以直接访问Jenkins,没关系。 例如下面的链接工作正常: http://127.0.0.1:8080/jenkins/manage : http://127.0.0.1:8080/jenkins/manage : http://127.0.0.1:8080/jenkins/manage 其他网页看起来不错,如果我试图通过jenkins直接访问它们。 我也可以通过SSL通过Apache访问Jenkins: https://127.0.0.1/jenkins/manage : https://127.0.0.1/jenkins/manage 。 没事。 但是当我在这个页面上按«pipe理插件»,我被redirect到以下URL http://127.0.0.1/jenkins/pluginManager/ ,它已经是纯HTTP。 我收到“未find”错误页面。 当我在Apache SSL的configuration页面https://127.0.0.1/jenkins/configure上按“保存”时,获得类似的错误。 我也redirect到普通的HTTP http://127.0.0.1/jenkins/ 。 可能这种从SSL切换到纯HTTP的情况只会发生在POST请求上,但我不能百分百的确信。 在testing期间,我根据https://wiki.jenkins-ci.org/display/JENKINS/Disable+securityclosures安全 与Jenkins相关的Apacheconfiguration指令如下: Listen 443 ProxyPass /jenkins http://127.0.0.1:8080/jenkins nocanon ProxyPassReverse /jenkins http://127.0.0.1:8080/jenkins ProxyPreserveHost On ProxyRequests Off <Proxy http://127.0.0.1:8080/jenkins*> SSLRequireSSL RequestHeader set X_FORWARDED_PROTO 'https' Order deny,allow Allow from all […]

jenkinsmaven java 7权限问题

我在尝试在Jenkins中构buildMaven时遇到了这个错误, Building in workspace /var/lib/jenkins/workspace/xxxxprojectnamedeletedforprivacyxxxx java.nio.file.AccessDeniedException: /usr/share/maven/lib/maven-settings-3.x.jar at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) at java.nio.file.Files.delete(Files.java:1079) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.Util.deleteFile(Util.java:247) at hudson.FilePath.deleteRecursive(FilePath.java:1202) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.deleteContentsRecursive(FilePath.java:1211) at hudson.FilePath.deleteRecursive(FilePath.java:1193) at hudson.FilePath.access$1000(FilePath.java:191) at hudson.FilePath$14.invoke(FilePath.java:1172) at hudson.FilePath$14.invoke(FilePath.java:1169) at hudson.FilePath.act(FilePath.java:989) at hudson.FilePath.act(FilePath.java:967) at hudson.FilePath.deleteRecursive(FilePath.java:1169) at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:130) at […]

构buildmaven项目时的依赖性错误

我试图将一个应用程序从一个Windows Eclipse安装本地构build到一个Jenkins服务器。 从我所看到的设置是正确的,依赖关系应该解决。 即使是那些抱怨在那里,当我检查〜/ .m2 /仓库/文件夹。 我不确定我在这里做错了什么。 我对jenkins来说是全新的,对Maven本身也没有什么经验。 这是我的pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.my.project</groupId> <artifactId>My-Project</artifactId> <name>MyProject</name> <packaging>war</packaging> <version>1.0</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <!– Spring –> <!– AspectJ –> <!– Logging –> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> <exclusions> <exclusion> <groupId>javax.mail</groupId> <artifactId>mail</artifactId> </exclusion> <exclusion> <groupId>javax.jms</groupId> <artifactId>jms</artifactId> </exclusion> <exclusion> <groupId>com.sun.jdmk</groupId> <artifactId>jmxtools</artifactId> </exclusion> <exclusion> <groupId>com.sun.jmx</groupId> […]

厨师/stream浪汉 – 厨房不能连接到更新jenkins

Iam与厨师,stream浪者和testing厨房疯狂。 我们有一个定制的jenkins食谱,它适用于没有合作networkingProxys的“普通”客户端,但后面的错误失败。 – create new file /tmp/kitchen/cache/jenkins-cli.jar – update content in file /tmp/kitchen/cache/jenkins-cli.jar from none to 0b49c2 (new content is binary, diff output suppressed) * remote_file[/tmp/kitchen/cache/update-center.json] action create_if_missing [2015-05-11T16:28:32+00:00] ERROR: Error connecting to http://mirrors.jenkins-ci.org/updates/update-center.json, retry 1/5 [2015-05-11T16:30:43+00:00] ERROR: Error connecting to http://mirrors.jenkins-ci.org/updates/update-center.json, retry 2/5 [2015-05-11T16:32:54+00:00] ERROR: Error connecting to http://mirrors.jenkins-ci.org/updates/update-center.json, retry 3/5 [2015-05-11T16:35:06+00:00] ERROR: Error […]

如何configurationHAProxy通过未编码的URL传递给Jenkins后端?

我将HAProxyconfiguration为终止Jenkins CI服务器的SSL连接,通过普通的ol HTTP代理到Jenkins CI服务器后端。 我可以成功执行Jenkins CI服务器Web界面中所有需要的操作,包括pipe理实例。 但是,我得到了Jenkins的“反向代理设置已损坏”警告 。 这是由于更严格的代理configuration检查,因为Jenkins版本1.572,它使用以下forms的URL: https://host-name/jenkins/administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/testForReverseProxySetup/a%2Fb/ testing反向代理configuration。 引发警告的典型原因是通过反向代理将%2F解码为正斜杠,从而导致404错误。 对于Apache和nginx反向代理configuration似乎有良好的文档configuration解决scheme来消除此警告。 我没能find的东西类似于Apache的“AllowEncodedSlashes On”选项,或者nginx的“proxy_pass”configuration,甚至是在HAProxy后面设置Jenkins的示例(我使用的是Apache而不是nginx,因为我们已经有适合其他应用程序的HAProxy)。 操作系统:CentOS 6.6 HAProxy版本:1.5.2-2 jenkins版本:1.610

Docker jenkins图像SSH密钥GitHub

我已经下载了官方的docker jenkins镜像,并为Jenkins安装了Git + GitHub插件。 在证书菜单中,我添加了常规GitHub用户的公钥(不生成新的),并在构buildconfiguration中指定了git url。 不幸的是,我从GitHub获得一个权限被拒绝(公钥)。 所以我尝试了HTTPS的URL,而不是我的GitHublogin,以确保没有任何错误的连接到GitHub。 这样,它正在工作,但我不明白,如果我需要在容器中设置SSH密钥,甚至可能,因为容器只包含jenkins本身?

Jenkins在Windows中使用哪个证书商店?

我的一些VS项目需要清单签名证书来构build。 如果我将它们安装在我的用户帐户的Personal目录中,则msbuild将从命令行成功完成。 如果我然后重新configurationJenkins服务以我的用户身份login,那么构build从Jenkins成功完成。 但是,如果将Jenkins切换到默认的Jenkins服务用户并在Jenkins\Personal安装这些证书,则不会检测到这些证书。 应该在哪里安装证书以允许Jenkins访问它们?

如何限制发送电子邮件的第三方工具?

我有一个运行Jenkins持续集成服务器的(Win2008 R2)框。 这是一个作为Windows服务运行的Java程序。 命令行如下所示: > "C:\Program Files (x86)\Jenkins\jre\bin\java.exe" -jar "C:\Program Files (x86)\Jenkins\jenkins.war" [more params] 我想让jenkins能够发送电子邮件(例如,当构build失败)。 该盒子运行一个McAffee防火墙,可以阻止除程序/端口白名单外的所有内容。 我添加了白名单规则,允许C:\Program Files (x86)\Jenkins\jre\bin\java.exe访问SMTP端口(25)。 问题是,第三方Java程序可以使用相同的java.exe来执行,因此将能够发送电子邮件。 我如何解决这个问题? FWIW Jenkins服务器作为特定用户帐户(“autobuild”)运行

Jenkins构build失败与OOM:无法创build新的本地线程

我在2GB RAM的VServer上设置了一个jenkins实例,运行CentOS 6.7的时候没有其他的运行(使用率<200MB)。 当启动jenkins构build所述实例时,jenkins运行gradle –debug –stacktrace test时总会出现此错误gradle –debug –stacktrace test : 19:26:50.727 [错误] [org.gradle.BuildExceptionReporter]引起:java.lang.OutOfMemoryError:无法创build新的本地线程 由于这似乎是不允许multithreading的情况下,我提出了限制: [root @ xxx]#runuser -s / bin / bash jenkins -c'ulimit -u' 16384 我也尝试了不同的jenkins JVM内存分配标志,给实例200MB或1GB没有改变,降低堆栈大小以允许本地线程的空间也没有帮助。 当我以root运行相同的gradle命令时,gradle会挂起一个类似的错误: 19:29:14.939 [QUIET] [system.out] Error occurred during initialization of VM 19:29:14.940 [QUIET] [system.out] java.lang.OutOfMemoryError: unable to create new native thread 19:29:14.941 [QUIET] [system.out] at java.lang.Thread.start0(Native Method) […]