우리는 분산 시스템 중 하나에서 이벤트가 발생하면 기존 주제에 간단하게 게시하려고합니다. 같은google.gax.errors.GaxError : GaxError RPC failed by ... StatusCode.UNAVAILABLE
코드는 같습니다 우리를 제외하고는 모든 잡아 다시 추적을 인쇄 할 경우
try:
dat = data.encode('utf-8')
topic.publish(dat)
except:
<code to recover>
, 우리가 얻을 :
google.gax.errors.GaxError: GaxError(RPC failed, caused by <_Rendezvous of RPC that terminated with (StatusCode.UNAVAILABLE, {"created":"@1478711654.067744009","description":"Secure read failed","file":"src/core/lib/security/transport/secure_endpoint.c","file_line":157,"grpc_status":14,"referenced_errors":[{"created":"@1478711654.067706801","description":"EOF","file":"src/core/lib/iomgr/tcp_posix.c","file_line":235}]})>
(아래 전체 오류)
보면 http://gcloud-python.readthedocs.io/en/latest/pubsub-topic.html#google.cloud.pubsub.topic.Topic.publish, 이건 GAX 오류가 아닌 것처럼 보입니다. 우리가 알아야 할 것이 있습니다. 그러나 을 수행 할 경우 오류를 catch하고 지수 백 오프를 사용하여 다시 시도하면 정상적으로 두 번째로 작동합니다.
나는 _gax_python
에서 잠정적 인 오류를 말하는 반면, 관련이없는 것 같습니다. 우리가 여기서 잘못하고있는 것에 대한 어떤 생각?
전체 오류 :
458 Traceback (most recent call last):
459 File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
460 self.run()
461 File "/usr/lib/python3.5/threading.py", line 862, in run
462 self._target(*self._args, **self._kwargs)
463 File "/home/pp/pp/pp/process/uploader.py", line 145, in upload_thread
464 topic.publish(byte_string)
465 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/google/cloud/pubsub/topic.py", line 257, in publish
466 message_ids = api.topic_publish(self.full_name, [message_data])
467 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/google/cloud/pubsub/_gax.py", line 165, in topic_publish
468 options=options)
469 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/google/cloud/gapic/pubsub/v1/publisher_api.py", line 289, in publish
470 return self._publish(request, options)
471 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/google/gax/api_callable.py", line 481, in inner
472 return api_caller(api_call, this_settings, request)
473 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/google/gax/api_callable.py", line 158, in inner
474 return a_func(request, **kwargs)
475 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/google/gax/api_callable.py", line 434, in inner
476 errors.create_error('RPC failed', cause=exception))
477 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/future/utils/__init__.py", line 419, in raise_with_traceback
478 raise exc.with_traceback(traceback)
479 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/google/gax/api_callable.py", line 430, in inner
480 return a_func(*args, **kwargs)
481 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/google/gax/api_callable.py", line 64, in inner
482 return a_func(*updated_args, **kwargs)
483 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/grpc/_channel.py", line 481, in __call__
484 return _end_unary_response_blocking(state, False, deadline)
485 File "/home/pp/.virtualenvs/cv/lib/python3.5/site-packages/grpc/_channel.py", line 432, in _end_unary_response_blocking
486 raise _Rendezvous(state, None, None, deadline)
487 google.gax.errors.GaxError: GaxError(RPC failed, caused by <_Rendezvous of RPC that terminated with (StatusCode.UNAVAILABLE, {"created":"@1478711654.067744009","description":"Secure read failed","file":"src/core/lib/security/transport/secure_endpoint.c","file_line":157,"grpc_status":14,"referenced_errors":[{"created":"@1478711654.067706801","description":"EOF","file":"src/core/lib/iomgr/tcp_posix.c","file_line":235}]})>