Darren Beale
Darren Beale

Reputation: 773

Jenkins remote build issue - email related

I am running Jenkins 1.424.6 as this is the only version I can use in Ubunutu 12.04 without compiling from source; I know it's an older version.

I've got a job attempting to build when there are commits to the test branch of a GIT project, however they fail with this output:

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)

Some debugging steps I've tried:

If I build manually the build fails but an email is sent to the notification address saying things are back to normal:

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: [email protected]
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)

Subsequent builds will now work but I do not get the email (though this may be due to there being no changes?):

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

The next actual commit, triggering the job of course, we get the same error as the first one.

What's going on here? Have I missed a config option?

Edit: I wonder if it's something to do with the user initiating the commit hook? I'm authenticating the user by passing https://user:[email protected]/job_url as the hook. It's authenticating (it wasn't before I added this as the anonymous user has zero privileges) but I still get some errors:

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"

Weirdly with no config changes emails are now going out, but it's breaking right after the email sending, so the build is still marked as failed

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: [email protected]
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)

Upvotes: 2

Views: 760

Answers (1)

Darren Beale
Darren Beale

Reputation: 773

I 'fixed' this by uninstalling Jenkins:

apt-get --purge remove jenkins

I then added the current jenkins binary to /etc/apt/sources.list

deb http://pkg.jenkins-ci.org/debian binary/

After the usual apt-get update I then did apt-get install jenkins and got 1.5 something or other, the purge didn't remove the jenkins home directory so my jobs were still there though via the Jenkin UI I had to then upgrade some plugins.

I can now use the gitlab plugin as I have a much newer version of Jenkins, and the email issues went away.

Upvotes: 1

Related Questions