TarsCloud / Tars

Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.
BSD 3-Clause "New" or "Revised" License
9.79k stars 2.08k forks source link

restart server, stop error: EM_TARS_UNKNOWN_ERR how to troubleshoot this kind of error? #798

Closed TARS-Question closed 4 years ago

TARS-Answer commented 4 years ago

Check the adminregistry log. Generally, the service does not exist or the time between the service and mysql is not consistent.

TARS-Answer commented 4 years ago

查看adminregistry的日志,一般是服务不存在或者是服务和mysql的时间不一致所导致的问题。

CyrusZhou-CN commented 2 years ago

DCache RouterServer 无法启动 image RouterServer 日志

[server config]:
  | Application(app) DCache
  | ServerName(server) TestRouterServer
  | BasePath(basepath) /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/bin/
  | DataPath(datapath) /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/data/
  | LocalIp(localip) 7.1.0.3
  | Local(local) tcp -h 127.0.0.1 -p 43756 -t 10000
  | LogPath(logpath) /usr/local/app/tars/app_log/
  | LogSize(logsize) 10485760
  | LogNum(lognum) 10
  | LogLevel(loglevel)
  | Log(log) tars.tarslog.LogObj
  | Node(node) tars.tarsnode.ServerObj@tcp -h 7.1.0.3 -p 19386 -t 60000
  | Config(config) tars.tarsconfig.ConfigObj
  | Notify(notify) tars.tarsnotify.NotifyObj
  | OpenCoroutine(opencoroutine) 0
  | CoroutineMemSize(coroutinememsize) 1073741824
  | CoroutineStackSize(coroutinestack) 131072
  | CloseCout(closecout) 1
  | NetThread(netthread) 1
  | ManualListen(manuallisten) 0
  | ReportFlow(reportflow) 1
  | BackPacketLimit(backpacketlimit) 100
  | BackPacketMin(backpacketmin) 1024
  | ----------------------------------------------------------------------------------------------------
  | [set file cache ] OK
  | ----------------------------------------------------------------------------------------------------
  | [set roll logger] OK
  | ----------------------------------------------------------------------------------------------------
  | [set time logger] OK
  | ----------------------------------------------------------------------------------------------------
  | [set remote config] OK
  | ----------------------------------------------------------------------------------------------------
  | [set remote notify] OK
  | ----------------------------------------------------------------------------------------------------
  | [set node proxy] OK
  | ----------------------------------------------------------------------------------------------------
  | [set admin adapter] OK
  | [TC_Socket::bind] bind error :Address already in use, 127.0.0.1:43756
  | bind:tcp -h 127.0.0.1 -p 43756 -t 10000 error:std::exception
  | [Application]:std::exception

tarsAdminRegistry 日志

2022-02-09 09:40:52\|139898073896704\|DEBUG\|ExecuteTask::getTaskRsp, taskNo=e6193914ab904cb388edad3b261e35ef, rsp:{"createTime":"2022-02-09 09:40:52","status":0,"serial":true,"taskNo":"e6193914ab904cb388edad3b261e35ef","userName":"admin","taskItemRsp":[{"percent":0,"executeLog":"","statusInfo":"EM_I_RUNNING","endTime":"","startTime":"2022-02-09 09:40:52","status":1,"req":{"userName":"admin","command":"restart","parameters":{},"setName":"","serverName":"TestRouterServer","nodeName":"7.1.0.3","application":"DCache","itemNo":"6e029e4dbaef475c8332f83c935c564b","taskNo":"e6193914ab904cb388edad3b261e35ef"}}]}
--
  | 2022-02-09 09:40:56\|139898040325888\|DEBUG\|ExecuteTask::getTaskRsp, taskNo=e6193914ab904cb388edad3b261e35ef
  | 2022-02-09 09:40:56\|139898040325888\|DEBUG\|ExecuteTask::getTaskRsp, taskNo=e6193914ab904cb388edad3b261e35ef, rsp:{"createTime":"2022-02-09 09:40:52","status":0,"serial":true,"taskNo":"e6193914ab904cb388edad3b261e35ef","userName":"admin","taskItemRsp":[{"percent":0,"executeLog":"startServer [DCache.TestRouterServer] from 7.1.0.3 :server is activating, please check: ","statusInfo":"EM_I_SUCCESS","endTime":"2022-02-09 09:40:53","startTime":"2022-02-09 09:40:52","status":2,"req":{"userName":"admin","command":"restart","parameters":{},"setName":"","serverName":"TestRouterServer","nodeName":"7.1.0.3","application":"DCache","itemNo":"6e029e4dbaef475c8332f83c935c564b","taskNo":"e6193914ab904cb388edad3b261e35ef"}}]}
  | 2022-02-09 09:40:59\|139898090682112\|DEBUG\|updateRegistryInfo2Db affected:4
  | 2022-02-09 09:40:59\|139898090682112\|DEBUG\|loadIPPhysicalGroupInfo get server group from db, records affected:0
  | 2022-02-09 09:40:59\|139898048718592\|DEBUG\|into getLogData
