{"record":{"id":"bd94b5aea7ae3bac","repo":"quarkusio/quarkus","slug":"invalid-configuration-quarkus-management-port-m","errorCode":null,"errorMessage":"Invalid configuration: `quarkus.management.port` must be different from `quarkus.http.port`.","messagePattern":"Invalid configuration: `quarkus\\.management\\.port` must be different from `quarkus\\.http\\.port`\\.","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java","lineNumber":1149,"sourceCode":"                auxiliaryApplication, httpManagementServerConfig);\n    }\n\n    private static void validateManagementPortDistinctFromMainServer(VertxHttpConfig httpConfig,\n            ManagementInterfaceBuildTimeConfig managementBuildTimeConfig, ManagementConfig managementConfig,\n            LaunchMode launchMode) {\n        if (!managementBuildTimeConfig.enabled() || managementConfig == null || !managementConfig.hostEnabled()) {\n            return;\n        }\n\n        int managementPort = managementConfig.determinePort(launchMode);\n        if (managementPort <= 0) {\n            // 0 means random port, so it can't be validated against fixed ports here\n            return;\n        }\n\n        int httpPort = httpConfig.hostEnabled() ? httpConfig.determinePort(launchMode) : -1;\n        if (httpPort > 0 && httpPort == managementPort) {\n            throw new IllegalStateException(\n                    \"Invalid configuration: `quarkus.management.port` must be different from `quarkus.http.port`.\");\n        }\n\n        int httpsPort = httpConfig.determineSslPort(launchMode);\n        if (httpsPort > 0 && httpsPort == managementPort) {\n            throw new IllegalStateException(\n                    \"Invalid configuration: `quarkus.management.port` must be different from `quarkus.http.ssl-port`.\");\n        }\n    }\n\n    private static void setHttpServerTiming(boolean httpDisabled, HttpServerConfig httpServerConfig,\n            HttpServerConfig sslConfig,\n            HttpServerConfig domainSocketConfig, boolean auxiliaryApplication, HttpServerConfig managementConfig) {\n        StringBuilder serverListeningMessage = new StringBuilder(\"Listening on: \");\n        int socketCount = 0;\n\n        if (!httpDisabled && httpServerConfig != null) {\n            serverListeningMessage.append(String.format(","sourceCodeStart":1131,"sourceCodeEnd":1167,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java#L1131-L1167","documentation":"VertxHttpRecorder validates at startup that the management interface (quarkus.management.port) does not collide with the main HTTP port. Both servers would try to bind the same host/port, so the configuration is invalid and startup aborts with this IllegalStateException. Fixed, non-random ports are compared; 0 (random) is skipped.","triggerScenarios":"quarkus.management.port and the quarkus.determinePort-resolved quarkus.http.port resolve to the same positive integer while the management interface is enabled.","commonSituations":"Explicitly setting both properties to the same value (e.g. 8080); copying http config into management config; profile-specific overrides changed on one side only; QUARKUS_MANAGEMENT_PORT env var colliding.","solutions":["Set quarkus.management.port to a distinct value (e.g. 9000)","Or set quarkus.management.port=0 to pick a random free port","Check profile-specific config and environment-variable overrides for both properties"],"exampleFix":"// before\nquarkus.http.port=8080\nquarkus.management.port=8080\n// after\nquarkus.http.port=8080\nquarkus.management.port=9000","handlingStrategy":"validation","validationCode":"if (managementPort > 0 && managementPort == httpPort) {\n    throw new IllegalStateException(\"quarkus.management.port must differ from quarkus.http.port\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Assign management a dedicated port range (e.g. 9000+)","Check profile/env overrides for QUARKUS_MANAGEMENT_PORT and QUARKUS_HTTP_PORT","Use 0 (random) for the management port in tests"],"tags":["config","startup","port-conflict","management"],"backgroundTag":"port-conflict","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}