1
votes
Bitbucket notify on start failed: Root URL isn't configured yet. Cannot compute absolute URL.
java.lang.IllegalStateException: Root URL isn't configured yet. Cannot compute absolute URL.
    at hudson.model.AbstractItem.getAbsoluteUrl(AbstractItem.java:486)
    at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusHelper.buildUrlFromBuild(BitbucketBuildStatusHelper.java:182)
    at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusHelper.createBitbucketBuildStatusFromBuild(BitbucketBuildStatusHelper.java:197)
    at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusHelper.notifyBuildStatus(BitbucketBuildStatusHelper.java:224)
    at org.jenkinsci.plugins.bitbucket.BitbucketBuildStatusNotifier.prebuild(BitbucketBuildStatusNotifier.java:109)
    at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:789)
    at hudson.model.AbstractBuild$AbstractBuildExecution.preBuild(AbstractBuild.java:784)
    at hudson.model.Build$BuildExecution.doRun(Build.java:145)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:490)
    at hudson.model.Run.execute(Run.java:1735)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:405)

I got that error when I was trying to use the Bitbucket Build Status Notifier Plugin ( https://wiki.jenkins.io/display/JENKINS/Bitbucket+Cloud+Build+Status+Notifier+Plugin ) on Jenkins CI. I followed this tutorial: https://www.youtube.com/watch?v=uu5XcU4EPzQ but I don't know what the problem is.

3

3 Answers

1
votes

The answer is simpler than I thought, but I couldn't find it anywhere. On BitBucket in the user profile settings and in OAuth, the consumer you create have to have the Callback URL ending with /. For example: Before was: http://jenkinsUrl:8080 and it was throwing that error, now I just added the / and it worked: http://jenkinsUrl:8080/

1
votes

Hi i had a similar issue with a newly installed jenkins 2.60.2. I tried to access the absolute URL from a RunWrapper object in Groovy, but got also this error, although the jenkins location was correctly configured.

The problem was, that the email address was not valid. I changed it to [email protected] and my root URL issue was gone.

I think its a bug, or at least a missing documentation about that fact that "root url" also need a configured email address within the jenkins configuration.

1
votes

You need to set your Jenkins URL.

Go to Manage Jenkins->Configure System

Under Jenkins Location specify your public Jenkins URL.