Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose slave listener port publicly to enable external worker nodes #70

Closed
1w2w3y opened this issue Sep 26, 2020 · 3 comments
Closed

Expose slave listener port publicly to enable external worker nodes #70

1w2w3y opened this issue Sep 26, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@1w2w3y
Copy link

1w2w3y commented Sep 26, 2020

It is really nice to have dynamic worker nodes manged by k8s! This make the worker management work much easier!

We are also trying to add some VM agent nodes as persistent agent nodes to run some Selenium tests.

However, the master's 'slaveListenerPort' is not exposed publicly. It cannot be reached from the internet.

This is blocking us bring in our own VM nodes.

Is it possible to expose the JNLP TCP port?

Error logs from connecting agent

Sep 26, 2020 5:58:20 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using C:\Users\liftrvmuser\Desktop\test-folder\work\remoting as a remoting work directory
Sep 26, 2020 5:58:20 AM org.jenkinsci.remoting.engine.WorkDirManager setupLogging
INFO: Both error and output logs will be printed to C:\Users\liftrvmuser\Desktop\test-folder\work\remoting
Sep 26, 2020 5:58:21 AM hudson.remoting.jnlp.Main createEngine
INFO: Setting up agent: win-selenuim-worker-001
Sep 26, 2020 5:58:21 AM hudson.remoting.jnlp.Main$CuiListener
INFO: Jenkins agent is running in headless mode.
Sep 26, 2020 5:58:21 AM hudson.remoting.Engine startEngine
INFO: Using Remoting version: 4.5
Sep 26, 2020 5:58:21 AM org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
INFO: Using C:\Users\liftrvmuser\Desktop\test-folder\work\remoting as a remoting work directory
Sep 26, 2020 5:58:21 AM hudson.remoting.jnlp.Main$CuiListener status
INFO: Locating server among [https://jenkins.cicd.azliftr-test.io/]
Sep 26, 2020 5:58:21 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
Sep 26, 2020 5:58:26 AM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver isPortVisible
WARNING: connect timed out
Sep 26, 2020 5:58:26 AM hudson.remoting.jnlp.Main$CuiListener error
SEVERE: https://jenkins.cicd.azliftr-test.io/ provided port:50000 is not reachable
java.io.IOException: https://jenkins.cicd.azliftr-test.io/ provided port:50000 is not reachable
at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:314)
at hudson.remoting.Engine.innerRun(Engine.java:694)
at hudson.remoting.Engine.run(Engine.java:519)

@1w2w3y 1w2w3y added the enhancement New feature or request label Sep 26, 2020
@torstenwalter
Copy link
Member

Would it work for you if we use WebSockets to connect agents instead?

https://www.jenkins.io/blog/2020/02/02/web-socket/

#64 (comment)

Then we would not need to expose the agent port.

@1w2w3y
Copy link
Author

1w2w3y commented Sep 27, 2020

Yes! This will work for me and it looks much easier!

Thanks!

@1w2w3y
Copy link
Author

1w2w3y commented Sep 27, 2020

@torstenwalter, thanks for the information! This is already working for me! Another port is not needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants