[grpc-io] keep channel alive without activity

2022-01-09 Thread Rajat Goyal
Hi, 

 We have a system where clients open bi-directional grpc stream to ALB, 
which proxies to one of active server. So 

 bi-di 
client <>  ALB  <> server

In-case of any failure of connection, clients re-connects to us as we want 
to keep a bi-di channel open. 

Question is : How can we keep the channel open even if there is no activity 
for sometime. ALB are configured with 300 sec idle-timeout which means it 
will drop the connection if no packets are exchanged in 300 sec. 

As we want to keep the connection open as much possible ( only re-create 
in-case of any issue),  and not let it die due to idle timeout, what 
properties should server can client set ?
Should keep-alive setting at both client & server help out ? 


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/532f5551-e978-467e-b71c-0031a54953bfn%40googlegroups.com.


[grpc-io] Re: ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.33' not found

2022-01-09 Thread Inovosystems Software company
same issue here for hrs  any work around that does not involve 
reinstalling OS 

On Thursday, 02 December 2021 at 19:19:39 UTC+2 Antonio Orozco wrote:

> This was not resolved. I just re-installed Ubuntu on a 
> RaspberryPi instead. I noticed that there's a new version of Debian for the 
> RaspberryPi (Based on Debian version 11-bullseye), it might work now but 
> I have not tried.
> Unfortunately, it seems like Google PubSub python package is just 
> incompatible with *Debian GLIBC 2.28*
>
> On Wednesday, December 1, 2021 at 11:20:10 AM UTC-8 Dayton Turner wrote:
>
>> Same, I'm also just running into this and looking for a solution too! 
>> please let us know if you figure it out!
>>
>> On Tuesday, 30 November 2021 at 21:15:53 UTC-8 jeremy scott wrote:
>>
>>> I'm having the same exact issue. Did this issue ever get resolved?
>>>
>>>
>>> On Wednesday, October 27, 2021 at 8:44:54 PM UTC-7 Antonio Orozco wrote:
>>>
 This is the first time trying to use google pub/sub python package.

 Command that I used to install:
 python3 -m pip --no-cache-dir install grpcio

 I tried many other ways, all yield the same result. "sudo pip3..", 
 "sudo pip...", "pip3 ...", "pip..."
 It works perfectly on Ubuntu 20.04.
 Looking in indexes: https://pypi.org/simple, 
 https://www.piwheels.org/simple
 Collecting grpcio
   Downloading 
 https://files.pythonhosted.org/packages/9e/68/721d94afa6fea6c559b1d795d2bae0147b3db9b43f4069d392371a2b8cab/grpcio-1.41.1-cp37-cp37m-linux_armv7l.whl
  
 (47.9MB)
 100% || 48.0MB 12.8MB/s
 Requirement already satisfied: six>=1.5.2 in 
 ./.local/lib/python3.7/site-packages (from grpcio) (1.16.0)
 Installing collected packages: grpcio
 Successfully installed grpcio-1.41.1

 ldd --version
 ldd (*Debian GLIBC 2.28-10+rpt2+rpi1*) 2.28
 Copyright (C) 2018 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is 
 NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 PURPOSE.
 Written by Roland McGrath and Ulrich Drepper.

 On Wednesday, October 27, 2021 at 10:21:07 AM UTC-7 rbel...@google.com 
 wrote:

