当前位置: 首页 > 知识库问答 >
问题:

SSL3\u GET\u记录:从google云存储加载到bigquery表时版本号错误

朱承载
2023-03-14

从Google云存储中的文件加载到Bigquery表时,我一直收到这个SSL3_GET_RECORD:错误的版本号异常

最终,当我从Google Bigquery作业历史网页查看作业历史记录时,加载作业将显示它已成功。

你能帮忙吗?非常感谢。

下面是我收到的错误消息:

========================================
== Platform ==
  CPython:2.7.6:Linux-2.6.18-194.32.1.el5-x86_64-with-redhat-5.5-Final
== bq version ==
  2.0.18
== Command line ==
  ['/opt/google-cloud-sdk/platform/bq/bq.py', '--credential_file', '/offworld/hornet/.config/gcloud/legacy_credentials/clok@vindicotech.com/singlestore.json', '--project', 'formal-cascade-571', 'load', '--source_format=NEWLINE_DELIMITED_JSON', 'dw_sandbox.impressions_20140603', 'gs://dw_sandbox/impressions/20140603/20140604175042285_20140604195938608_20140603_0_*', '/offworld/specificmedia/logsTobq/schemas/impressionsSchema.txt']
== UTC timestamp ==
  2014-06-05 01:19:06
== Error trace ==
  File "/opt/google-cloud-sdk/platform/bq/bq.py", line 779, in RunSafely
    return_value = self.RunWithArgs(*args, **kwds)
  File "/opt/google-cloud-sdk/platform/bq/bq.py", line 1020, in RunWithArgs
    job = client.Load(table_reference, source, schema=schema, **opts)
  File "/opt/google-cloud-sdk/platform/bq/bigquery_client.py", line 2011, in Load
    upload_file=upload_file, **kwds)
  File "/opt/google-cloud-sdk/platform/bq/bigquery_client.py", line 1611, in ExecuteJob
    job_id=job_id)
  File "/opt/google-cloud-sdk/platform/bq/bigquery_client.py", line 1599, in RunJobSynchronously
    result = self.WaitJob(job_reference)
  File "/opt/google-cloud-sdk/platform/bq/bigquery_client.py", line 1713, in WaitJob
    done, job = self.PollJob(job_reference, status=status, wait=wait)
  File "/opt/google-cloud-sdk/platform/bq/bigquery_client.py", line 1752, in PollJob
    job = self.apiclient.jobs().get(**dict(job_reference)).execute()
  File "/opt/google-cloud-sdk/platform/bq/bigquery_client.py", line 307, in execute
    return super(BigqueryHttp, self).execute(**kwds)
  File "/opt/google-cloud-sdk/bin/bootstrapping/../../lib/oauth2client/util.py", line 132, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/opt/google-cloud-sdk/bin/bootstrapping/../../lib/apiclient/http.py", line 716, in execute
    body=self.body, headers=self.headers)
  File "/opt/google-cloud-sdk/bin/bootstrapping/../../lib/oauth2client/util.py", line 132, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/opt/google-cloud-sdk/bin/bootstrapping/../../lib/oauth2client/client.py", line 490, in new_request
    redirections, connection_type)
  File "/opt/google-cloud-sdk/bin/bootstrapping/../../lib/httplib2/__init__.py", line 1586, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/opt/google-cloud-sdk/bin/bootstrapping/../../lib/httplib2/__init__.py", line 1333, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/opt/google-cloud-sdk/bin/bootstrapping/../../lib/httplib2/__init__.py", line 1289, in _conn_request
    response = conn.getresponse()
  File "/usr/lib64/python2.7/httplib.py", line 1045, in getresponse
    response.begin()
  File "/usr/lib64/python2.7/httplib.py", line 409, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.7/httplib.py", line 365, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib64/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
  File "/usr/lib64/python2.7/ssl.py", line 241, in recv
    return self.read(buflen)
  File "/usr/lib64/python2.7/ssl.py", line 160, in read
    return self._sslobj.read(len)
========================================

Unexpected exception in load operation: [Errno 1] _ssl.c:1426:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number

共有1个答案

袁玮
2023-03-14

您是否有可能在多个线程中使用相同的HTTP对象?即您创建作业的线程不一定是您轮询完成的同一线程?如果是这种情况,今天在google内部出现了这种情况,这是修复:

class _HTTPFactoryWrapper(object):
  """Wraps a request factory so that each request returns a new http object.

  API client's Http object is not threadsafe since calls to the same domain will
  reuse the same HTTPConnection.  If one API call is outstanding then a second
  will try to send a request over the same domain.  This causes chaos that
  seems to surface itself as SSLErrors during processing.

  """

  def __init__(self, factory):
    self.factory = factory

  def request(self, *args, **kwargs):
    return self.factory.Create().request(*args, **kwargs)

然后将bigquery存根的创建更改为:

 return discovery.build(api_name, api_version, http=http_factory.Create())

  http_wrapper = _HTTPFactoryWrapper(http_factory)
  return discovery.build(api_name, api_version, http=http_wrapper)
 类似资料:
  • 我需要从Google Cloud Storage(GCS->Temp Table->Main table)中加载100个表到BigQuery。我创建了一个python进程,将数据加载到BigQuery中,并在AppEngine中进行调度。因为AppEngine最多有10min的超时时间。我已经在异步模式下提交了作业,并在稍后的时间点检查了作业状态。由于我有100个表,需要创建一个监控系统来检查作业

  • 我正试图从控制台/命令行将一个表从big query导出到google cloud storage。控制台作业运行了几分钟,并在没有任何错误代码的情况下出错,命令行作业在运行一段时间后也会出现以下错误: 提取操作中的BigQuery错误:错误处理作业“数据流-实验:BQJOB_R308FF0F73D1820A6_00000157F77E8AB9_1”:后端错误。作业中止。 上面给出了命令行的作业i

  • 我的目标是使用BigQuery web界面将我的所有(GCS创建的)日志从Google Cloud Storage中获取到BigQuery中。由于日志每小时创建一次,所以我喜欢一次导入所有日志来进行分析。 因此,例如gs://logging-bucket/images.mysite.net_storage_2013_03_31_07_00_00_0001a_v0、gs://logging-buck

  • 我试图在bigquery中创建一个表,从google存储中传输csv。这个csv有3000万行,我得到了这些错误,例如: 读取数据时出错,错误消息:行中从位置2543333656开始的值太多。找到4列,而预期为3列 读取数据时出错,错误消息:行中从位置254312106开始的值太多。找到4列,而预期为3列 这很尴尬,我的csv中没有所有这些行。它在2.5亿行中发现了一个错误。怎么可能?? 非常感谢

  • 我们将Google Cloud Datastore用于Google App Engine(GAE)应用程序。在我们的项目改造期间,我们希望将数据库从Datastore迁移到Google CloudSQL。 我们在数据存储中约有1 TB数据,不包括索引。 如何从数据存储迁移到云SQL,是否有任何现有的开源解决方案可用于此。 我已经检查了下面的一个https://cloud.google.com/da