9

I configured the slack plugin (v2.3) in our Jenkins (v2.60.1). It works and sends notifications about broken jobs etc. In these messages it includes a link "Open". This link points to "unconfigured-jenkins-location".

I have actually checked the sourcecode of the plugin and found that it uses jenkins.getRoot() to determine which URL to send. If there is no URL configured it tries to determine the URL from the request. This does only work if the request is a http request. In case of an error it returns null and the slack output will be "unconfigured-jenkins-location".

To solve this problem you need to set the Jenkins URL in your global config and you need to make sure that the config is present in your jenkins.model.JenkinsLocationConfiguration.xml as <jenkinsUrl>.

Both is set in my setup but I still get the unconfigured URL. Do you have any clue what I could check next?

Thank you for any help!

My /var/lib/jenkins/jenkins.model.JenkinsLocationConfiguration.xml:

<?xml version='1.0' encoding='UTF-8'?>
<jenkins.model.JenkinsLocationConfiguration>
    <adminAddress>Adresse nicht konfiguriert &lt;nobody@nowhere&gt;</adminAddress>
  <jenkinsUrl>http://my-jenkins-server/</jenkinsUrl>
</jenkins.model.JenkinsLocationConfiguration>

1 Answer 1

4

I had faced a similar problem. You have to specify full url including the http port number in config file and you have to restart your jenkins instance to take its effect

<jenkinsUrl>http://my-jenkins-server:8080</jenkinsUrl>
3
  • 1
    In "Configuration as code" that is in: unclassified: location: url: my-jenkins-server:8080
    – Marco
    Commented Aug 20, 2020 at 12:12
  • THANK YOU! Spent a lot of time trying to figure out what was wrong 😅 Commented Aug 4, 2022 at 8:39
  • Yes Thank you! unclassified: location: url: is the path!
    – Eddie
    Commented Apr 4 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.