Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote_recv_cb_recv: Connection reset by peer #6

Open
giveup opened this issue Oct 6, 2017 · 7 comments
Open

remote_recv_cb_recv: Connection reset by peer #6

giveup opened this issue Oct 6, 2017 · 7 comments

Comments

@giveup
Copy link

giveup commented Oct 6, 2017

Please answer these questions before submitting your issue. Thanks!

What version of shadowsocks-libev are you using?

d490456

What operating system are you using?

Mac

What did you do?

日志经常出现remote_recv_cb_recv: Connection reset by peer
服务器端是shadowsocksrr/shadowsocksr@f0ec72c
尝试调整过auth_chain_e/f,chacha20-ietf/auth_aes128_sha1等加密和协议,都会出现该错误

What did you expect to see?

What did you see instead?

2017-10-07 00:14:57 ERROR: remote_recv_cb_recv: Connection reset by peer
2017-10-07 00:14:57 ERROR: remote_recv_cb_recv: Connection reset by peer
2017-10-07 00:14:57 ERROR: remote_recv_cb_recv: Connection reset by peer
2017-10-07 00:14:57 ERROR: remote_recv_cb_recv: Connection reset by peer
2017-10-07 00:14:57 ERROR: remote_recv_cb_recv: Connection reset by peer
2017-10-07 00:14:57 ERROR: remote_recv_cb_recv: Connection reset by peer
2017-10-07 00:15:21 ERROR: getsockopt error code 0 61
2017-10-07 00:15:21 ERROR: getsockopt: Operation now in progress
2017-10-07 00:15:21 ERROR: getsockopt error code 0 61
2017-10-07 00:15:21 ERROR: getsockopt: Operation now in progress
2017-10-07 00:15:21 ERROR: getsockopt error code 0 61
2017-10-07 00:15:21 ERROR: getsockopt: Operation now in progress
2017-10-07 00:15:21 ERROR: getsockopt error code 0 61
2017-10-07 00:15:21 ERROR: getsockopt: Operation now in progress
2017-10-07 00:15:21 ERROR: getsockopt error code 0 61
2017-10-07 00:15:21 ERROR: getsockopt: Operation now in progress
2017-10-07 00:15:21 ERROR: getsockopt error code 0 61
2017-10-07 00:15:21 ERROR: getsockopt: Operation now in progress
2017-10-07 00:15:53 ERROR: remote_recv_cb_recv: Connection reset by peer
2017-10-07 00:16:35 ERROR: getaddrinfo: nodename nor servname provided, or not known
2017-10-07 00:17:05 ERROR: getaddrinfo: nodename nor servname provided, or not known

What is your config in detail (with all sensitive info masked)?

"protocol_param" : "",
"method" : "none",
"protocol" : "auth_chain_b",
"server" : "IP",
"password" : "password",
"local_address" : "127.0.0.1",
"server_port" : 8080,
"timeout" : 60,
"local_port" : 1086,
"obfs_param" : "www.baidu.com",
"obfs" : "http_simple"

@Akkariiin
Copy link
Member

Akkariiin commented Oct 9, 2017

remote_recv_cb_recv: Connection reset by peer ?
是网络环境的问题吗?看起来有点像是GFW常用的手段 Connection reset by peer

@giveup
Copy link
Author

giveup commented Oct 10, 2017

同一个服务器,同样配置,在iOS上就很稳定,(客户端为shadowrocket)
目前我在Mac上的客户端是ShadowsocksX-NG-R8(内置的ss-local替换为自己编译)
而且出现该错误时,换用其他代理服务器(V2Ray),就能正常访问。(例如都访问example.com)
因为我认为问题出现在ss-local上。

@Akkariiin
Copy link
Member

emmmmmmm,
我没有IOS设备,也没有在IOS上编译过。SSRR分支的变更应该涉及不到有关连接管理的部分。

我猜问题最有可能发生在加密和连接管理的部分。不知道你编译时编译的是哪个TLS库和连接的API。
你可以试一试单独运行ss-local看看它的输出日志。我记得好像是有日志的。运行方法和linux上应该一样。

@giveup
Copy link
Author

giveup commented Oct 10, 2017

@Akkariiin 试过了,一样,访问example.com都是类似的错误。
openssl 的版本为 1.0.2l [25 May 2017]

@giveup
Copy link
Author

giveup commented Oct 10, 2017

本地启动信息

ss-local -u -c ss-local-config.json --acl gfwlist.acl
2017-10-10 17:24:33 INFO: initializing acl...
2017-10-10 17:24:33 INFO: protocol auth_chain_b
2017-10-10 17:24:33 INFO: protocol_param
2017-10-10 17:24:33 INFO: method none
2017-10-10 17:24:33 INFO: obfs http_simple
2017-10-10 17:24:33 INFO: obfs_param www.baidu.com
2017-10-10 17:24:33 INFO: initializing ciphers... none
2017-10-10 17:24:33 INFO: tcp port reuse enabled
2017-10-10 17:24:33 INFO: udprelay enabled
2017-10-10 17:24:33 INFO: udp port reuse enabled
2017-10-10 17:24:33 INFO: listening at 127.0.0.1:1086
2017-10-10 17:25:41 ERROR: remote_recv_cb_recv: Connection reset by peer
2017-10-10 17:25:46 ERROR: remote_recv_cb_recv: Connection reset by peer

服务端启动信息

/usr/local/shadowsocks/server.py -c /etc/shadowsocks.json
IPv6 support
2017-10-10 17:29:21 INFO shell.py:74 ShadowsocksR 3.4.0 2017-07-27
2017-10-10 17:29:21 INFO server.py:48 current process RLIMIT_NOFILE resource: soft 1024 hard 4096
2017-10-10 17:29:21 INFO asyncdns.py:287 black_hostname_list init as : []
2017-10-10 17:29:21 INFO asyncdns.py:335 dns server: [('8.8.8.8', 53), ('8.8.4.4', 53)]
2017-10-10 17:29:21 INFO server.py:108 server start with protocol[auth_chain_b] password [password] method [none] obfs [http_simple_compatible] obfs_param []
2017-10-10 17:29:21 INFO server.py:125 starting server at [::]:8080
2017-10-10 17:29:21 INFO server.py:145 starting server at 0.0.0.0:8080
2017-10-10 17:29:30 INFO util.py:92 loading libcrypto from libcrypto.so.10

@Akkariiin
Copy link
Member

Akkariiin commented Oct 11, 2017

我这里近3天新加坡出口auth_chain_* +plain在使用TG时也出现了连接被中断的问题,auth_chain_* +tls1.2就少见很多。感觉墙背锅的可能性比较大。

你遇到的是全部连接都被 Connection reset by peer 还是只是部分或者偶尔被阻断?有尝试更换其他protocol或obfs吗?

@giveup
Copy link
Author

giveup commented Oct 11, 2017

某个域名会出现此错误。而且同一时间,我的iOS设备可以访问此域名,在Mac上就会出现这个错误。
所以我认为不是gfw的问题。(Mac上无论什么时候访问,都是这个Connection reset by peer,但访问其他YouTube之类的很正常。)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants