{"record":{"id":"6280842662fff413","repo":"apache/hadoop","slug":"proxy-error-fs-s3a-proxy-port-set-without-fs-s3a","errorCode":null,"errorMessage":"Proxy error: fs.s3a.proxy.port set without fs.s3a.proxy.host","messagePattern":"Proxy error: fs\\.s3a\\.proxy\\.port set without fs\\.s3a\\.proxy\\.host","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/AWSClientConfig.java","lineNumber":275,"sourceCode":"        String msg = \"Proxy error: \" + PROXY_USERNAME + \" or \" +\n            PROXY_PASSWORD + \" set without the other.\";\n        LOG.error(msg);\n        throw new IllegalArgumentException(msg);\n      }\n      proxyConfigBuilder.username(proxyUsername);\n      proxyConfigBuilder.password(proxyPassword);\n      proxyConfigBuilder.ntlmDomain(conf.getTrimmed(PROXY_DOMAIN));\n      proxyConfigBuilder.ntlmWorkstation(conf.getTrimmed(PROXY_WORKSTATION));\n      if (LOG.isDebugEnabled()) {\n        LOG.debug(\"Using proxy server {}:{} as user {} with password {} on \"\n                + \"domain {} as workstation {}\", proxyHost, proxyPort, proxyUsername, proxyPassword,\n            PROXY_DOMAIN, PROXY_WORKSTATION);\n      }\n    } else if (proxyPort >= 0) {\n      String msg =\n          \"Proxy error: \" + PROXY_PORT + \" set without \" + PROXY_HOST;\n      LOG.error(msg);\n      throw new IllegalArgumentException(msg);\n    }\n\n    return proxyConfigBuilder.build();\n\n  }\n\n  /**\n   * Configures the proxy for the async http client.\n   * <p>\n   * Although this is netty specific, it is part of the AWS SDK public API\n   * and not any shaded netty internal class.\n   * @param conf The Hadoop configuration\n   * @param bucket Optional bucket to use to look up per-bucket proxy secrets\n   * @return Proxy configuration\n   * @throws IOException on any IO problem\n   */\n  public static software.amazon.awssdk.http.nio.netty.ProxyConfiguration\n      createAsyncProxyConfiguration(Configuration conf,","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/impl/AWSClientConfig.java#L257-L293","documentation":"IllegalArgumentException from AWSClientConfig's sync proxy setup when fs.s3a.proxy.port is configured (proxyPort >= 0) but fs.s3a.proxy.host is not set (the host branch was skipped, so the else-if on the port fires). A port without a host cannot describe a proxy endpoint, so client construction aborts before any S3 request is made.","triggerScenarios":"Initializing an S3A client on a node whose configuration sets fs.s3a.proxy.port (e.g. 8080) but leaves fs.s3a.proxy.host empty.","commonSituations":"Template config sets a shared port while the per-cluster host variable was never substituted; host key misspelled or placed under the wrong XML property; host removed when moving off a proxy but port left behind.","solutions":["Set fs.s3a.proxy.host to the proxy hostname alongside the port","Or remove fs.s3a.proxy.port entirely if no proxy should be used","Check for typos and per-bucket overrides of the host key in core-site.xml"],"exampleFix":"<!-- before -->\n<property><name>fs.s3a.proxy.port</name><value>8080</value></property>\n\n<!-- after -->\n<property><name>fs.s3a.proxy.host</name><value>proxy.corp</value></property>\n<property><name>fs.s3a.proxy.port</name><value>8080</value></property>","handlingStrategy":"validation","validationCode":"String host = conf.getTrimmed(\"fs.s3a.proxy.host\");\nint port = conf.getInt(\"fs.s3a.proxy.port\", -1);\nif (port >= 0 && (host == null || host.isEmpty())) {\n  throw new IllegalArgumentException(\"fs.s3a.proxy.port set without fs.s3a.proxy.host\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep proxy host and port as one config unit in templates","Lint cluster configs for half-configured proxy pairs (host-only is tolerated, port-only is fatal)","Remove both keys together when decommissioning a proxy"],"tags":["s3a","proxy","configuration"],"backgroundTag":"proxy-misconfiguration","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}