Skip to content

Commit

Permalink
Merge #68281
Browse files Browse the repository at this point in the history
68281: roachtest: use port outside ephemeral range for `acceptance/multitenant` r=stevendanna a=erikgrinaker

`acceptance/multitenant` starts a tenant server listening on port 36258.
This port number falls within Linux' default ephemeral port range of
32768-60999 (see `/proc/sys/net/ipv4/ip_local_port_range`) which TCP
clients pick source ports from when establishing outbound connections.
This can cause the server to attempt to bind to a port already being
used for a client connection, preventing server startup and failing the
test (as seen in #68250).

This patch changes the port number to the arbitrarily chosen 30258
outside of the ephemeral port range, thus avoiding these collisions.

Resolves #68250.

Release note: None

Co-authored-by: Erik Grinaker <grinaker@cockroachlabs.com>
  • Loading branch information
craig[bot] and erikgrinaker committed Aug 2, 2021
2 parents c283f9a + 54291db commit 2317cc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cmd/roachtest/tests/multitenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func runAcceptanceMultitenant(ctx context.Context, t test.Test, c cluster.Cluste
defer cancel()
const (
tenantHTTPPort = 8081
tenantSQLPort = 36258
tenantSQLPort = 30258
)
const tenantNode = 1
tenant := createTenantNode(tenantCtx, t, c, "./cockroach", kvAddrs,
Expand Down

0 comments on commit 2317cc8

Please sign in to comment.