{"id":21980005,"url":"https://github.com/jenkinsci/port-allocator-plugin","last_synced_at":"2025-11-04T21:03:41.180Z","repository":{"id":1231303,"uuid":"1163701","full_name":"jenkinsci/port-allocator-plugin","owner":"jenkinsci","description":"Jenkins port-allocator plugin","archived":false,"fork":false,"pushed_at":"2025-11-01T21:14:56.000Z","size":275,"stargazers_count":11,"open_issues_count":5,"forks_count":34,"subscribers_count":91,"default_branch":"master","last_synced_at":"2025-11-01T23:22:58.131Z","etag":null,"topics":["adopt-this-plugin"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/port-allocator/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"cloudera/crunch","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2010-12-13T05:48:59.000Z","updated_at":"2025-11-01T21:14:53.000Z","dependencies_parsed_at":"2023-07-05T19:18:22.203Z","dependency_job_id":"b8bf9e8e-78bf-45a9-bc60-e950a9de7f44","html_url":"https://github.com/jenkinsci/port-allocator-plugin","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/jenkinsci/port-allocator-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fport-allocator-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fport-allocator-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fport-allocator-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fport-allocator-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/port-allocator-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fport-allocator-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282713017,"owners_count":26714760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-04T02:00:05.887Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adopt-this-plugin"],"created_at":"2024-11-29T17:09:03.179Z","updated_at":"2025-11-04T21:03:41.148Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Port allocator plugin\n\n## TCP port number allocation\n\nWhen you have several jobs that involve in launching a daemon process\n(such as application servers), making sure that each job uses unique TCP\nport numbers becomes tedious. If you don't manage this, however, two\njobs that happen to run on the same machine may use the same port, like\n8080, and end up interfering each other.\n\nThis plugin is written to solve this problem by letting Jenkins do the\nbook-keeping. With this plugin, you'd just say \"I need HTTP\\_PORT and\nJMS\\_PORT for this job\", and Jenkins will assign unique available TCP\nport numbers to them and expose them to the build as environment\nvariables.\n\nThe following screenshot illustrates this configuration.\n\n![](docs/images/config.png)\n\n## Reserving a fixed port\n\nSometimes, your job requires a certain port. For example, it's not\nunusual to see tests that have hard-coded port numbers, or maybe you are\ntesting SMTP servers that really do require port 25.\n\nIn such a case, you'd just need to say \"this job requires port 25, so\ndon't run it with any other job that requires the same port.\" Jenkins\nwill then schedule jobs accordingly so that the collision won't happen.\n\nThe following screenshot illustrates this configuration.\n\n![](docs/images/fixed-port.png)\n\n## Shutting down run-away daemons\n\nOften these allocated TCP ports are used to run background daemon\nprocesses, like application servers. A typical problem in this set up is\nthat when a job fails abnormally, the job may fail to terminate those\nservers properly. This interferes with successive builds that use the\nsame machine.\n\nTo fix this problem, when you allocate a port (or reserve a fixed port),\nyou can choose one of the port types that have the knowledge of shutting\ndown the process. Currently, two port types are available, and more can\nbe added as additional plugins.\n\n-   **GlassFish JMX port** that lets Jenkins shut down a run-away GlassFish through JMX.\n    You can configure a job to require fixed port 8686, which is the default port number for this.\n-   **Tomcat shutdown port** that lets Jenkins shut down a run-away\n    Tomcat through the shut down port. See the [Tomcat 9 configuration reference](https://tomcat.apache.org/tomcat-9.0-doc/config/server.html)\n    for more about this feature.\n\nThe following screenshot illustrates this configuration.\n\n![](docs/images/portType.png)\n\n## Version History\n\n[GitHub releases](https://github.com/jenkinsci/port-allocator-plugin/releases) provide details of recent releases.\n\n[CHANGELOG](CHANGELOG.md) provides releases before 2014\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fport-allocator-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fport-allocator-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fport-allocator-plugin/lists"}