Jenkins and plugins versions report:
Jenkins: 2.319.1
mesos: 2.0
Copy/paste here....
What Operating System are you using (both controller, and any agents involved in the problem)?
Linux
Reproduction steps
Edit the global jenkins url to something external. jenkins.example.com
Edit the jenkins url in the mesos cloud to something internal, jenkins.mesos:10000
Use the docker executor for a job
Slave starts, pulls agent.jar from internal, with jnlpUrl pointing to internal jenkins
if I download the jnlpUrl and look inside the xml it is using the external jenkins with the internal port.
Dec 17, 2021 8:39:53 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: jenkins-agent-linux-lg-0cc19956-0206-4900-88ca-6fc00bb98c28
Dec 17, 2021 8:39:53 AM hudson.remoting.jnlp.Main$CuiListener <init>
INFO: Jenkins agent is running in headless mode.
Dec 17, 2021 8:39:53 AM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.11.2
Dec 17, 2021 8:39:53 AM hudson.remoting.Engine startEngine
WARNING: No Working Directory. Using the legacy JAR Cache location: /root/.jenkins/cache/jars
Dec 17, 2021 8:39:53 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://jenkins.example.com]
Dec 17, 2021 8:39:53 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Dec 17, 2021 8:39:58 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver isPortVisible
WARNING: connect timed out
Dec 17, 2021 8:39:58 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: https://jenkins.example.com/ provided port:10000 is not reachable
Version report
Jenkins and plugins versions report: Jenkins: 2.319.1 mesos: 2.0
Reproduction steps
Edit the global jenkins url to something external. jenkins.example.com Edit the jenkins url in the mesos cloud to something internal, jenkins.mesos:10000 Use the docker executor for a job Slave starts, pulls agent.jar from internal, with jnlpUrl pointing to internal jenkins if I download the jnlpUrl and look inside the xml it is using the external jenkins with the internal port.
I think it has something to do with this. https://www.jenkins.io/doc/upgrade-guide/2.249/#alternate-url-removed-from-inbound-agent