Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP Socket Keepalives running on osx not working #2729

Closed
stevesloka opened this issue Jul 24, 2020 · 6 comments · Fixed by #2735
Closed

TCP Socket Keepalives running on osx not working #2729

stevesloka opened this issue Jul 24, 2020 · 6 comments · Fixed by #2735
Assignees
Milestone

Comments

@stevesloka
Copy link
Member

Since adding TCP Socket keepalives in #2638 we cannot run Contour on a mac and Envoy in a cluster. Doing so reports the following errors:

[2020-07-24 20:04:14.576][26][error][main] [source/server/worker_impl.cc:49] failed to add listener on worker: cannot set post-listen socket option on socket: 0.0.0.0:8002
[2020-07-24 20:04:14.577][30][warning][connection] [source/common/network/socket_option_impl.cc:27] Setting 65535/8 option on socket failed: Protocol not available
[2020-07-24 20:04:14.577][30][error][main] [source/server/worker_impl.cc:49] failed to add listener on worker: cannot set post-listen socket option on socket: 0.0.0.0:8002

When running Contour inside the cluster, all works as expected.

@stevesloka stevesloka added the kind/regression Categorizes issue or PR as related to a regression from a prior release. label Jul 24, 2020
@stevesloka
Copy link
Member Author

Confirmed that everything works on a linux box fine, so it's specific to osx and the new TCP settings.

@jpeach
Copy link
Contributor

jpeach commented Jul 24, 2020

What OS is envoy running on?

@stevesloka
Copy link
Member Author

Contour running on my mac with Envoy running on Linux inside a kind cluster.

@jpeach
Copy link
Contributor

jpeach commented Jul 25, 2020

Oh I know, the problem is that the ordinal values for syscall.SOL_SOCKET, syscall.IPPROTO_TCPand syscall.SO_KEEPALIVE are not the same. We pass the Darwin values not the Linux values

@jpeach
Copy link
Contributor

jpeach commented Jul 25, 2020

This should be a blocker for 1.7 ... feel free to assign to me.

@jpeach jpeach removed the kind/regression Categorizes issue or PR as related to a regression from a prior release. label Jul 25, 2020
@stevesloka stevesloka added this to the 1.7.0 milestone Jul 25, 2020
@stevesloka
Copy link
Member Author

We pass the Darwin values not the Linux values

Yup! =)

jpeach added a commit to jpeach/contour that referenced this issue Jul 27, 2020
When programming the Envoy socket options, we need to use system call
constants for the platform that Envoy is running on. Ensure that we
always use Linux values since that is what we know (by fiat) that
Envoy is running on.

This fixes projectcontour#2729.

Signed-off-by: James Peach <jpeach@vmware.com>
stevesloka pushed a commit that referenced this issue Jul 27, 2020
When programming the Envoy socket options, we need to use system call
constants for the platform that Envoy is running on. Ensure that we
always use Linux values since that is what we know (by fiat) that
Envoy is running on.

This fixes #2729.

Signed-off-by: James Peach <jpeach@vmware.com>
tthebst pushed a commit to tthebst/contour that referenced this issue Aug 6, 2020
…#2735)

When programming the Envoy socket options, we need to use system call
constants for the platform that Envoy is running on. Ensure that we
always use Linux values since that is what we know (by fiat) that
Envoy is running on.

This fixes projectcontour#2729.

Signed-off-by: James Peach <jpeach@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants