teamgram/teamgram-server

客户端无法连接服务器呢?

robinfoxnan opened this issue · 3 comments

我在windows10下,和ubuntu18.04下都部署了,测试发现客户端连不上呢?能解答一下么?
在frontend中提示:

I0407 09:07:46.337977 10096 mtproto_server.go:94] onNewConnection 192.168.1.23:6044
I0407 09:07:46.338954 10096 server.go:140] onServerNewConnection - {peer: {connID: 58@frontend443-(192.168.1.23:12345->192.168.1.23:6044)}, ctx: {&{{0 0} 256 0xc00030ce10 0}}}
I0407 09:07:46.340953 10096 mtproto_proxy_codec.go:236] first_bytes_64: c7d428f9fe2f4b3da6f530529833f967a1db6dab1bb19a0e6e39e382dec363d685bafac770866d8bd229404cecdaefcaf091b35e88dbe5b6efefefef0100f79b
I0407 09:07:46.340953 10096 mtproto_app_codec.go:63] size1: 40
I0407 09:07:46.340953 10096 mtproto_server.go:102] onConnectionDataArrived 192.168.1.23:6044
I0407 09:07:46.342951 10096 server.go:145] onServerMessageDataArrived - receive data: {peer: {connID: 58@frontend443-(192.168.1.23:12345->192.168.1.23:6044)}, md: {conn_type: 1, auth_key_id: 0, quick_ack_id: 0, payload_len: 40}, msg: %!s(MISSING)}
I0407 09:07:46.343951 10096 server.go:301] onServerUnencryptedRawMessage - receive data: {peer: {connID: 58@frontend443-(192.168.1.23:12345->192.168.1.23:6044)}, ctx: &{{%!s(int32=0) %!s(uint32=0)} %!s(int=256) %!s(*mtproto.TLHandshakeData=&{0xc0009085f0 {} [] 0}) %!s(int64=0)}, msg: {conn_type: 1, auth_key_id: 0, quick_ack_id: 0, payload_len: 40}}
I0407 09:07:46.343951 10096 server.go:340] sendMessage - handshake: {peer: {connID: 58@frontend443-(192.168.1.23:12345->192.168.1.23:6044)}, md: request:<service_name:"handshake" method_name:"mtproto.TLHandshakeData" log_id:1247330190485360640 trace_id:1247330190485360642 span_id:1247330190485360643 > correlation_id:1247330190485360641 attachment_size:40 mtproto_meta:<auth_key_id:0 server_id:1 client_conn_id:58 client_addr:"192.168.1.23:6044" from:"frontend" receive_time:1586221666343 > , msg: data2:<state:513 client_conn_id:58 ctx:<constructor:CRC32_handshakeContext data2:<> > > }
I0407 09:07:46.349948 10096 server.go:223] onClientHandshakeMessage - handshake: peer({connID: 1@handshake-(127.0.0.1:5702->127.0.0.1:10005)}), state: {data2:<state:514 res_state:1 client_conn_id:58 ctx:<constructor:CRC32_handshakeContext data2:<nonce:"XM\240\027C\311\375\207\221\275\036}\341d\313\267" server_nonce:"\020uW\342\277\003\242?\004\263\210g^\254\277" > > > } I0407 09:07:46.349948 10096 server.go:245] onClientHandshakeMessage - sendToClient to: {peer: {connID: 58@frontend443-(192.168.1.23:12345->192.168.1.23:6044)}, handshake: data2:<state:514 res_state:1 client_conn_id:58 ctx:<constructor:CRC32_handshakeContext data2:<nonce:"XM\240\027C\311\375\207\221\275\036}\341d\313\267" server_nonce:"\020uW\342\277\003\242?\004\263\210g^\254\277" > > > }
I0407 09:07:46.356944 10096 mtproto_app_codec.go:63] size1: 88
I0407 09:07:46.356944 10096 mtproto_server.go:102] onConnectionDataArrived 192.168.1.23:6044
I0407 09:07:46.357944 10096 server.go:145] onServerMessageDataArrived - receive data: {peer: {connID: 58@frontend443-(192.168.1.23:12345->192.168.1.23:6044)}, md: {conn_type: 1, auth_key_id: 7899566645959756554, quick_ack_id: 0, payload_len: 88}, msg: %!s(MISSING)}
I0407 09:07:46.357944 10096 server.go:345] onServerEncryptedRawMessage - receive data: {peer: {connID: 58@frontend443-(192.168.1.23:12345->192.168.1.23:6044)}, ctx: &{{%!s(int32=0) %!s(uint32=0)} %!s(int=512) %!s(*mtproto.TLHandshakeData=&{0xc000713900 {} [] 0}) %!s(int64=0)}, msg: {conn_type: 1, auth_key_id: 7899566645959756554, quick_ack_id: 0, payload_len: 88}}
E0407 09:07:46.358957 10096 zrpc_client.go:140] not found kaddr by key: 7899566645959756554
I0407 09:07:48.825550 10096 mtproto_server.go:119] onConnectionClosed - 192.168.1.23:6044
I0407 09:07:48.835371 10096 server.go:176] onServerConnectionClosed - {peer: {connID: 58@frontend443-(192.168.1.23:12345->192.168.1.23:6044)}}

检查session服务日志

我看了MySQL的auth_keys表,里面有相关的KEY: 7899566645959756554,说明auth_key协商已经完毕了,查看了源代码,not found kaddr by key: 输出,代码是Ketama.go中的get()函数无法从哈希里找到东西,但是运行时候session中没有啥输出啊

请问这个问题解决了吗