Hi Lidi
how do i get debug logs? what location they are saved at?
I have done following and i dont see any extra information on stdout
#server side terminal
root@fmx216:~/gRPC/grpc/examples/python/helloworld# GRPC_VERBOSITY=DEBUG
root@fmx216:~/gRPC/grpc/examples/python/helloworld#
GRPC_TRACE=api,channel,call_error,connectivity_state,http,server_channel
root@fmx216:~/gRPC/grpc/examples/python/helloworld# python greeter_server.py
#client side terminal
root@fmx216:~/gRPC/grpc/examples/python/helloworld# GRPC_VERBOSITY=DEBUG
root@fmx216:~/gRPC/grpc/examples/python/helloworld#
GRPC_TRACE=api,channel,call_error,connectivity_state,http,server_channel
root@fmx216:~/gRPC/grpc/examples/python/helloworld# python greeter_client.py
Traceback (most recent call last):
File "greeter_client.py", line 35, in <module>
run()
File "greeter_client.py", line 30, in run
response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 533,
in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py", line 467,
in _end_unary_response_blocking
raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNAVAILABLE
details = "Socket closed"
debug_error_string =
"{"created":"@1541799229.437917379","description":"Error received from
peer","file":"src/core/lib/surface/call.cc","file_line":1017,"grpc_message":"Socket
closed","grpc_status":14}"
>
root@fmx216:~/gRPC/grpc/examples/python/helloworld#
thanks
Ankit
On Friday, November 9, 2018 at 11:52:45 AM UTC-8, [email protected] wrote:
>
> Hi Ankit,
>
> There is one more thing I would like to try. Can you provide the detailed
> tracing log for the example server and client?
> The trace and debug logs can be turned on by setting environment variables.
>
> $ GRPC_VERBOSITY=DEBUG
> GRPC_TRACE=api,channel,call_error,connectivity_state,http,server_channel
> python greeter_server.py
> $ GRPC_VERBOSITY=DEBUG
> GRPC_TRACE=api,channel,call_error,connectivity_state,http,server_channel
> python greeter_client.py
>
> Thank you for helping us solve this issue.
>
> Lidi Zheng
>
> On Friday, November 9, 2018 at 10:00:33 AM UTC-8, [email protected]
> wrote:
>>
>> Hi Lidi
>>
>> $ python -m SimpleHTTPServer 8000
>> $ curl http://localhost:8000 *Works.*
>>
>>
>> $ nc -6 -l 1234 # in one terminal
>> $ echo 'Hello' | nc localhost 1234 # in another terminal
>> # The 'Hello' should appear in the first terminal *Works.*
>>
>>
>> # Check your gRPC Python version
>> $ pip show grpcio
>>
>> ---
>> Metadata-Version: 2.1
>> Name: grpcio
>> Version: 1.16.0
>> Summary: HTTP/2-based RPC framework
>> Home-page: https://grpc.io
>> Author: The gRPC Authors
>> Author-email: [email protected]
>> Installer: pip
>> License: Apache License 2.0
>> Location: /usr/local/lib/python2.7/dist-packages
>> Requires: six, enum34, futures
>> Classifiers:
>> Development Status :: 5 - Production/Stable
>> Programming Language :: Python
>> Programming Language :: Python :: 2
>> Programming Language :: Python :: 2.7
>> Programming Language :: Python :: 3
>> Programming Language :: Python :: 3.4
>> Programming Language :: Python :: 3.5
>> Programming Language :: Python :: 3.6
>> License :: OSI Approved :: Apache Software License
>>
>> i am still not able to make it work :(
>>
>> thanks
>> Ankit
>>
>>
>> On Thursday, November 8, 2018 at 2:50:56 PM UTC-8, [email protected]
>> wrote:
>>>
>>> Hi Ankit,
>>>
>>> Sorry to hear that none of the fixes work for you. If the server is
>>> started and able to bind tcp port, there is a great chance that this might
>>> due to some local network setting.
>>>
>>> To detect whether there is a local network issue or gRPC Python issue,
>>> can you try to start other applications that bind a port and try to
>>> communicate with it?
>>>
>>> For example, you can try:
>>>
>>> $ python -m SimpleHTTPServer 8000
>>> $ curl http://localhost:8000
>>> # Or visit this address in browser, it should show up a valid HTML web
>>> page
>>>
>>> or
>>>
>>> $ nc -6 -l 1234 # in one terminal
>>> $ echo 'Hello' | nc localhost 1234 # in another terminal
>>> # The 'Hello' should appear in the first terminal
>>>
>>> If one of those work, then there might be some issue with gRPC Python.
>>> If so, can you provide your gRPC Python version as well?
>>> # Check your gRPC Python version
>>> $ pip show grpcio
>>>
>>> Bests,
>>> Lidi
>>>
>>>
>>> On Thursday, November 8, 2018 at 9:18:32 AM UTC-8, [email protected]
>>> wrote:
>>>>
>>>> Hi Lidi
>>>>
>>>> greeterserver.py is running on a terminal from other terminal i can see
>>>> that port 50051 is bound to python
>>>> # lsof -i :50051
>>>> COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
>>>> python 18126 root 6u IPv6 32226 0t0 TCP *:50051 (LISTEN)
>>>> root@fmx215:~/gRPC/grpc/examples/python/helloworld#
>>>>
>>>> I am behind corporate proxy; but i think they are working fine since I
>>>> am able to reach ernal internet as well as reach to nodes on internal
>>>> network
>>>> i am not sure if corporate proxy would alter or redirect any traffic
>>>> here.
>>>>
>>>>
>>>> following is my /etc/hosts file
>>>> 127.0.0.1 localhost
>>>> 127.0.1.1 fmx215.xx.xxx.com fmx215
>>>>
>>>> # The following lines are desirable for IPv6 capable hosts
>>>> ::1 localhost ip6-localhost ip6-loopback
>>>> ff02::1 ip6-allnodes
>>>> ff02::2 ip6-allrouters
>>>>
>>>> I am still unable to get this example working. please let me know what
>>>> else i can check or do to make it working
>>>>
>>>> thanks
>>>> Ankit
>>>> On Wednesday, November 7, 2018 at 4:40:59 PM UTC-8, [email protected]
>>>> wrote:
>>>>>
>>>>> Hi Ankit,
>>>>>
>>>>> After the greeter_server.py started, have you observed the port 50051
>>>>> been bound in your system? Also, have you use any sort of VPN or local
>>>>> proxy that may redirect the traffic? One more check, is there a loopback
>>>>> entry for 'localhost' in your /etc/hosts?
>>>>>
>>>>> Lidi
>>>>>
>>>>> On Wednesday, November 7, 2018 at 4:26:48 PM UTC-8,
>>>>> [email protected] wrote:
>>>>>>
>>>>>> I have ubuntu server system
>>>>>>
>>>>>> #lsb_release -a
>>>>>> Distributor ID: Ubuntu
>>>>>> Description: Ubuntu 16.04.5 LTS
>>>>>> Release: 16.04
>>>>>> Codename: xenial
>>>>>>
>>>>>> #uname -a
>>>>>> Linux fmx215 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4
>>>>>> 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>>>>>>
>>>>>> I am trying to run python quick start example step by step as
>>>>>> explained on https://grpc.io/docs/quickstart/python.html
>>>>>> <https://grpc.io/docs/quickstart/python.html>
>>>>>>
>>>>>> greeter_server.py runs without any error and wait for
>>>>>> greeter_client.py
>>>>>>
>>>>>> while running greeter_client.py it fails.
>>>>>>
>>>>>> # python greeter_client.py
>>>>>> Traceback (most recent call last):
>>>>>> File "greeter_client.py", line 35, in <module>
>>>>>> run()
>>>>>> File "greeter_client.py", line 30, in run
>>>>>> response = stub.SayHello(helloworld_pb2.HelloRequest(name='you'))
>>>>>> File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py",
>>>>>> line 533, in __call__
>>>>>> return _end_unary_response_blocking(state, call, False, None)
>>>>>> File "/usr/local/lib/python2.7/dist-packages/grpc/_channel.py",
>>>>>> line 467, in _end_unary_response_blocking
>>>>>> raise _Rendezvous(state, None, None, deadline)
>>>>>> grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
>>>>>> status = StatusCode.UNAVAILABLE
>>>>>> details = "Socket closed"
>>>>>> debug_error_string =
>>>>>> "{"created":"@1541634693.250829735","description":"Error received from
>>>>>> peer","file":"src/core/lib/surface/call.cc","file_line":1017,"grpc_message":"Socket
>>>>>>
>>>>>> closed","grpc_status":14}"
>>>>>>
>>>>>>
>>>>>> https://stackoverflow.com/questions/53129263/run-grpc-python-example-must-use-sudo-command
>>>>>>
>>>>>> <https://stackoverflow.com/questions/53129263/run-grpc-python-example-must-use-sudo-command>seem
>>>>>>
>>>>>> to be same issue but adding "sudo" doesn't help me. I am already running
>>>>>> this exercise as root
>>>>>>
>>>>>> I have checked system using "netstat" and "lsof" and port 50051 is
>>>>>> not used by any process.
>>>>>>
>>>>>> can you help me in running this quick start example without any
>>>>>> errors.
>>>>>>
>>>>>> thank you
>>>>>> Ankit
>>>>>>
>>>>>
--
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/6e83020c-2487-4e00-acfc-63734c760e8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.