【更新GoAgent】使用新版打开被封网站报错Error: Not Found The requested URL /2 was not found on this server ,原来是上传GoAgent服务器端出问题。当时上传时提示AttributeError: can’t set attribute Exception KeyError: KeyError,只当是得用VPN上传,原来只是因未用Google应用专用密码
local\proxy.ini
server\uploader.bat
—————————
昨日“下载新版goagent-v2.1.0-0,配置本地端,并上传服务器端后,发现使用Go代理访问被封网站时,无法打开,提示:Error: Not Found The requested URL /2 was not found on this server.”
说来也怪,在新版GoAgent代理模式下,打开Google站点可以,但打开其他网站如Youtube、Twitter不行,提示上面的Not Found。
在GoAgent命令行窗口可看到404记录
INFO – [Oct 24 14:06:46] 127.0.0.1:49682 “GET http://www.youtube.com/favicon.ico
HTTP/1.1″ 404 –
通过GAE官网https://appengine.google.com/,查看应用程序Logs,可见代码404,及警告No handlers matched this URL
2012-10-23 18:40:12.971 /2 404 31ms 0kb
183.187.23.90 – – [23/Oct/2012:18:40:12 -0700] “POST /2 HTTP/1.1” 404 0 – – “xl55380855.appspot.com” ms=32 cpu_ms=0
W 2012-10-23 18:40:12.971
No handlers matched this URL.
[Legend:D-Debug (least severe) I-Info W-Warning E-Error C-Critical (most severe)]
而正常时候,如过去,提示代码是200
2012-10-23 01:46:51.671 /fetch.py 200 61ms 21kb
60.223.37.77 – – [23/Oct/2012:01:46:51 -0700] “POST /fetch.py HTTP/1.1” 200 21883 – – “xl55380855.appspot.com” ms=62 cpu_ms=0 cpm_usd=0.002663 instance=00c61b117c386990dda242bf76314eb00cdb8b
原来以为是没使用VPN上传所致,因为2.1.0 测试版提示“上传失败请挂 VPN/SSH 再上传”,但幸好在goagent官网Issues上看到了原因,原来只是因为未使用Google应用专用密码
Issue 5965: 无论如何都上传不了啊2.1.2版,开VPN也不行(附提示)›
File “uploader.zip\google\appengine\tools\appengine_rpc.py”, line 94, in __ini
t__
AttributeError: can’t set attribute
Exception KeyError: KeyError(13052064,) in <module ‘threading’ from ‘D:\goagent-
goagent-3f882f7\local\proxy.exe\threading.pyo’> ignored
Comment 1 by jko…@gmail.com, Today (20 minutes ago)
和我一样的问题。。如果有解决的把方法贴上来。。。谢谢。。。。
Comment 2 by iloveHKl…@gmail.com, Today (7 minutes ago)
proxy属于chrome浏览器以外的应用程序,要用应用程序专用密码,所以你要生成一个应用程序专用密码(谷歌账户中自己开通),然后运行update时,输入gmail密码那一行,就输入那个生成的密码(16位),而不是gmail本身的密码……你试试看
Delete comment Comment 3 by xl55380…@gmail.com, Today (moments ago)
非常多谢LS iloveHKl…@gmail.com,
换用应用程序专用密码后成功,看来是这么回事。
新版上传不成后,我还又试过上传1.8.4,但旧版会提示输入应用程序专用密码。新版不提示,所以出错了。
https://code.google.com/p/goagent/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=5965
之所以出现这个问题,可能是新版goagent的BUG,因为旧版goagent-1.8.4上传时,是会提示使用应用专用密码,而新版如goagent-v2.1.0上传时,只说是输入Password
在goagent官网Project Home常见问题FAQ中,其实对错误404也有的说明。出现404,两个原因,一个是appid填写错误,一个服务器端部署错误。如果appid端填对,那就无疑是服务端搞砸了。
404: Not Found 一般是proxy.ini里面appid没有填对,或者服务端没有部署成功。
★不使用谷歌应用专用密码不正常上传python服务端的日志
提示AttributeError: can’t set attribute和Exception KeyError: KeyError(24204752,) 。
其中,KeyError不是问题,因为在正常上传也出现,作者提示“请忽略Exception KeyError错误”。所以,真正的错误是AttributeError属性错误:不能设置属性。
运行uploader.bat 上传python服务端
===============================================================
GoAgent服务端部署程序, 开始上传python服务端
===============================================================
请输入您的appid, 多个appid请用|号隔开
APPID:xl55380855|xl55380854|xl55380853
Application: xl55380855
Host: appengine.google.com
Rolling back the update.
Email: xl55380855@gmail.com
Password for xl55380855@gmail.com: **********
Traceback (most recent call last):
File “boot.py”, line 45, in <module>
File “C:\Users\XueXX\AppData\Local\Temp\goagent-bootstrap.py”, line 1, in <mod
ule>
import sys;sys.path.insert(0, ‘uploader.zip’);import appcfg;appcfg.main()
File “uploader.zip\appcfg.py”, line 81, in main
File “uploader.zip\appcfg.py”, line 72, in upload
File “uploader.zip\google\appengine\tools\appcfg.py”, line 3873, in main
File “uploader.zip\google\appengine\tools\appcfg.py”, line 2443, in Run
File “uploader.zip\google\appengine\tools\appcfg.py”, line 3638, in __call__
File “uploader.zip\google\appengine\tools\appcfg.py”, line 3141, in Rollback
File “uploader.zip\google\appengine\tools\appcfg.py”, line 3158, in _Rollback
File “uploader.zip\google\appengine\tools\appcfg.py”, line 2018, in Rollback
File “uploader.zip\google\appengine\tools\appcfg.py”, line 1698, in Send
File “uploader.zip\google\appengine\tools\appengine_rpc.py”, line 378, in Send
File “uploader.zip\google\appengine\tools\appengine_rpc.py”, line 436, in _Aut
henticate
File “uploader.zip\google\appengine\tools\appengine_rpc.py”, line 280, in _Aut
henticate
File “uploader.zip\google\appengine\tools\appengine_rpc.py”, line 232, in _Get
AuthToken
File “uploader.zip\google\appengine\tools\appengine_rpc.py”, line 94, in __ini
t__
AttributeError: can’t set attribute
Exception KeyError: KeyError(24204752,) in <module ‘threading’ from ‘D:\Program
Files\GoAgent\goagent-v2.1.0-0-gb881730\local\proxy.exe\threading.pyo’> ignored
★使用谷歌应用专用密码成功上传python服务端的日志
===============================================================
GoAgent服务端部署程序, 开始上传python服务端
===============================================================
请输入您的appid, 多个appid请用|号隔开
APPID:xl55380855|xl55380854|xl55380853
Application: xl55380855
Host: appengine.google.com
Rolling back the update.
Email: xl55380855@gmail.com
Password for xl55380855@gmail.com: ****************
Application: xl55380855; version: 1
Host: appengine.google.com
Starting update of app: xl55380855, version: 1
Scanning files on local disk.
Cloning 1 static file.
Cloning 9 application files.
Compilation starting.
Compilation completed.
Starting deployment.
Checking if deployment succeeded.
Will check again in 1 seconds.
Checking if deployment succeeded.
Will check again in 2 seconds.
Checking if deployment succeeded.
Will check again in 4 seconds.
Checking if deployment succeeded.
Will check again in 8 seconds.
Checking if deployment succeeded.
Will check again in 16 seconds.
Checking if deployment succeeded.
Will check again in 32 seconds.
Checking if deployment succeeded.
Deployment successful.
Checking if updated app version is serving.
Will check again in 1 seconds.
Checking if updated app version is serving.
Will check again in 1 seconds.
Checking if updated app version is serving.
Will check again in 1 seconds.
Checking if updated app version is serving.
Will check again in 1 seconds.
Checking if updated app version is serving.
Will check again in 1 seconds.
Checking if updated app version is serving.
Completed update of app: xl55380855, version: 1
Application: xl55380854
Host: appengine.google.com
Rolling back the update.
Application: xl55380854; version: 1
Host: appengine.google.com
……
Completed update of app: xl55380853, version: 1
Exception KeyError: KeyError(25253088,) in <module ‘threading’ from ‘D:\Program
Files\GoAgent\goagent 2.1.2 正式版[goagent-goagent-3f882f7]\local\proxy.exe\thre
ading.pyo’> ignored
上传成功,请忽略Exception KeyError错误, 编辑proxy.ini把你的appid填进去,谢谢。请
按任意键退出程序。
★goagent-1.8.4提示使用应用专用密码application-specific password
当输入Google账号密码时,提示Use an application-specific password instead of your regular account password,当输入错误密码时,提示Invalid username or password,错误两次,即会保存cookies”Saving authentication cookies to ./.appcfg_cookies”,并返回错误友Error 401
===============================================================
GoAgent服务端部署程序, 开始上传python服务端
如果需要上传golang服务端, 请修改本文件的uploaddir的值为golang
===============================================================
请输入您的appid, 多个appid请用|号隔开
APPID:xl55380855|xl55380854|xl55380853
Application: xl55380855
Host: appengine.google.com
INFO – – [Oct 24 14:49:11] Loaded authentication cookies from ./.appcfg_cookies
INFO – – [Oct 24 14:49:11] Server: appengine.google.com
Rolling back the update.
Email: xl55380855@gmail.com
Password for xl55380855@gmail.com: **********
Use an application-specific password instead of your regular account password.
See http://www.google.com/support/accounts/bin/answer.py?answer=185833
Email: xl55380855@gmail.com
Password for xl55380855@gmail.com: ***
Invalid username or password.
Email: xl55380855@gmail.com
Password for xl55380855@gmail.com: **********
Use an application-specific password instead of your regular account password.
See http://www.google.com/support/accounts/bin/answer.py?answer=185833
INFO – – [Oct 24 14:50:31] Saving authentication cookies to ./.appcfg_cookies
Error 401: — begin server output —
Must authenticate first.
— end server output —
在输入一次应用专用密码后,如若再次上传,则无需再次输入任何密码,因为已经自动保存cookies到文件goagent-1.8.4\server\appcfg_cookies中。
★goagent-v2.1.0-0 2.0.14 1.8.4 \local\proxy.ini hosts比较
显然,是由IP地址段203.208.46.*换成了203.208.47.*
我分析,可能自己找上些速度快的大陆Google IP,填入其中,效果会好。
goagent-v2.1.0-0 goagent 2.0.14 \local\proxy.ini
[google_cn]
mode = http
hosts = 203.208.47.1|203.208.47.2|203.208.47.3|203.208.47.4|203.208.47.5|203.208.47.6|203.208.47.7|203.208.47.8
sites = .google.com|.googleusercontent.com|.googleapis.com|.google-analytics.com|.googlecode.com|.google.com.hk|.appspot.com|.android.com|.googlegroups.com
forcehttps = groups.google.com|code.google.com|mail.google.com|docs.google.com|profiles.google.com|developer.android.com
withgae = plus.google.com|plusone.google.com|reader.googleusercontent.com|music.google.com|apis.google.com|books.google.com
goagent-1.8.4
[google_cn]
mode = http
hosts = 203.208.46.1|203.208.46.2|203.208.46.3|203.208.46.4|203.208.46.5|203.208.46.6|203.208.46.7|203.208.46.8
sites = .google.com|.googleusercontent.com|.googleapis.com|.google-analytics.com|.googlecode.com|.google.com.hk|.appspot.com|.android.com|.googlegroups.com
forcehttps = groups.google.com|code.google.com|mail.google.com|docs.google.com|profiles.google.com|developer.android.com
withgae = plus.google.com|plusone.google.com|reader.googleusercontent.com|music.google.com|apis.google.com
★Google GoAgent相关
- GoAgent不能用原因:108大前Google谷歌中国大陆服务器IP部分被封
作者: xuexx 日期: 2012/10/24
http://www.xuexx.com/archives/2365
GoAgent不能用了可能原因及解决方法
作者: xuexx 日期: 2012/10/23
http://www.xuexx.com/archives/2361
- Google谷歌中国大陆服务器IP地址数据中心考
作者: xuexx 日期: 2012/06/22
http://www.xuexx.com/archives/1287
A 203.208.46.241 北京市 谷歌(中国)公司 30
A 203.208.46.242 北京市 谷歌(中国)公司 30
A 203.208.46.243 北京市 谷歌(中国)公司 30
A 203.208.46.244 北京市 谷歌(中国)公司 30
A 203.208.46.240 北京市 谷歌(中国)公司 30
203.208.46.240|203.208.46.241|203.208.46.242|203.208.46.243|203.208.46.244|