我正在运行Jenkins 1.424.6,因为这是我在Ubunutu 12.04中可以使用的唯一版本,无需从源代码编译;我知道这是旧版本。
当有一个GIT项目的测试分支提交时,我有一个尝试构建的工作,但是它们输出失败了:
Started by remote host 127.0.0.1
Fetching changes from the remote Git repository
Fetching upstream changes from git@repo:project.git
Checking out Revision 745755b40716cc220f9635db7b555af65dd283b2 (origin/test)
FATAL: hudson.tasks.Mailer$UserProperty.hasExplicitlyConfiguredAddress()Z
java.lang.NoSuchMethodError:
hudson.tasks.Mailer$UserProperty.hasExplicitlyConfiguredAddress()Z
at hudson.plugins.git.GitChangeSet.hasMail(GitChangeSet.java:300)
at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:284)
at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:339)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:311)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:624)
at hudson.model.Run.run(Run.java:1400)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
我尝试过的一些调试步骤:
如果我手动构建,则构建失败,但会向通知地址发送一封电子邮件,说明事情已恢复正常:
Started by user myuser
Fetching changes from the remote Git repository
Fetching upstream changes from git@reop:project.git
Checking out Revision 745755b40716cc220f9635db7b555af65dd283b2 (origin/test)
Sending e-mails to: build@address.com
FATAL: hudson.tasks.Mailer$UserProperty.hasExplicitlyConfiguredAddress()Z
java.lang.NoSuchMethodError: hudson.tasks.Mailer$UserProperty.hasExplicitlyConfiguredAddress()Z
at hudson.plugins.git.GitChangeSet.hasMail(GitChangeSet.java:300)
at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:284)
at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:339)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:311)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:307)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:624)
at hudson.model.Run.run(Run.java:1400)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
后续版本现在可以使用,但我没有收到电子邮件(虽然这可能是因为没有更改?):
Started by user myuser
Fetching changes from the remote Git repository
Fetching upstream changes from git@repo:project.git
Checking out Revision 745755b40716cc220f9635db7b555af65dd283b2 (origin/test)
Finished: SUCCESS
下一次实际提交,当然触发工作,我们得到与第一次相同的错误。
这里发生了什么?我错过了配置选项吗?
编辑:我想知道这是否与启动提交挂钩的用户有关?我通过传递https://user:pass@server.com/job_url
作为挂钩来验证用户身份。它是在进行身份验证(之前我没有添加它,因为匿名用户没有权限)但我仍然遇到一些错误:
2013/12/16 22:54:49 [error] 18890#0: *576 readv() failed (104: Connection reset by
peer) while reading upstream, client: IP_ADDRESS, server: myserver.com,
request: "GET /job/job_name/ HTTP/1.1", upstream:
"http://127.0.0.1:8088/job/job_name/", host: "myserver.com"
奇怪的是,没有配置更改电子邮件现在正在发送,但它在电子邮件发送后正在崩溃,因此构建仍然标记为失败
Started by remote host 127.0.0.1
Fetching changes from the remote Git repository
Fetching upstream changes from git@repo:project.git
Checking out Revision 3d93bdb4225635eb45526ca831781df2ed25a22b (origin/test)
Sending e-mails to: myemail@server.com
FATAL: hudson.tasks.Mailer$UserProperty.hasExplicitlyConfiguredAddress()Z
java.lang.NoSuchMethodError: hudson.tasks.Mailer$UserProperty.hasExplicitlyConfiguredAddress()Z
at hudson.plugins.git.GitChangeSet.hasMail(GitChangeSet.java:300)
at hudson.plugins.git.GitChangeSet.findOrCreateUser(GitChangeSet.java:284)
at hudson.plugins.git.GitChangeSet.getAuthor(GitChangeSet.java:339)
at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:311)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:624)
at hudson.model.Run.run(Run.java:1400)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
答案 0 :(得分:1)
我通过卸载Jenkins来解决这个问题:
apt-get --purge remove jenkins
然后我将当前的jenkins二进制文件添加到/etc/apt/sources.list
deb http://pkg.jenkins-ci.org/debian binary/
在通常的apt-get update
之后我做了apt-get install jenkins
并获得了1.5或者其他东西,清除没有删除jenkins主目录所以我的工作仍然在那里虽然通过Jenkin UI我不得不然后升级一些插件。
我现在可以使用gitlab插件,因为我有更新版本的Jenkins,电子邮件问题也随之消失。