pg.ddx.io  aws/aws-advanced-jdbc-wrapper GitHub issues and pull requests  
help / color / mirror / Atom feed
[aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
8+ messages / 2 participants
[nested] [flat]

* [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
@ 2026-11-15 20:54 "driedelreply (@driedelreply)" <noreply+driedelreply@github.com>
  0 siblings, 0 replies; 8+ messages in thread

From: driedelreply (@driedelreply) @ 2026-11-15 20:54 UTC (permalink / raw)
  To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>

### Describe the bug

Since 4.6.0, `AuroraPgDialect.prepareConnectProperties` appends
`-c aurora.connection_str=_d:aws_jdbc_wrapper,_v:<version>,_p:<plugin codes>` to the `options` connection property
(PR #1432, CHANGELOG 4.6.0: "Added the wrapper version and effective plugin codes to Aurora PostgreSQL connection
metadata"). RDS Proxy refuses a PostgreSQL startup packet that carries command-line options, so behind an RDS Proxy
endpoint every connection made with the Aurora PostgreSQL dialect fails. There is no property to turn the option off.

The first connection of a JVM still succeeds, which hides the problem from a quick connectivity check:
`DialectManager` starts an RDS Proxy host name on `RDS_PG`, whose `prepareConnectProperties` does nothing; it then
identifies Aurora on that connection and caches `AURORA_PG` for the URL in `knownEndpointDialects`. From then on,
every new connection goes through `AuroraPgDialect.prepareConnectProperties` and is refused.

### Expected Behavior

Connections through RDS Proxy keep working as they did in 4.5.0.

### What plugins are used? What other connection properties were set?

wrapperPlugins=iam, sslmode=verify-full, sslrootcert; no wrapperDialect (detected). HikariCP pool.

### Current Behavior

The first connection succeeds. Every later connection from the same JVM fails:

```
FATAL: Feature not supported: RDS Proxy currently doesn't support command-line options.
```

### Reproduction Steps

Through RDS Proxy:

1. Aurora PostgreSQL (16.13) behind an RDS Proxy, with IAM authentication.
2. URL `jdbc:aws-wrapper:postgresql://<proxy-name>.proxy-<id>.<region>.rds.amazonaws.com:5432/<db>?wrapperPlugins=iam&sslmode=verify-full`, with no `wrapperDialect`.
3. Open and close one connection: it succeeds. Open a second one in the same JVM: it is refused with the error above.
   With 4.5.0, both succeed.

Without AWS, plain PostgreSQL shows the option arriving. PostgreSQL accepts a dotted custom setting where RDS Proxy refuses it:

```java
String url = "jdbc:aws-wrapper:postgresql://localhost:5432/postgres?wrapperPlugins=&wrapperDialect=aurora-pg";
try (Connection c = DriverManager.getConnection(url, "postgres", "postgres");
     ResultSet rs = c.createStatement().executeQuery("select current_setting('aurora.connection_str', true)")) {
  rs.next();
  System.out.println(rs.getString(1)); // 4.6.0: _d:aws_jdbc_wrapper,_v:4.6.0,_p:   4.5.0: null
}
```

### Possible Solution

Either of these would fix it:
- Do not add the option when the host is an RDS Proxy endpoint. `RdsUtils.isRdsProxyDns` already recognises those host names.
- Add a connection property that turns the connection metadata off. This also covers a proxy reached under a custom DNS name.

### Additional Information/Context

Workaround: we stay on 4.5.0. `main` still has the same code in `AuroraPgDialect`.

### The AWS Advanced JDBC Wrapper version used

4.6.0

### JDK version used

21 (AWS Lambda java21 runtime)

### Operating System and version

Amazon Linux 2023 (AWS Lambda)


^ permalink  raw  [nested|flat] 8+ messages in thread

* Re: [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
@ 2026-11-16 16:21 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
  6 siblings, 0 replies; 8+ messages in thread

From: sergiyvamz (@sergiyvamz) @ 2026-11-16 16:21 UTC (permalink / raw)
  To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>

Hi @driedelreply,

Thanks for the detailed report. We confirmed it on `main`: since 4.6.0, `AuroraPgDialect` always adds `-c aurora.connection_str=...` to `options`, and RDS Proxy refuses connections that carry command-line options.

Until a fix is available, you can stay on 4.6.0 by setting the dialect explicitly:

```
wrapperDialect=rds-pg
```

When `wrapperDialect` is set, the wrapper uses that dialect as-is and doesn't switch it to Aurora PostgreSQL after connecting. The RDS PostgreSQL dialect doesn't add the `options` value. Your setup only uses the `iam` plugin through the proxy, and the proxy hides the cluster topology anyway, so you shouldn't lose any functionality. Staying on 4.5.0 also works, as you mentioned.

Both of your suggested fixes make sense. One is to skip the option for RDS Proxy hosts. The other is a property that turns the connection metadata off, which would also cover a proxy behind a custom DNS name. We'll update this issue when a fix lands.

Could you let us know whether the `wrapperDialect=rds-pg` workaround works for you?

Thank you!


^ permalink  raw  [nested|flat] 8+ messages in thread

* Re: [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
@ 2026-11-16 16:22 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
  6 siblings, 0 replies; 8+ messages in thread

From: sergiyvamz (@sergiyvamz) @ 2026-11-16 16:22 UTC (permalink / raw)
  To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>

@sergiyvamz applied label "bug".

^ permalink  raw  [nested|flat] 8+ messages in thread

* Re: [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
@ 2026-11-16 16:51 ` "driedelreply (@driedelreply)" <noreply+driedelreply@github.com>
  6 siblings, 0 replies; 8+ messages in thread

From: driedelreply (@driedelreply) @ 2026-11-16 16:51 UTC (permalink / raw)
  To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>

Thanks for confirming, and for the workaround.

We haven't tried `wrapperDialect=rds-pg`, so we can't confirm it works. We're staying on 4.5.0 until the fix is released. We'll test it through RDS Proxy then and comment here.


^ permalink  raw  [nested|flat] 8+ messages in thread

* Re: [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
@ 2026-11-19 16:38 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
  6 siblings, 0 replies; 8+ messages in thread

From: sergiyvamz (@sergiyvamz) @ 2026-11-19 16:38 UTC (permalink / raw)
  To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>

@sergiyvamz applied label "pending release".

^ permalink  raw  [nested|flat] 8+ messages in thread

* Re: [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
@ 2026-11-19 23:42 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
  6 siblings, 0 replies; 8+ messages in thread

From: sergiyvamz (@sergiyvamz) @ 2026-11-19 23:42 UTC (permalink / raw)
  To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>

Hi @driedelreply,

The fix is now released in [4.7.0](https://github.com/aws/aws-advanced-jdbc-wrapper/releases/tag/4.7.0) (#2252). The wrapper no longer sends connection metadata to RDS Proxy endpoints, so connections through the proxy work as they did in 4.5.0.

4.7.0 also adds the `enableConnectionMetadata` property. If your RDS Proxy is behind a custom DNS name, the wrapper can't recognize it as a proxy, so set `enableConnectionMetadata=false` in that case.

Could you let us know how it works with your RDS Proxy setup? We'll close this issue once you confirm, or in a couple of weeks if we don't hear back.

Thank you!


^ permalink  raw  [nested|flat] 8+ messages in thread

* Re: [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
@ 2026-11-19 23:42 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
  6 siblings, 0 replies; 8+ messages in thread

From: sergiyvamz (@sergiyvamz) @ 2026-11-19 23:42 UTC (permalink / raw)
  To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>

@sergiyvamz removed label "pending release".

^ permalink  raw  [nested|flat] 8+ messages in thread

* Re: [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options")
@ 2026-11-19 23:43 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
  6 siblings, 0 replies; 8+ messages in thread

From: sergiyvamz (@sergiyvamz) @ 2026-11-19 23:43 UTC (permalink / raw)
  To: aws/aws-advanced-jdbc-wrapper <noreply+aws-aws-advanced-jdbc-wrapper@github.com>

@sergiyvamz closed this.

^ permalink  raw  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2026-11-19 23:43 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-11-15 20:54 [aws/aws-advanced-jdbc-wrapper] issue #2240: 4.6.0: connections through RDS Proxy are refused after the first ("RDS Proxy currently doesn't support command-line options") "driedelreply (@driedelreply)" <noreply+driedelreply@github.com>
2026-11-16 16:21 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
2026-11-16 16:22 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
2026-11-16 16:51 ` "driedelreply (@driedelreply)" <noreply+driedelreply@github.com>
2026-11-19 16:38 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
2026-11-19 23:42 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
2026-11-19 23:42 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>
2026-11-19 23:43 ` "sergiyvamz (@sergiyvamz)" <noreply+sergiyvamz@github.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox