problem running 2 Docker/Jenkins/JCASC instances using JNLP

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

problem running 2 Docker/Jenkins/JCASC instances using JNLP

monger_39
Hi all,

I am running a Docker/Jenkins configured via JCASC. For the slaves I am using JNLP.
My container is started using 

    "-p 8080:8080 -p 50000:50000"

and this works fine. The JNLP port is configured in the JCAC config through:
   
    slaveAgentPort: 50000
  
However, if I start a second instance of the same docker image, using eg

    "-p 9090:8080 -p 50090:50000"

the (non-dockerized) slave connect fails. In the startup/error text:

INFO: Locating server among [http://tp01.tp.tst:8080/, http://tp01.tp.tst:9090/]
May 18, 2020 8:58:33 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
May 18, 2020 8:58:33 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Agent discovery successful
  Agent address: tp01.tp.tst
  Agent port:    50000
  Identity:      9f:fa:2b:39:a7:8a:68:78:8a:0f:c0:62:95:bd:d7:6d
May 18, 2020 8:58:33 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Handshaking
May 18, 2020 8:58:33 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Connecting to tp01.tp.tst:50000
May 18, 2020 8:58:33 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Trying protocol: JNLP4-connect
May 18, 2020 8:58:34 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Remote identity confirmed: 9f:fa:2b:39:a7:8a:68:78:8a:0f:c0:62:95:bd:d7:6d
May 18, 2020 8:58:34 AM org.jenkinsci.remoting.protocol.impl.ConnectionHeadersFilterLayer onRecv
INFO: [JNLP4-connect connection to tp01.tp.tst/192.168.62.17:50000] Local headers refused by remote: Authorization failure
May 18, 2020 8:58:34 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Protocol JNLP4-connect encountered an unexpected exception

I see that the 'agent port' still is set to '50000' which is how it is configured via JCASC.

I think that it is because the master (internally) has no knowledge of the JNLP port mapping,
and tells the slave to connect via JNLP over port 50000 rather than the 50090.
I don't think this is specific to JCASC, but more a Docker problem.

Anyone knows how to overcome ?

thx, M

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/120117970.796217.1589797132691%40mail.yahoo.com.