Skip to content

Conversation

@dodo920306
Copy link
Contributor

@dodo920306 dodo920306 commented May 17, 2025

The default jenkins agent port conflicts with the compose file which currently configures Jenkins with a JAVA_TOOL_OPTIONS setting that opens JDWP debugging on port 50000.

This PR changes the JDWP debug port to 50001 to resolve the issues, and port 50000 still remains for agents.

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

The default jenkins agent port conflicts with the compose file
which currently configures Jenkins with a JAVA_TOOL_OPTIONS
setting that opens JDWP debugging on port 50000.

This commit changes the JDWP debug port to 50001 to resolve the
issues.

Signed-off-by: dodo920306 <dodo920306@gmail.com>
@dodo920306 dodo920306 requested a review from a team as a code owner May 17, 2025 07:35
@github-actions github-actions bot added the documentation Improvements or additions to documentation label May 17, 2025
@krisstern
Copy link
Member

krisstern commented May 17, 2025

Hi @dodo920306 are you sure your proposed suggestion would work? We would like to debug port 50000 hence the original setting. Which debugger have you tried this on? And, why would you want to debug another port?

@dodo920306
Copy link
Contributor Author

Hi @dodo920306 are you sure your proposed suggestion would work? We would like to debug port 50000 hence the original setting. Which debugger have you tried this on? And, why would you want to debug another port?

Accoring to https://www.jenkins.io/doc/book/security/services/#tcp-agent-listener-port

This service is disabled by default in most packages, but the Docker images expose it at port 50000.

, using port 50000 as the JDWP debug port will make the docker container fail to start because of port conflict.

I use IntelliJ and it works pretty fine with the new port.

It's unnecessary to map the agent port to the host for
development.

Signed-off-by: dodo920306 <dodo920306@gmail.com>
Copy link
Member

@krisstern krisstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for the PR @dodo920306!

@krisstern krisstern enabled auto-merge (squash) May 17, 2025 08:33
@krisstern krisstern merged commit dfabca5 into jenkinsci:master May 17, 2025
17 checks passed
@dodo920306 dodo920306 deleted the fix/port-conflict-between-jdwp-and-jenkins-agent branch May 17, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants