Google Java api - 错误“com.google.gdata.util.ServiceException:Bad Gateway”在feed.insert(入口) [英] Google Java api - error "com.google.gdata.util.ServiceException: Bad Gateway" during feed.insert(entry)

查看:93
本文介绍了Google Java api - 错误“com.google.gdata.util.ServiceException:Bad Gateway”在feed.insert(入口)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在电子表格中有两个工作表。如果满足某些条件,我将复制并将值从一张纸张更改为其他纸张。它正在工作2周,并从昨天得到这个问题。没有改变。执行此语句时会出现下面提到的错误消息。请注意,这个错误并不是所有的时间都出现了,并且迭代了一些for循环之后也出现错误,有时当x = 10时,有时x = 100或x = 500



导致错误的代码:

  for(int x = 1; x <= row_TODAY_WS; x ++){
for(int y = 1; y <= col_TODAY_WS; y ++){
CellEntry newEntry = new CellEntry(x,y,feed_cell_0.getEntries()获得(ⅰ).getPlainTextContent());
feed_1.insert(newEntry);
i ++;


错误讯息:

  com.google.gdata.util.ServiceException:Bad Gateway 
<!DOCTYPE html>
< html lang = en>
< meta charset = utf-8>
< meta name = viewport content =initial-scale = 1,minimum-scale = 1,width = device-width>
< title>错误502(服务器错误)!! 1< / title>
< style>
* {margin:0; padding:0} html,code {font:15px / 22px arial,sans-serif} html {background:#fff; color:#222; padding:15px} body {margin:7 %auto 0; max-width:390px; min-heipx 0 15px} *> body {background:url(// www.google.com/images/errors/robot.png)100%5px不重复; padding-right:205px} p {margin:11px 0 22px; overflow:hidden} ins {阳离子:none} a img {border:0} @media screen and(max-width:772px){body {background:none; margin-top:0; max-width:none; padding-right:0}}#logo {背景:url(// www.gors / logo_sm_2.png)no-repeat} @media唯一屏幕和(min-resolution:192dpi){#logo {background:url(// www.google.com/images/errors/ logo_sm_2_hr.png)无重复0%订单图片:url(// www.google.com/images/errors/logo_sm_2_hr.png)0}} @仅限媒体屏幕和(-webkit-min-device-pixel-ratio :2){#logo {background:url(// www.goog/logo_sm_2_hr.png)no-repeat; -webkit-background-size:100%100%}}#logo {display:inline-block; height:55px ; width:150px}
< / style>

HTTP错误502 (错误网关)是服务器错误。运行电子表格API所涉及的一台Google服务器似乎存在问题。问题不在于您的代码。



您的计算机联系了Google服务器,该服务器充当代理服务器的实际工作。然后,第二台服务器遇到了某种问题,这意味着它无法将代理服务器的有效响应返回给代理服务器,然后代理服务器可以返回给您。因此,代理服务器向您发送了一个HTTP 502响应。



我希望Google的系统足够聪明地检测这些问题并自动通知Google工程师。也许Google的某个人正在解决这个问题。然而,我不为谷歌工作,所以我不能说这是肯定的。



如果没有别的,你可以尝试张贴在 Google Spreadsheets API 论坛。


I am having two worksheets in a spreadsheet. I will copy and change the value from one sheet to other if some conditions are met. It is working for 2 weeks and getting this issue from yesterday. No changes were made. Below mentioned error message is coming when executing this statement.

Please note that this error is coming not all the times and also error is coming after iterating some for loops, sometimes when x=10 sometimes when x=100 or x=500

CODE CAUSING THE ERROR:

 for (int x=1; x <= row_TODAY_WS;x++){
    for(int y=1; y <= col_TODAY_WS;y++){
       CellEntry newEntry = new CellEntry (x, y, feed_cell_0.getEntries().get(i).getPlainTextContent());
       feed_1.insert(newEntry);
      i++;
    }
  }

ERROR MESSAGE :

com.google.gdata.util.ServiceException: Bad Gateway
<!DOCTYPE html>
<html lang=en>
  <meta charset=utf-8>
  <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
  <title>Error 502 (Server Error)!!1</title>
  <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-heipx 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{cation:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.gors/logo_sm_2.png) no-repeat}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/errors/logo_sm_2_hr.png) no-repeat 0%order-image:url(//www.google.com/images/errors/logo_sm_2_hr.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.goog/logo_sm_2_hr.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:55px;width:150px}
  </style>
  <a href=//www.google.com/><span id=logo aria-label=Google></span></a>
  <p><b>502.</b> <ins>That?s an error.</ins>
  <p>The server encountered a temporary error and could not complete your request.<p>Please try again in 30 seconds.  <ins>That?s all we know.</ins>

        at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:632)
        at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
        at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
        at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
        at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
        at com.google.gdata.client.Service.insert(Service.java:1409)
        at com.google.gdata.client.GoogleService.insert(GoogleService.java:613)
        at com.google.gdata.data.BaseFeed.insert(BaseFeed.java:535)

解决方案

HTTP error 502 (Bad Gateway) is a server error. There looks to be a problem with one of the Google servers involved in running the spreadsheets API. The problem isn't with your code.

Your computer contacted a Google server, which acted as a proxy for the server that would actually do the work. This second server then encountered a problem of some kind which meant that it could not return a valid response to the proxy server which the proxy could then pass back to you. As a result, the proxy server sent you back an HTTP 502 response.

I would hope that Google's systems would be smart enough to detect these problems and notify Google engineers automatically. Perhaps someone from Google is working on the problem right now. However, I don't work for Google so I can't say that this is true for sure.

If nothing else, you could try posting on the Google Spreadsheets API forum.

这篇关于Google Java api - 错误“com.google.gdata.util.ServiceException:Bad Gateway”在feed.insert(入口)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