Custom Endpoint

666 views
Skip to first unread message

Robert Bielik

unread,
Oct 6, 2016, 2:19:29 AM10/6/16
to grpc.io
Hi all,

We have a customer for which the TCP endpoint seems not to work on their platform (ARMV7a based Linux), weird as that might be. So I'd like to look at implementing a custom endpoint to be used instead in such cases.

Question is if there are examples for this ?

Regards
/Robert

Nicolas Noble

unread,
Oct 6, 2016, 2:22:11 PM10/6/16
to Robert Bielik, grpc.io
Before getting to the custom endpoint stuff, may I ask why the normal code doesn't work ? Maybe some subtle alterations to the current code might help. We haven't tested on every single flavor of Linux around, so maybe there's an oversight.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.
To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/047dae09-b5d9-4863-b062-eff5c3e75ce1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Bielik

unread,
Oct 7, 2016, 5:05:17 AM10/7/16
to Nicolas Noble, grpc.io
Hi Nicolas,

I ran our server with grpc log out, and there is an error:

E0102 11:50:32.543620000    2923 tcp_server_posix.c:147]     check for SO_REUSEPORT: {"created":"@129032.543473000","description":"SO_REUSEPORT unavailable on compiling system","file":"/home/osboxes/code/git/test/server/externals/grpc/src/core/lib/iomgr/socket_utils_common_posix.c","file_line":175}

I would expect this is the error, have no clue what it means :)

gRPC version is: 0.14.0

Regards
/Robert

Craig Tiller

unread,
Oct 7, 2016, 8:59:51 AM10/7/16
to Robert Bielik, Nicolas Noble, grpc.io

How long until you can move to 1.0?

Either way you should be able to squelch this error by setting the channel arg GRPC_ARG_ALLOW_REUSEPORT to 0.


On Fri, Oct 7, 2016, 2:05 AM Robert Bielik <robert...@gmail.com> wrote:
Hi Nicolas,

I ran our server with grpc log out, and there is an error:

E0102 11:50:32.543620000    2923 tcp_server_posix.c:147]     check for SO_REUSEPORT: {"created":"@129032.543473000","description":"SO_REUSEPORT unavailable on compiling system","file":"/home/osboxes/code/git/test/server/externals/grpc/src/core/lib/iomgr/socket_utils_common_posix.c","file_line":175}

I would expect this is the error, have no clue what it means :)

gRPC version is: 0.14.0

Regards
/Robert

2016-10-06 20:21 GMT+02:00 Nicolas Noble <pixel...@gmail.com>:
Before getting to the custom endpoint stuff, may I ask why the normal code doesn't work ? Maybe some subtle alterations to the current code might help. We haven't tested on every single flavor of Linux around, so maybe there's an oversight.
On Wed, Oct 5, 2016 at 11:19 PM, Robert Bielik <robert...@gmail.com> wrote:
Hi all,

We have a customer for which the TCP endpoint seems not to work on their platform (ARMV7a based Linux), weird as that might be. So I'd like to look at implementing a custom endpoint to be used instead in such cases.

Question is if there are examples for this ?

Regards
/Robert

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/047dae09-b5d9-4863-b062-eff5c3e75ce1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.

To post to this group, send email to grp...@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.

Robert Bielik

unread,
Oct 7, 2016, 10:09:52 AM10/7/16
to grpc.io, robert...@gmail.com, pixel...@gmail.com
Now that I see that there is added CMake support in v1.0.0, I'm heading there straight away!! :D

Craig Tiller

unread,
Oct 7, 2016, 10:19:38 AM10/7/16
to Robert Bielik, grpc.io, pixel...@gmail.com
Note that CMake is experimental and community supported at this point in time.

Robert Bielik

unread,
Oct 7, 2016, 10:24:19 AM10/7/16
to Craig Tiller, grpc.io
Yes, I got into trouble fairly quickly. First off is the requirement for Go. I'm only planning using unsecure transport, is it possible to exclude boringssl ?

To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.

Craig Tiller

unread,
Oct 7, 2016, 10:29:16 AM10/7/16
to Robert Bielik, grpc.io
With the Makefile it should be fairly trivial to just build the unsecure libs.

Robert Bielik

unread,
Oct 7, 2016, 10:31:43 AM10/7/16
to Craig Tiller, grpc.io
Yes, true, but my whole project is CMake based and getting the Makefile generated stuff together with the rest in a cross compilation environment is something I'd hoped to avoid...

To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscribe@googlegroups.com.

Nicolas Noble

unread,
Oct 7, 2016, 11:43:40 AM10/7/16
to Robert Bielik, grpc. io, Craig Tiller

Wait. The cmakefile itself doesn't require to have go. What's going on exactly? Is it the cmakefile of boringssl which requires it? Define gRPC_SSL_PROVIDER to none when calling or cmakefile and we won't include anything.


Robert Bielik

unread,
Oct 7, 2016, 12:14:05 PM10/7/16
to Nicolas Noble, grpc. io, Craig Tiller

Ok, I'm just beginning to scratch the grpc cmake surface. I have quite a few things to setup for v1.0 I see.

Robert Bielik

unread,
Oct 8, 2016, 2:02:01 AM10/8/16
to Nicolas Noble, grpc. io, Craig Tiller
In the boringssl CMakeLists.txt file:

if (NOT GO_EXECUTABLE)
  message(FATAL_ERROR "Could not find Go")
endif()

so, yes, the cmakelists build system requires Go.

Nicolas Noble

unread,
Oct 8, 2016, 2:05:15 AM10/8/16
to Robert Bielik, Nicolas Noble, grpc. io, Craig Tiller
As I said, you can skip boringssl by setting gRPC_SSL_PROVIDER to none.

Robert Bielik

unread,
Oct 8, 2016, 2:22:51 AM10/8/16
to Nicolas Noble, Nicolas Noble, grpc. io, Craig Tiller
Ok, I did "grep -r -i gRPC_SSL_PROVIDER ." but got no hits at all (I'm on tag v1.0.0) ?

Robert Bielik

unread,
Oct 8, 2016, 7:55:52 AM10/8/16
to Nicolas Noble, Nicolas Noble, grpc. io, Craig Tiller
I note that ALL CMake target_include_directories are marked PRIVATE. How are dependant targets going to pick up include directories ? Some of those need to be PUBLIC. Otherwise include directories won't propagate to the dependant targets.


Robert Bielik

unread,
Oct 10, 2016, 10:27:55 AM10/10/16
to grpc.io
Ok, I've now upgraded to gRPC v1.0.0, and with minor changes to the CMakeLists.txt file I could incorporate it into my project. That's the good news.

The bad news is that it has exactly the same problems as 0.14.0 with SO_REUSEPORT:

E0104 23:29:51.565182000    1223 tcp_server_posix.c:148]     check for SO_REUSEPORT: {"created":"@343791.565011000","description":"SO_REUSEPORT          lable on compiling system","file":"/home/osboxes/code/git/dutt/endpointserver/externals/grpc/src/core/lib/iomgr/socket_utils_common_posix.c","f          e":175}

and also:

E0104 23:30:49.135881000    1224 tcp_server_posix.c:395]     Failed accept4: Function not implemented

The first I "fixed" by adding -DSO_REUSEPORT=15 to the gRPC target (which is really a "hack"), and second one by commenting out row 213 of grpc/impl/codegen/port_platform.h

#define GPR_LINUX_SOCKETUTILS 1

so that GPR_POSIX_SOCKETUTILS gets defined instead.

Would be nice to get help to fix this properly.

Reply all
Reply to author
Forward
0 new messages