Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64742

"bucket" in declarative pipeline fails with error pointing to Jenkins master host

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • minio-plugin
    • None
    • Jenkins 2.263.2
      Minio Plugin 1.2.0

      Observed behaviour

      While trying to upload using the MinIO-Plugin, we always get the error:

      Problem storing objects in Minio: http://jenkins-master-host-fqdn: Name or service not known

      This host name is not being used in any configuration or environment variable. Also, the configured Jenkins URL is https://our-jenkins-master.domain and not http://jenkins-master-host-fqdn

      The configured hostname https://our.minio.server is not to be found in the error message.

      Expected behaviour

      Uploads should be attempted against the configured host, not the physical Jenkins master host name.

      Workaround/Mitigation

      There is not enough debug output for further investigation.

      Configuration and further information

      Declarative pipeline code snippet

      minio bucket: 'mybucket', credentialsId: 'minio-credentials', excludes: '', host: 'https://our.minio.server', includes: 'foo/bar.baz', targetFolder: 'my/target/folder'

      The issue occurs regardless of the underlying executor (i.e. Linux vs. Windows).

          [JENKINS-64742] "bucket" in declarative pipeline fails with error pointing to Jenkins master host

          Thank you for reporting this bug.

          Can you confirm for me whether or not you have a minio server configured in your global configuration? (Manage Jenkins -> Configure system -> Minio plugin)

          If not, configuring your minio server here and leaving host and credentialsId empty in your snippet would be a temporary workaround while I look into this issue.

          If you do have a value configured there, is it the one you see in the console output of your job? The one you configure in your snippet should have precedence over the globally configured one so that's just some info for me to pinpoint the bug.

          Ronald Kamphuis added a comment - Thank you for reporting this bug. Can you confirm for me whether or not you have a minio server configured in your global configuration? (Manage Jenkins -> Configure system -> Minio plugin) If not, configuring your minio server here and leaving host and credentialsId empty in your snippet would be a temporary workaround while I look into this issue. If you do have a value configured there, is it the one you see in the console output of your job? The one you configure in your snippet should have precedence over the globally configured one so that's just some info for me to pinpoint the bug.

          Hi sleepy,

          thanks for looking into this so quickly.

          I already tried setting the host globally, but that didn't change anything. However, I haven't tested it with empty configuration in the pipeline code, as you suggested. So I did this just now and the result unfortunately is the same. Instead of the configured host, I only get the Jenkins master FQDN.

          Is there anything I might do to increase verbosity?

          Steffen Breitbach added a comment - Hi sleepy , thanks for looking into this so quickly. I already tried setting the host globally, but that didn't change anything. However, I haven't tested it with empty configuration in the pipeline code, as you suggested. So I did this just now and the result unfortunately is the same. Instead of the configured host, I only get the Jenkins master FQDN. Is there anything I might do to increase verbosity?

          Sadly there's no way to increase the verbosity (that I'm aware of at least). This is my first Jenkins plugin and logging in Jenkins still somewhat eludes me 

          That being said, thank you for the info. I'll run some tests against my own setup to try and reproduce it.

          Ronald Kamphuis added a comment - Sadly there's no way to increase the verbosity (that I'm aware of at least). This is my first Jenkins plugin and logging in Jenkins still somewhat eludes me  That being said, thank you for the info. I'll run some tests against my own setup to try and reproduce it.

          sbreitbach

          I've tried multiple configurations on my setup and haven't managed to reproduce this issue. Have you been able to find more info around the problem?

          Ronald Kamphuis added a comment - sbreitbach I've tried multiple configurations on my setup and haven't managed to reproduce this issue. Have you been able to find more info around the problem?

          sleepy, I got down to testing a little further. It seems to work for me now. As we are a few Jenkins versions later, I suppose this may have been an issue in Jenkins itself which has been fixed in the meantime.

          However, I have noticed something, that I would propose to change/clarify. In the configuration (snippet generator, parameter to the pipeline code), the host name is called "host". However, in the help text, it says "URL where Minio is reachable...". As you can see in my example in the description, this is what I have used: an URL, not a hostname. When I configure the parameter as an URL, the upload will fail.
          Can you please update the help text exchanging "URL" with "hostname"?

          Thank you for your effort!

          Steffen Breitbach added a comment - sleepy , I got down to testing a little further. It seems to work for me now. As we are a few Jenkins versions later, I suppose this may have been an issue in Jenkins itself which has been fixed in the meantime. However, I have noticed something, that I would propose to change/clarify. In the configuration (snippet generator, parameter to the pipeline code), the host name is called "host". However, in the help text, it says "URL where Minio is reachable...". As you can see in my example in the description, this is what I have used: an URL, not a hostname. When I configure the parameter as an URL, the upload will fail. Can you please update the help text exchanging "URL" with "hostname"? Thank you for your effort!

            sleepy Ronald Kamphuis
            sbreitbach Steffen Breitbach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: