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:

  • Repository test is failed when I clone git repository in Android Studio on Windows
  • git credential.helper=cache never forgets the password?
  • Git hosting services
  • git: merge changes from a branch that reverted a previous merge
  • How to display available branches in Android source tree?
  • Enabling two-factor auth on GitHub: Can I still push/pull some repos without access tokens?
  • 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:

    • Email notifications are set-up and the email address is valid
    • Under global config SMTP is set-up and the test email works
    • Under Git plugin user.email is set to valid email
    • The user being authenticated in the hook has a valid email address
    • I’ve explicitly installed the Mailer plugin, the version is 1.6 (though I’m not sure why this might have been needed)

    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: 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)
    

    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:pass@server.com/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: 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)
    

  • DVCS working on remote server
  • git-subtree stable for repos with lots & deeply nested subtrees?
  • Git workflow using Puppet & Hiera
  • Finding large files in the history of a git repository fails
  • git repository clone failed. Connection Reset
  • GIT picking up whitespace changes it shouldn't
  • One Solution collect form web for “Jenkins remote build issue – email related”

    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.

    Git Baby is a git and github fan, let's start git clone.