您尚未登录。

#1 2014-08-04 23:07:16

pk
会员
注册时间: 2014-07-09
帖子: 60

求助,goagent问题,连接不上

以前只在win下用过goagent

官方源安装的
uploader.zip成功后,提示要修改proxy.ini文件。但我没有找到proxy.ini,看wiki说现在有一个goagent.user.ini指向/etc/goagent,在里面加了两行

 [gae]
appid = xxxxxx

然后 sudo systemctl start goagent 运行客户端,日志如下

Aug 04 22:10:32 archlinux systemd[1]: Starting GoAgent Service...
Aug 04 22:10:32 archlinux systemd[1]: Started GoAgent Service.
Aug 04 22:10:33 archlinux goagent[2813]: certutil: function failed: SEC_ERROR_BAD_DATABASE: security library: bad database.
Aug 04 22:10:33 archlinux goagent[2813]: certutil: function failed: SEC_ERROR_BAD_DATABASE: security library: bad database.
Aug 04 22:10:33 archlinux goagent[2813]: WARNING - [Aug  4 22:10:33] install root certificate failed, Please run as administrator/root/s
Aug 04 22:10:33 archlinux goagent[2813]: ------------------------------------------------------
Aug 04 22:10:33 archlinux goagent[2813]: GoAgent Version    : 3.1.20 (python/2.7.8 gevent/1.0 pyopenssl/0.14)
Aug 04 22:10:33 archlinux goagent[2813]: Listen Address     : 127.0.0.1:8087
Aug 04 22:10:33 archlinux goagent[2813]: GAE Mode           : https
Aug 04 22:10:33 archlinux goagent[2813]: GAE Profile        : ipv4
Aug 04 22:10:33 archlinux goagent[2813]: GAE APPID          : xxxxxx
Aug 04 22:10:33 archlinux goagent[2813]: Pac Server         : http://192.168.1.103:8086/proxy.pac
Aug 04 22:10:33 archlinux goagent[2813]: Pac File           : file:///usr/share/goagent/local/proxy.pac
Aug 04 22:10:33 archlinux goagent[2813]: ------------------------------------------------------
Aug 04 22:10:56 archlinux goagent[2813]: INFO - [Aug  4 22:10:56] resolve common.IPLIST_MAP names=['google_cn', 'google_hk', 'google_tal
Aug 04 22:11:04 archlinux goagent[2813]: ERROR - [Aug  4 22:11:04] resolve google_cn host return empty! please retry!
Aug 04 22:11:04 archlinux goagent[2813]: Traceback (most recent call last):
Aug 04 22:11:04 archlinux goagent[2813]: File "/usr/lib/python2.7/SocketServer.py", line 595, in process_request_thread
Aug 04 22:11:04 archlinux goagent[2813]: self.finish_request(request, client_address)
Aug 04 22:11:04 archlinux goagent[2813]: File "/usr/share/goagent/local/proxylib.py", line 838, in finish_request
Aug 04 22:11:04 archlinux goagent[2813]: self.RequestHandlerClass(request, client_address, self)
Aug 04 22:11:04 archlinux goagent[2813]: File "/usr/share/goagent/local/goagent", line 694, in __init__
Aug 04 22:11:04 archlinux goagent[2813]: SimpleProxyHandler.__init__(self, *args, **kwargs)
Aug 04 22:11:04 archlinux goagent[2813]: File "/usr/lib/python2.7/SocketServer.py", line 649, in __init__
Aug 04 22:11:04 archlinux goagent[2813]: self.setup()
Aug 04 22:11:04 archlinux goagent[2813]: File "/usr/share/goagent/local/proxylib.py", line 1376, in setup
Aug 04 22:11:04 archlinux goagent[2813]: self.first_run()
Aug 04 22:11:04 archlinux goagent[2813]: File "/usr/share/goagent/local/goagent", line 700, in first_run
Aug 04 22:11:04 archlinux goagent[2813]: common.resolve_iplist()
Aug 04 22:11:04 archlinux goagent[2813]: File "/usr/share/goagent/local/goagent", line 1373, in resolve_iplist
Aug 04 22:11:04 archlinux goagent[2813]: sys.exit(-1)
Aug 04 22:11:04 archlinux goagent[2813]: SystemExit: -1

另外手动运行客户端会报这个错

CRITICAL - [Aug  5 10:24:29] please edit /usr/share/goagent/local/goagent.ini to add your appid to [gae] !
Exception KeyError: KeyError(3069041756L,) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored

于是在goagent.ini里改了appid,不报错了,但运行后还是老样子

[xxxx@archlinux local]$ python2.7 goagent
GoAgent CA - GoAgent                                         CT,C,C
------------------------------------------------------
GoAgent Version    : 3.1.20 (python/2.7.8 gevent/1.1 pyopenssl/0.14)
Listen Address     : 127.0.0.1:8087
GAE Mode           : https
GAE Profile        : ipv4
GAE APPID          : xxxxxx
Pac Server         : http://192.168.1.103:8086/proxy.pac
Pac File           : file:///usr/share/goagent/local/proxy.pac
------------------------------------------------------
INFO - [Aug  5 10:30:05] resolve common.IPLIST_MAP names=['google_cn', 'google_hk', 'google_talk', 'google_ipv6'] to iplist
ERROR - [Aug  5 10:30:13] resolve google_cn host return empty! please retry!
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 44738)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 595, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/share/goagent/local/proxylib.py", line 838, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "goagent", line 694, in __init__
    SimpleProxyHandler.__init__(self, *args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 649, in __init__
    self.setup()
  File "/usr/share/goagent/local/proxylib.py", line 1376, in setup
    self.first_run()
  File "goagent", line 700, in first_run
    common.resolve_iplist()
  File "goagent", line 1373, in resolve_iplist
    sys.exit(-1)
SystemExit: -1
----------------------------------------

最近编辑记录 pk (2014-08-05 10:37:50)

离线

#2 2014-08-05 18:37:50

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: 求助,goagent问题,连接不上

resolve google_cn host return empty! please retry!

goagent 进行 DNS 解析时失败了。检查你的 DNS 设置。你也可以放一些 IP 到 iplist 段中。

另外,不要使用非 systemd 的方式手动运行从源里安装的 GoAgent。会出问题的(还好启动没成功,大概目前还是没问题的吧)。

离线

#3 2014-08-05 19:27:27

savvvygh
会员
注册时间: 2014-02-16
帖子: 160

Re: 求助,goagent问题,连接不上

百合仙子 说:
resolve google_cn host return empty! please retry!

goagent 进行 DNS 解析时失败了。检查你的 DNS 设置。你也可以放一些 IP 到 iplist 段中。

另外,不要使用非 systemd 的方式手动运行从源里安装的 GoAgent。会出问题的(还好启动没成功,大概目前还是没问题的吧)。

会出什么问题啊

离线

#4 2014-08-05 19:36:19

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: 求助,goagent问题,连接不上

savvvygh 说:
百合仙子 说:
resolve google_cn host return empty! please retry!

goagent 进行 DNS 解析时失败了。检查你的 DNS 设置。你也可以放一些 IP 到 iplist 段中。

另外,不要使用非 systemd 的方式手动运行从源里安装的 GoAgent。会出问题的(还好启动没成功,大概目前还是没问题的吧)。

会出什么问题啊

权限导致的问题。

离线

#5 2014-08-05 22:58:20

pk
会员
注册时间: 2014-07-09
帖子: 60

Re: 求助,goagent问题,连接不上

百合仙子 说:
resolve google_cn host return empty! please retry!

goagent 进行 DNS 解析时失败了。检查你的 DNS 设置。你也可以放一些 IP 到 iplist 段中。

另外,不要使用非 systemd 的方式手动运行从源里安装的 GoAgent。会出问题的(还好启动没成功,大概目前还是没问题的吧)。


谢谢仙子,它用的DNS是配置文件里的吗?
goagent.ini里面的dns字段

[dns]
enable = 0
listen = 127.0.0.1:53
servers = 8.8.8.8|8.8.4.4|168.95.1.1|168.95.192.1|223.5.5.5|223.6.6.6|114.114.114.114|114.114.115.115
blacklist = 1.1.1.1|255.255.255.255|74.125.127.102|74.125.155.102|74.125.39.102|74.125.39.113|209.85.229.138|4.36.66.178|8.7.198.45|37.61.54.158|46.82.174.68|59.24.3.173|64.33.88.161|64.33.99.47|64.66.163.251|65.104.202.252|65.160.219.113|66.45.252.237|72.14.205.104|72.14.205.99|78.16.49.15|93.46.8.89|128.121.126.139|159.106.121.75|169.132.13.103|192.67.198.6|202.106.1.2|202.181.7.85|203.161.230.171|203.98.7.65|207.12.88.98|208.56.31.43|209.145.54.50|209.220.30.174|209.36.73.33|211.94.66.147|213.169.251.35|216.221.188.182|216.234.179.13|243.185.187.3|243.185.187.39|23.89.5.60|37.208.111.120|49.2.123.56|54.76.135.1|77.4.7.92|118.5.49.6|188.5.4.96|189.163.17.5|197.4.4.12|249.129.46.48|253.157.14.165
tcpover = .youtube.com|.ytimg.com|.googlevideo.com

系统的dns

$ cat /etc/resolv.conf 
nameserver 58.221.59.218
nameserver 114.114.114.114

iplist 字段

[iplist]
google_cn = www.google.cn|www.g.cn

没发现什么异常。。另外 www.google.cnwww.g.cn 我也 ping 得通啊

最近编辑记录 pk (2014-08-05 23:02:47)

离线

#6 2014-08-05 23:10:50

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: 求助,goagent问题,连接不上

不是那个 dns 节。我也不清楚,goagent 的代码很复杂。

离线

#7 2014-08-08 14:02:44

xiehongye
会员
注册时间: 2014-08-08
帖子: 4

Re: 求助,goagent问题,连接不上

google cn的地址大多数不能用了,goagent没有解析到可以用来上gae的ip地址。
现在封锁严重,自己寻找可以用的google ip,然后填写到[iplist]部分中google_cn =后面,
例如google_cn =24.156.131.119|193.192.250.173|193.134.255.173,参见http://cb.e-fly.org:81/archives/goagent-iplist.html ,
网上有人写了相关工具来查询当地可以使用的google ip,google一下你就知道。

离线

#8 2014-08-08 14:27:21

pk
会员
注册时间: 2014-07-09
帖子: 60

Re: 求助,goagent问题,连接不上

xiehongye 说:

google cn的地址大多数不能用了,goagent没有解析到可以用来上gae的ip地址。
现在封锁严重,自己寻找可以用的google ip,然后填写到[iplist]部分中google_cn =后面,
例如google_cn =24.156.131.119|193.192.250.173|193.134.255.173,参见http://cb.e-fly.org:81/archives/goagent-iplist.html ,
网上有人写了相关工具来查询当地可以使用的google ip,google一下你就知道。

感谢分享

离线

页脚