>
> How did you install grpcio? If you used pip install grpcio, can you 
> please include the installation logs?
>
> Did this work on previous versions?
> On Monday, October 25, 2021 at 8:33:16 PM UTC-7 Antonio Orozco wrote:
>
>> Traceback (most recent call last):
>>   File "fpl_notifications.py", line 4, in 
>> *from google.cloud import pubsub_v1*
>>   File 
>> "/home/antonio/.local/lib/python3.7/site-packages/google/cloud/pubsub_v1/__init__.py",
>>  
>> line 17, in 
>> from google.cloud.pubsub_v1 import types
>>   File 
>> "/home/antonio/.local/lib/python3.7/site-packages/google/cloud/pubsub_v1/types.py",
>>  
>> line 25, in 
>> from google.api_core import gapic_v1
>>   File 
>> "/home/antonio/.local/lib/python3.7/site-packages/google/api_core/gapic_v1/__init__.py",
>>  
>> line 16, in 
>> from google.api_core.gapic_v1 import config
>>   File 
>> "/home/antonio/.local/lib/python3.7/site-packages/google/api_core/gapic_v1/config.py",
>>  
>> line 23, in 
>> import grpc
>>   File 
>> "/home/antonio/.local/lib/python3.7/site-packages/grpc/__init__.py", 
>> line 
>> 22, in 
>> from grpc import _compression
>>   File 
>> "/home/antonio/.local/lib/python3.7/site-packages/grpc/_compression.py", 
>> line 15, in 
>> from grpc._cython import cygrpc
>> *ImportError: /lib/arm-linux-gnueabihf/libc.so.6: version 
>> `GLIBC_2.33' not found* (required by 
>> /home/antonio/.local/lib/python3.7/site-packages/grpc/_cython/
>> cygrpc.cpython-37m-arm-linux-gnueabihf.so)
>>
>> On Monday, October 25, 2021 at 8:22:28 PM UTC-7 Antonio Orozco wrote:
>>
>>> Hello,
>>>
>>> Running into the following issue on a Raspberry Pi 4
>>>
>>> $ lsb_release -a
>>> No LSB modules are available.
>>> Distributor ID: Raspbian
>>> Description:Raspbian GNU/Linux 10 (buster)
>>> Release:10
>>> Codename:   buster
>>> $ uname -a
>>> Linux liverpool 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 
>>> armv7l GNU/Linux
>>>
>>>
>>> Python 3.7.3 (default, Jan 22 2021, 20:04:44)
>>> [GCC 8.3.0] on linux
>>> Type "help", "copyright", "credits" or "license" for more 
>>> information.
>>> >>> from grpc._cython import cygrpc
>>> Traceback (most recent call last):
>>>   File "", line 1, in 
>>>   File 
>>> "/home/antonio/.local/lib/python3.7/site-packages/grpc/__init__.py", 
>>> line 
>>> 22, in 
>>> from grpc import _compression
>>>   File 
>>> 

[grpc-io] Re: c++ Callback API

2022-01-09 Thread Viktor Khristenko
I think, i've misunderstood the spec slightly and also checked examples 
(e.g. route_guide callback client/server). noting here for reference

to answer my question (rephrased slightly):
if one has no holds and one calls StartWrite (outside of a reactor) in an 
app thread and OnDone() is called by grpc library thread - this is 
possible... and 
from what i understand the spec __does not__ say anything about this 
situation - I mean to me not clear what happens...! 
The suggested way to avoid it in here is to add a hold before StartCall and 
remove it when onWriteDone returns not ok.  

1 thing, for me was not clear, given the spec says "the above calls may 
take place concurrently, except that `OnDone` will always take place after 
all other reactions"
what this really means is that if u are __directly reading/writing__ from 
within a reactor, u do not need holds, u need them only if you are 
reading/writing from outside of the reactor... the client_callback.h even 
states that this is __not__ an common use of streaming api...  which is a 
bit strange to me, may be i'm biased... 

thanks!

VK

On Saturday, January 8, 2022 at 8:16:44 PM UTC+1 Viktor Khristenko wrote:

> Hello,
>
> I'm using c++ callback api, specified here: 
> https://github.com/grpc/proposal/pull/180/files
>
> i have 1 question about client (in particular, but i would guess this is 
> more general) side, streaming write reactor.
>
> client streaming write reactor has these (among others) methods:
> - StartCall
> - OnDone
>
> Spec says that "No further RPC operations are permitted to be issued 
> after `OnDone` is invoked". question: What happens when you have
> - 1 thread doing StartCall on a reactor, with subsequent StartWrite
> - OnDone was called on the same reactor but from a different thread.
>
> Thanks a lot for any insight!
>
> VK
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/234df7ac-8c2e-4d68-806c-746bfa9e25c0n%40googlegroups.com.