默认
发表评论 4
想开发IM:买成品怕坑?租第3方怕贵?找开源自已撸?尽量别走弯路了... 找站长给点建议
[已回复] MobileIMSDK 客户端经常掉线、自动重连 求助
阅读(34128) | 评论(4 收藏 淘帖
客户端报这个错
ERROR - 【IMCORE】收到服务端的“尚未登陆”的错误消息,心跳线程将停止,请应用层重新登陆. [2017-9-28 10:58:27]
服务器端报这个错
[INFO] - [11:04:19.629][IMCORE]与{uid:99999,cid:99999}/192.168.1.200:64343的会话关闭(user_id=99999,loginName=99999)了... | (ServerCoreHandler^sessionClosed:509)
[WARN] - [11:04:19.629][IMCORE]!用户id=99999不存在在线列表中,本次removeUser没有继续. | (UserProcessor^removeUser:140)
[DEBUG] - [11:04:19.630]【@】当前在线用户共(0)人-------------------> | (UserProcessor^__printOnline:120)


以上信息可以判断是什么原因造成的吗?
v2版本的框架

即时通讯网 - 即时通讯开发者社区! 来源: - 即时通讯开发者社区!

标签:MobileIMSDK
上一篇:[已回复] MobileIMSDK的s2c消息是如何实现的?我应该怎么用?下一篇:[已回复] MobileIMSDK客户端如何改成消息发送未成功时自动无限次重发?
推荐方案
评论 4
首先你说的“客户端经常掉线”是不正常的情况,先解决这个问题后再来看你提出的这个问题可能就不存在。

你需要贴出你完整的客户端Log(越全越好)、服务端的log(越全越好),分析一下。
[DEBUG] - [13:58:54.050]正在调用回调方法:OnUserLogoutAction_CallBack... | (ServerEventListenerImpl^onUserLogoutAction_CallBack:41)
[INFO] - [13:58:55.921][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:58:58.920][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:01.921][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:04.926][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:04.937][IMCORE]与{uid:null,cid:-1}/192.168.1.200:56708的会话建立(sessionCreated)了... | (ServerCoreHandler^sessionCreated:546)
[INFO] - [13:59:04.937][IMCORE]>> 客户端{uid:null,cid:-1}/192.168.1.200:56708发过来的登陆信息内容是:getLoginName=99999|getLoginPsw=1 | (ServerCoreHandler^messageReceived:277)
[DEBUG] - [13:59:04.937]正在调用回调方法:OnVerifyUserCallBack...(extra=null) | (ServerEventListenerImpl^onVerifyUserCallBack:27)
[INFO] - [13:59:04.938][IMCORE]与{uid:null,cid:-1}/192.168.1.200:56708的会话(sessionOpened)打开了... | (ServerCoreHandler^sessionOpened:573)
[DEBUG] - [13:59:04.938]【@】当前在线用户共(2)人-------------------> | (UserProcessor^__printOnline:121)
[DEBUG] - [13:59:04.938]正在调用回调方法:OnUserLoginAction_CallBack... | (ServerEventListenerImpl^onUserLoginAction_CallBack:35)
[INFO] - [13:59:04.943]>> 收到客户端{uid:99999,cid:99999}/192.168.1.200:56708的通用数据发送请求. | (ServerCoreHandler^messageReceived:115)
[DEBUG] - [13:59:04.943]【IMCORE】【QoS机制_S2C】收到99999发过来的指纹为54be528f-7e93-4811-851e-be370038b859的应答包. | (ServerCoreHandler^messageReceived:137)
[DEBUG] - [13:59:04.943]【DEBUG_QoS_S2C事件】收到对方已收到消息事件的通知,fp=54be528f-7e93-4811-851e-be370038b859 | (MessageQoSEventS2CListnerImpl^messagesBeReceived:38)
[INFO] - [13:59:15.061][IMCORE]与{uid:99999,cid:99999}/192.168.1.200:56707的会话关闭(user_id=99999,loginName=99999)了... | (ServerCoreHandler^sessionClosed:510)
[DEBUG] - [13:59:15.061]正在调用回调方法:OnUserLogoutAction_CallBack... | (ServerEventListenerImpl^onUserLogoutAction_CallBack:41)
[INFO] - [13:59:16.945][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:19.945][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:22.946][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:25.948][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:25.953][IMCORE]与{uid:null,cid:-1}/192.168.1.200:56709的会话建立(sessionCreated)了... | (ServerCoreHandler^sessionCreated:546)
[INFO] - [13:59:25.953][IMCORE]与{uid:null,cid:-1}/192.168.1.200:56709的会话(sessionOpened)打开了... | (ServerCoreHandler^sessionOpened:573)
[INFO] - [13:59:25.955][IMCORE]>> 客户端{uid:null,cid:-1}/192.168.1.200:56709发过来的登陆信息内容是:getLoginName=99999|getLoginPsw=1 | (ServerCoreHandler^messageReceived:277)
[DEBUG] - [13:59:25.956]正在调用回调方法:OnVerifyUserCallBack...(extra=null) | (ServerEventListenerImpl^onVerifyUserCallBack:27)
[DEBUG] - [13:59:25.956]【@】当前在线用户共(2)人-------------------> | (UserProcessor^__printOnline:121)
[DEBUG] - [13:59:25.956]正在调用回调方法:OnUserLoginAction_CallBack... | (ServerEventListenerImpl^onUserLoginAction_CallBack:35)
[INFO] - [13:59:25.959]>> 收到客户端{uid:99999,cid:99999}/192.168.1.200:56709的通用数据发送请求. | (ServerCoreHandler^messageReceived:115)
[DEBUG] - [13:59:25.959]【IMCORE】【QoS机制_S2C】收到99999发过来的指纹为d6c21a79-a12d-41be-aa5d-995a2eeb7556的应答包. | (ServerCoreHandler^messageReceived:137)
[DEBUG] - [13:59:25.959]【DEBUG_QoS_S2C事件】收到对方已收到消息事件的通知,fp=d6c21a79-a12d-41be-aa5d-995a2eeb7556 | (MessageQoSEventS2CListnerImpl^messagesBeReceived:38)
[INFO] - [13:59:36.074][IMCORE]与{uid:99999,cid:99999}/192.168.1.200:56708的会话关闭(user_id=99999,loginName=99999)了... | (ServerCoreHandler^sessionClosed:510)
[DEBUG] - [13:59:36.074]正在调用回调方法:OnUserLogoutAction_CallBack... | (ServerEventListenerImpl^onUserLogoutAction_CallBack:41)
[INFO] - [13:59:37.964][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:40.965][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:43.966][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:46.968][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [13:59:46.971][IMCORE]与{uid:null,cid:-1}/192.168.1.200:55210的会话建立(sessionCreated)了... | (ServerCoreHandler^sessionCreated:546)
[INFO] - [13:59:46.972][IMCORE]与{uid:null,cid:-1}/192.168.1.200:55210的会话(sessionOpened)打开了... | (ServerCoreHandler^sessionOpened:573)
[INFO] - [13:59:46.972][IMCORE]>> 客户端{uid:null,cid:-1}/192.168.1.200:55210发过来的登陆信息内容是:getLoginName=99999|getLoginPsw=1 | (ServerCoreHandler^messageReceived:277)
[DEBUG] - [13:59:46.972]正在调用回调方法:OnVerifyUserCallBack...(extra=null) | (ServerEventListenerImpl^onVerifyUserCallBack:27)
[DEBUG] - [13:59:46.974]【@】当前在线用户共(2)人-------------------> | (UserProcessor^__printOnline:121)
[DEBUG] - [13:59:46.974]正在调用回调方法:OnUserLoginAction_CallBack... | (ServerEventListenerImpl^onUserLoginAction_CallBack:35)
[INFO] - [13:59:46.975]>> 收到客户端{uid:99999,cid:99999}/192.168.1.200:55210的通用数据发送请求. | (ServerCoreHandler^messageReceived:115)
[DEBUG] - [13:59:46.975]【IMCORE】【QoS机制_S2C】收到99999发过来的指纹为cc9add5c-070c-4f5c-a821-fba115207fc7的应答包. | (ServerCoreHandler^messageReceived:137)
[DEBUG] - [13:59:46.975]【DEBUG_QoS_S2C事件】收到对方已收到消息事件的通知,fp=cc9add5c-070c-4f5c-a821-fba115207fc7 | (MessageQoSEventS2CListnerImpl^messagesBeReceived:38)
[INFO] - [13:59:57.077][IMCORE]与{uid:99999,cid:99999}/192.168.1.200:56709的会话关闭(user_id=99999,loginName=99999)了... | (ServerCoreHandler^sessionClosed:510)
[DEBUG] - [13:59:57.077]正在调用回调方法:OnUserLogoutAction_CallBack... | (ServerEventListenerImpl^onUserLogoutAction_CallBack:41)
[INFO] - [13:59:58.979][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [14:00:01.980][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [14:00:04.981][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [14:00:07.982][IMCORE]toSession==null >> id=0的用户尝试发给客户端99999的消息:str={}因接收方的id已不在线,此次实时发送没有继续(此消息可考虑作离线处理哦). | (ServerCoreHandler^sendData:686)
[INFO] - [14:00:07.986][IMCORE]与{uid:null,cid:-1}/192.168.1.200:61123的会话建立(sessionCreated)了... | (ServerCoreHandler^sessionCreated:546)
[INFO] - [14:00:07.986][IMCORE]与{uid:null,cid:-1}/192.168.1.200:61123的会话(sessionOpened)打开了... | (ServerCoreHandler^sessionOpened:573)
[INFO] - [14:00:07.986][IMCORE]>> 客户端{uid:null,cid:-1}/192.168.1.200:61123发过来的登陆信息内容是:getLoginName=99999|getLoginPsw=1 | (ServerCoreHandler^messageReceived:277)
[DEBUG] - [14:00:07.986]正在调用回调方法:OnVerifyUserCallBack...(extra=null) | (ServerEventListenerImpl^onVerifyUserCallBack:27)
[DEBUG] - [14:00:07.987]【@】当前在线用户共(2)人-------------------> | (UserProcessor^__printOnline:121)
[DEBUG] - [14:00:07.987]正在调用回调方法:OnUserLoginAction_CallBack... | (ServerEventListenerImpl^onUserLoginAction_CallBack:35)
[INFO] - [14:00:07.990]>> 收到客户端{uid:99999,cid:99999}/192.168.1.200:61123的通用数据发送请求. | (ServerCoreHandler^messageReceived:115)
[DEBUG] - [14:00:07.990]【IMCORE】【QoS机制_S2C】收到99999发过来的指纹为c20c30c8-a1c9-470c-a364-30abbea634bb的应答包. | (ServerCoreHandler^messageReceived:137)
[DEBUG] - [14:00:07.990]【DEBUG_QoS_S2C事件】收到对方已收到消息事件的通知,fp=c20c30c8-a1c9-470c-a364-30abbea634bb | (MessageQoSEventS2CListnerImpl^messagesBeReceived:38)
jack
这是服务器控制台输出
帮帮我
引用:吴佳同 发表于 2017-09-28 14:02
jack
这是服务器控制台输出
帮帮我

还有客户端的log也贴一下,两端对照着看才有意义
打赏楼主 ×
使用微信打赏! 使用支付宝打赏!

返回顶部