CyrusZhou-CN commented 2 years ago

/usr/local/app/tars/app_log//DCache/TestRouterServer/DCache.TestRouterServer.log


====================================================================================================
[proxy config]:                                   
----------------------------------------------------------------------------------------------------
[load client]:                                    
locator                                           tars.tarsregistry.QueryObj@tcp -h 7.1.0.3 -p 17890:tcp -h 7.1.0.4 -p 17890
sync-invoke-timeout                               3000
async-invoke-timeout                              5000
refresh-endpoint-interval                         60000
stat                                              tars.tarsstat.StatObj
property                                          tars.tarsproperty.PropertyObj
report-interval                                   60000
keep-alive-interval                               
netthread                                         
asyncthread                                       3
modulename                                        DCache.TestRouterServer
enableset                                         n
setdivision                                       NULL
----------------------------------------------------------------------------------------------------
[server config]:                                  
Application(app)                                  DCache
ServerName(server)                                TestRouterServer
BasePath(basepath)                                /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/bin/
DataPath(datapath)                                /usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/data/
LocalIp(localip)                                  7.1.0.3
Local(local)                                      tcp -h 127.0.0.1 -p 43756 -t 10000
LogPath(logpath)                                  /usr/local/app/tars/app_log/
LogSize(logsize)                                  10485760
LogNum(lognum)                                    10
LogLevel(loglevel)                                
Log(log)                                          tars.tarslog.LogObj
Node(node)                                        tars.tarsnode.ServerObj@tcp -h 7.1.0.3 -p 19386 -t 60000
Config(config)                                    tars.tarsconfig.ConfigObj
Notify(notify)                                    tars.tarsnotify.NotifyObj
OpenCoroutine(opencoroutine)                      0
CoroutineMemSize(coroutinememsize)                1073741824
CoroutineStackSize(coroutinestack)                131072
CloseCout(closecout)                              1
NetThread(netthread)                              1
ManualListen(manuallisten)                        0
ReportFlow(reportflow)                            1
BackPacketLimit(backpacketlimit)                  100
BackPacketMin(backpacketmin)                      1024
----------------------------------------------------------------------------------------------------
[set file cache ]                                 OK
----------------------------------------------------------------------------------------------------
[set roll logger]                                 OK
----------------------------------------------------------------------------------------------------
[set time logger]                                 OK
----------------------------------------------------------------------------------------------------
[set remote config]                               OK
----------------------------------------------------------------------------------------------------
[set remote notify]                               OK
----------------------------------------------------------------------------------------------------
[set node proxy]                                  OK
----------------------------------------------------------------------------------------------------
[set admin adapter]                               OK
[TC_Socket::bind] bind error :Address already in use, 127.0.0.1:43756
bind:tcp -h 127.0.0.1 -p 43756 -t 10000 error:std::exception
[Application]:std::exception
/usr/local/app/tars/tarsnode/data/DCache.TestRouterServer/bin/TestRouterServer redirect stdout and stderr  to /usr/local/app/tars/app_log//DCache/TestRouterServer/DCache.TestRouterServer.log