xtaci / kcptun

A Quantum-Safe Secure Tunnel based on QPP, KCP, FEC, and N:M multiplexing.
MIT License
13.88k stars 2.54k forks source link

broken pipe是怎么? #13

Closed sendmail closed 8 years ago

sendmail commented 8 years ago

[ERR] yamux: keepalive failed: i/o deadline reached [ERR] yamux: Failed to read header: broken pipe

xtaci commented 8 years ago

10 看这里

sendmail commented 8 years ago

我的从安装上那一刻一直显示的是这个。都没有联通过。 @xtaci

xtaci commented 8 years ago

@sendmail 首先你要保证你的服务器能通过UDP数据包,kcp服务器端口正确

sendmail commented 8 years ago

@xtaci 服务器是可以通过UDP的,应为这个vps好像也就只能是UDP。kcp服务器的端口是自己改的应该也是没错

xtaci commented 8 years ago

很多VPS,比如amazon aws,默认的策略是不允许UDP包通过的,这点是必须要确认的,只要端口对了,服务器一定有反应,会打印出remote addr .

sendmail commented 8 years ago

@xtaci 服务器确实有反应 显示的是 remote address: xx.xx.xx.xx:42698 2016/05/13 11:10:21 dial tcp 127.0.0.1:1221: getsockopt: connection refused 2016/05/13 11:10:22 [ERR] yamux: Failed to read header: broken pipe

jannson commented 8 years ago

上级代理没有! dial tcp 127.0.0.1:1221: getsockopt: connection refused

sendmail commented 8 years ago

@jannson 不好意思我小白。有点不太明白上级代理?

xtaci commented 8 years ago

@sendmail, 你在服务器上,肯定无法telnet到 127.0.0.1:1221

sendmail commented 8 years ago

@xtaci 服务器上命令不是这样的吗? ./server_linux_amd64 -t "127.0.0.1:10000" -key "你的密码" -l ":43212" -tuncrypt

这个也是我用客户端连接后出现的 remote address: xx.xx.xx.xx:42698 2016/05/13 11:10:21 dial tcp 127.0.0.1:1221: getsockopt: connection refused 2016/05/13 11:10:22 [ERR] yamux: Failed to read header: broken pipe

xtaci commented 8 years ago

@sendmail 你先搞清楚,你的 127.0.0.1:1221 这个端口,是谁在监听?

sendmail commented 8 years ago

@xtaci 我输入的命令跟这有点区别我把端口改成1221了实际上是这样的 /server_linux_amd64 -t "127.0.0.1:1221" -key "你的密码" -l ":8989" -tuncrypt

xtaci commented 8 years ago

-t 要指向目标服务器,比如dante,要先跑起来

sendmail commented 8 years ago

@xtaci 这个应该算已经启动了把 ~# ps -ef | grep danted root 4063 4051 0 11:45 pts/2 00:00:00 grep danted

xtaci commented 8 years ago

不算啊, 根本米有进程 你尝试service danted start

sendmail commented 8 years ago

@xtaci ..0.0.....好像真的没有启动 。提示没有配置?有什么教程没 提示Not starting Dante SOCKS daemon: not configured.

jannson commented 8 years ago

@sendmail 小白的话等待一键安装脚本吧。我已经理解了 kcptun,估计三天内可以出一个服务器端的一键安装脚本。

xtaci commented 8 years ago

@sendmail

$cat /etc/danted.conf logoutput: syslog internal: 127.0.0.1 port = 10000 external: eth0 method: none user.privileged: proxy user.notprivileged: nobody user.libwrap: nobody client pass { from: 127.0.0.0/8 port 1-65535 to: 0.0.0.0/0 } pass { from: 127.0.0.0/8 to: 0.0.0.0/0 protocol: tcp udp }

sendmail commented 8 years ago

@jannson 好吧。先谢谢大师指点了

sendmail commented 8 years ago

@xtaci 输入后运行service danted start 提示这个是否正确

