GAE apps that expose a gRPC service is not supported at this time, but they
can be clients that talk to gRPC services. I think there may have been some
miscommunication in the original thread. I found some information about
hosting gRPC services in Google Compute Engine, which may be a possible
alternative for you:
https://cloud.google.com/endpoints/docs/grpc/get-started-grpc-compute-engine-docker


On Tue, Sep 26, 2017 at 1:00 AM, <[email protected]> wrote:

> I can successfully access servlets using this address, firewall rules -
> allow full range of IPs.
>
> Should i configure a host name in `NettyServerBuilder` explicitly?
>
>
> On Monday, September 25, 2017 at 9:01:53 PM UTC+3, Kun Zhang wrote:
>>
>> Have you confirmed that this address is indeed connectable, e.g., allowed
>> by firewall?
>>
>> On Monday, September 25, 2017 at 4:54:57 AM UTC-7, [email protected]
>> wrote:
>>>
>>>
>>> I am configuring gRPC according to the answer
>>> <https://stackoverflow.com/a/46332600/8634992>, which says: "Using gRPC
>>> with GAE Java 8 doesn't need anything special.".
>>>
>>> A gRPC server is started and deployed on a GAE Standard environment for
>>> Java 8:
>>>
>>> ------------------------------------------------------------
>>> ------------------------------------------------------------
>>> -----------------
>>> MyGrpcService service = ...
>>> NettyServerBuilder.forPort(50051).addService(service).build();
>>> ------------------------------------------------------------
>>> ------------------------------------------------------------
>>> -----------------
>>>
>>> A client uses a service with the ManagedChannel:
>>>
>>> ------------------------------------------------------------
>>> ------------------------------------------------------------
>>> -----------------
>>> ManagedChannel channel = NettyChannelBuilder.forAddress("
>>> my-project.appspot.com", 50051)
>>>
>>>        .usePlaintext(true)
>>>
>>>        .build();
>>> MyGrpcService.newBlockingStub(channel);
>>> ------------------------------------------------------------
>>> ------------------------------------------------------------
>>> -----------------
>>>
>>> What am I doing wrong? The call to the service has the following result:
>>>
>>> ------------------------------------------------------------
>>> ------------------------------------------------------------
>>> -----------------
>>> Exception in thread "main" io.grpc.StatusRuntimeException: UNAVAILABLE
>>> at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCall
>>> s.java:210)
>>> at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:191)
>>> at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:124)
>>> at io.spine.client.grpc.QueryServiceGrpc$QueryServiceBlockingSt
>>> ub.read(QueryServiceGrpc.java:159)
>>> at io.spine.examples.todolist.client.CommandLineTodoClient.getM
>>> yListView(CommandLineTodoClient.java:189)
>>> at io.spine.examples.todolist.view.MyTasksListView.render(MyTas
>>> ksListView.java:68)
>>> at io.spine.cli.AbstractScreen.renderView(AbstractScreen.java:63)
>>> at io.spine.cli.action.TransitionAction.execute(TransitionActio
>>> n.java:51)
>>> at io.spine.cli.view.AbstractView.executeAction(AbstractView.java:108)
>>> at io.spine.cli.view.AbstractView.render(AbstractView.java:92)
>>> at io.spine.cli.AbstractScreen.renderView(AbstractScreen.java:63)
>>> at io.spine.cli.action.TransitionAction.execute(TransitionActio
>>> n.java:51)
>>> at io.spine.cli.view.AbstractView.executeAction(AbstractView.java:108)
>>> at io.spine.cli.view.AbstractView.render(AbstractView.java:92)
>>> at io.spine.cli.AbstractScreen.renderView(AbstractScreen.java:63)
>>> at io.spine.examples.todolist.ClientApplication.run(ClientAppli
>>> cation.java:52)
>>> at io.spine.examples.todolist.GaeClient.main(GaeClient.java:39)
>>> Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException:
>>> Connection timed out: no further information:
>>> spine-dev.appspot.com/216.58.209.84:50051
>>> at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
>>> at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl
>>> .java:717)
>>> at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect
>>> (NioSocketChannel.java:352)
>>> at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fi
>>> nishConnect(AbstractNioChannel.java:340)
>>> at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEven
>>> tLoop.java:633)
>>> at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimiz
>>> ed(NioEventLoop.java:580)
>>> at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEve
>>> ntLoop.java:497)
>>> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
>>> at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(
>>> SingleThreadEventExecutor.java:858)
>>> at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnabl
>>> eDecorator.run(DefaultThreadFactory.java:138)
>>> at java.lang.Thread.run(Thread.java:745)
>>> Caused by: java.net.ConnectException: Connection timed out: no further
>>> information
>>> ... 11 more
>>> ------------------------------------------------------------
>>> ------------------------------------------------------------
>>> -----------------
>>>
>> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/b57053e6-ad34-4ac4-bb4c-f173b7ef18e6%40googlegroups.com
> <https://groups.google.com/d/msgid/grpc-io/b57053e6-ad34-4ac4-bb4c-f173b7ef18e6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Spencer Fang

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAK%3D-x_5xSKjp1jRQ0MWz19SFqMAx5xPzJ8%2Bj0aznbUzhwYxymg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to