Socat在11号信号下退出



我遇到了一个非常奇怪的问题,所以没有任何原因就被隔离了,我不知道该怎么做才能调试出来。完整日志:

2015/08/27 16:55:58 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:55:59 socat[1] N accepting connection from AF=2 10.116.176.1:53363 on AF=2 10.116.176.6:8080
2015/08/27 16:55:59 socat[1] N forked off child process 9
2015/08/27 16:55:59 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:55:59 socat[9] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:55:59 socat[9] N successfully connected from local address AF=2 10.116.176.6:52167
2015/08/27 16:55:59 socat[9] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:55:59 socat[9] N socket 1 (fd 6) is at EOF
2015/08/27 16:55:59 socat[9] N socket 1 (fd 6) is at EOF
2015/08/27 16:55:59 socat[9] N socket 2 (fd 5) is at EOF
2015/08/27 16:55:59 socat[9] N exiting with status 0
2015/08/27 16:55:59 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:04 socat[1] N accepting connection from AF=2 10.116.176.1:53367 on AF=2 10.116.176.6:8080
2015/08/27 16:56:04 socat[1] N forked off child process 10
2015/08/27 16:56:04 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:04 socat[10] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:04 socat[10] N successfully connected from local address AF=2 10.116.176.6:52171
2015/08/27 16:56:04 socat[10] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:04 socat[10] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:04 socat[10] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:04 socat[10] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:04 socat[10] N exiting with status 0
2015/08/27 16:56:04 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:09 socat[1] N accepting connection from AF=2 10.116.176.1:53370 on AF=2 10.116.176.6:8080
2015/08/27 16:56:09 socat[1] N forked off child process 11
2015/08/27 16:56:09 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:09 socat[11] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:09 socat[11] N successfully connected from local address AF=2 10.116.176.6:52174
2015/08/27 16:56:09 socat[11] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:09 socat[11] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:09 socat[11] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:09 socat[11] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:09 socat[11] N exiting with status 0
2015/08/27 16:56:09 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:14 socat[1] N accepting connection from AF=2 10.116.176.1:53373 on AF=2 10.116.176.6:8080
2015/08/27 16:56:14 socat[1] N forked off child process 12
2015/08/27 16:56:14 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:14 socat[12] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:14 socat[12] N successfully connected from local address AF=2 10.116.176.6:52177
2015/08/27 16:56:14 socat[12] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:14 socat[12] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:14 socat[12] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:14 socat[12] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:14 socat[12] N exiting with status 0
2015/08/27 16:56:14 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:19 socat[1] N accepting connection from AF=2 10.116.176.1:53377 on AF=2 10.116.176.6:8080
2015/08/27 16:56:19 socat[1] N forked off child process 13
2015/08/27 16:56:19 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:19 socat[13] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:19 socat[13] N successfully connected from local address AF=2 10.116.176.6:52181
2015/08/27 16:56:19 socat[13] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:19 socat[13] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:19 socat[13] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:19 socat[13] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:19 socat[13] N exiting with status 0
2015/08/27 16:56:19 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:24 socat[1] N accepting connection from AF=2 10.116.176.1:53380 on AF=2 10.116.176.6:8080
2015/08/27 16:56:24 socat[1] N forked off child process 14
2015/08/27 16:56:24 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:29 socat[1] N accepting connection from AF=2 10.116.176.1:53382 on AF=2 10.116.176.6:8080
2015/08/27 16:56:29 socat[1] N forked off child process 15
2015/08/27 16:56:29 socat[1] N listening on AF=2 0.0.0.0:8080
2015/08/27 16:56:29 socat[15] N opening connection to AF=2 10.116.1.191:8080
2015/08/27 16:56:29 socat[15] N successfully connected from local address AF=2 10.116.176.6:52186
2015/08/27 16:56:29 socat[15] N starting data transfer loop with FDs [6,6] and [5,5]
2015/08/27 16:56:29 socat[15] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:29 socat[15] N socket 1 (fd 6) is at EOF
2015/08/27 16:56:29 socat[15] N socket 2 (fd 5) is at EOF
2015/08/27 16:56:29 socat[15] N exiting with status 0
2015/08/27 16:56:29 socat[1] N childdied(): handling signal 17
2015/08/27 16:56:33 socat[1] N socat_signal(): handling signal 11
2015/08/27 16:56:33 socat[1] E exiting on signal 11
2015/08/27 16:56:33 socat[1] N exit(139

我要做的是:

socat -x -v -d -d TCP-LISTEN:8080,reuseaddr,fork TCP:dnsname.of.the service:8080

/ # socat -V
socat by Gerhard Rieger - see www.dest-unreach.org
socat version 1.7.3.0 on Jun 16 2015 07:12:18
   running on Linux version #21-Ubuntu SMP Sun Jun 14 18:31:11 UTC 2015, release 3.19.0-21-generic, machine x86_64
features:
  #define WITH_STDIO 1
  #define WITH_FDNUM 1
  #define WITH_FILE 1
  #define WITH_CREAT 1
  #define WITH_GOPEN 1
  #define WITH_TERMIOS 1
  #define WITH_PIPE 1
  #define WITH_UNIX 1
  #define WITH_ABSTRACT_UNIXSOCKET 1
  #define WITH_IP4 1
  #define WITH_IP6 1
  #define WITH_RAWIP 1
  #define WITH_GENERICSOCKET 1
  #define WITH_INTERFACE 1
  #define WITH_TCP 1
  #define WITH_UDP 1
  #define WITH_SCTP 1
  #define WITH_LISTEN 1
  #define WITH_SOCKS4 1
  #define WITH_SOCKS4A 1
  #define WITH_PROXY 1
  #define WITH_SYSTEM 1
  #define WITH_EXEC 1
  #undef WITH_READLINE
  #define WITH_TUN 1
  #define WITH_PTY 1
  #undef WITH_OPENSSL
  #undef WITH_FIPS
  #undef WITH_LIBWRAP
  #define WITH_SYCLS 1
  #define WITH_FILAN 1
  #define WITH_RETRY 1
  #define WITH_MSGLEVEL 0 /*debug*/

任何帮助将不胜感激!

我也有同样的问题,但不完全是

2016/06/18 11:49:19 socat[19744] N listening on AF=2 0.0.0.0:25560
2016/06/18 11:49:23 socat[19744] N accepting connection from AF=2 127.0.0.1:53358 on AF=2 127.0.0.1:25560
2016/06/18 11:49:23 socat[19744] N forked off child process 19746
2016/06/18 11:49:23 socat[19744] N listening on AF=2 0.0.0.0:25560
2016/06/18 11:49:23 socat[19744] N socat_signal(): handling signal 11
2016/06/18 11:49:23 socat[19744] E exiting on signal 11
2016/06/18 11:49:23 socat[19744] N exit(139)

我认为socat不喜欢做dns解析,我不知道这是如何崩溃的,但如果我在没有分叉的情况下做同样的设置,那么socat就会卡住,无法再响应信号

我将ping {the server}并取括号

中的ip
64 bytes from hosted-by.reliablesite.net (104.243.34.98):
                                          ^^ use the ip instead

如果你可以使用ip,那么它将工作。

最新更新