Starting Dante SOCKS daemon: May 13 11:57:55 (1463129875) danted[4181]: socks_seteuid(): old: 0, new: 13 May 13 11:57:55 (1463129875) danted[4181]: socks_reseteuid(): current: 13, new: 0 May 13 11:57:55 (1463129875) danted[4181]: socks_seteuid(): old: 0, new: 65534 May 13 11:57:55 (1463129875) danted[4181]: socks_reseteuid(): current: 65534, new: 0 May 13 11:57:55 (1463129875) danted[4181]: socks_seteuid(): old: 0, new: 65534 May 13 11:57:55 (1463129875) danted[4181]: socks_reseteuid(): current: 65534, new: 0 May 13 11:57:55 (1463129875) danted[4181]: addressisbindable(): can't find interface: eth0: Success (errno = 0) May 13 11:57:55 (1463129875) danted[4181]: sockdexit() May 13 11:57:55 (1463129875) danted[4181]: sockdexit(): terminating

xtaci commented 8 years ago

显然不对啊, 无法绑定eth0,你要看你的网卡了,权限这些。成功了不会出现terminating的

sendmail commented 8 years ago

@xtaci 那可能也就网卡了应为这是我买的sentris的vps 可能是网卡有什么问题的。权限这些应该没问题的

sendmail commented 8 years ago

@xtaci 这个vps的万卡是这样的 。这是ovz的vps,不是kvm的

venet0 Link encap:UNSPEC venet0:0 Link encap:UNSPEC HWaddr 00-00-0

xtaci commented 8 years ago

改改配置

sendmail commented 8 years ago

@xtaci 改完网卡好像管用了

sendmail commented 8 years ago

@xtaci 现在运行完service danted start 后输出是这样的 Starting Dante SOCKS daemon: May 13 12:13:24 (1463130804) danted[4339]: socks_seteuid(): old: 0, new: 13 May 13 12:13:24 (1463130804) danted[4339]: socks_reseteuid(): current: 13, new: 0 May 13 12:13:24 (1463130804) danted[4339]: socks_seteuid(): old: 0, new: 65534 May 13 12:13:24 (1463130804) danted[4339]: socks_reseteuid(): current: 65534, new: 0 May 13 12:13:24 (1463130804) danted[4339]: socks_seteuid(): old: 0, new: 65534 May 13 12:13:24 (1463130804) danted[4339]: socks_reseteuid(): current: 65534, new: 0 danted.

sendmail commented 8 years ago

@xtaci。为什么我的putty窗口一关闭,kcp也停止了。tty必须得一直开着?

xtaci commented 8 years ago

@sendmail & 放后台

zztt commented 8 years ago

@sendmail 我也买了sentris的服务器,请问你是怎么样改网卡的,谢谢!

tianlichunhong commented 8 years ago

我是想提速shadowsocks,结果也是出现这样的问题 2016/08/20 21:25:49 remote address: XXXXXX:19874 2016/08/20 21:25:49 dial tcp 127.0.0.1:8086: getsockopt: connection refused 2016/08/20 21:25:49 [ERR] yamux: Failed to read header: broken pipe 2016/08/20 21:25:50 remote address: XXXXXX:19874 2016/08/20 21:25:50 dial tcp 127.0.0.1:8086: getsockopt: connection refused 2016/08/20 21:25:50 [ERR] yamux: Failed to read header: broken pipe 2016/08/20 21:25:50 remote address: XXXXX:19874 我的shadowsocks是一切正常的,不用kcptun是正常使用的。我的是搬瓦工的VPS。请高手指导一下。

sendmail commented 8 years ago

@zztt 再vps上看网卡是什么 命令ifconfig set的是venet0

lyutian commented 8 years ago

@tianlichunhong @sendmail Please replace loopback IP 127.0.0.1 with your VPS IP. ./server_linux_amd64 -t "${VPS_IP}:1221" -key "你的密码" -l ":8989" -tuncrypt

cha1n commented 7 years ago

报错信息 getsockopt: connection refused 用了@lyutian 的方法OK了

codemonkey-m commented 7 years ago

报错信息 getsockopt: connection refused 用了@lyutian 的方法OK了

+1

dimsonder commented 7 years ago

服务器端日志: 2016/12/10 17:17:32 remote address: 36.149.156.42:60989 2016/12/10 17:17:32 broken pipe 这个是电脑端使用提示的,而在手机端用可以通过,请问是哪里的问题

kedup commented 7 years ago

服务器端日志: 2016/12/10 17:17:32 remote address: 36.149.156.42:60989 2016/12/10 17:17:32 broken pipe 这个是电脑端使用提示的,而在手机端用可以通过,请问是哪里的问题@qq0313问题解决了吗

zhaohansprt commented 7 years ago

说了半天 没看找服务端日志怎么看啊 在什么位置