MOSN内部日志说明

更新时间:

MOSN 内部日志主要打印在 /home/admin/logs/mosn 目录下。

日志名称

说明

default.log

主要用于打印 MOSN 内部的常规日志。

说明

MOSN的日志级别默认为ERROR,仅输出异常日志。当您定位问题时可动态开启为INFO级别。

out.log

打印 MOSN 启动的重定向输出日志,如 MOSN 启动异常、GC 或者出现 panic 等。

antvip.access.log

打印 acvip 访问日志。主要包括:

  • acvip 初始化日志

    2020-12-20 16:23:15,999 [INFO] [antvip] initialized antvip client with config: &{metrics:0x35a67c0 appName:crpc-client datacenter:dc1 zone:GZ00I instanceID: endpoint: accessKey: accessSecret: trFrom:go-client version:1.0.4 domainChecksumMode:1 syncInterval:1000000000 syncTimeout:90000000000 httpLocator:{https:false address:antvip-pool port:9500 endpoint:/antvip/serversByZone.do timeout:5000000000 interval:30000000000 accesslog:false} registryLocator:{timeout:5000000000} alipaySyncer:{https:false port:9500 endpoint:/antvipDomains accesslog:false zi:<nil>} cloudSyncer:{https:false address:11.167.XX.XX port:9003 endpoint:/antcloud/antvip/instances/get accesslog:true}}
  • 从 acvip 服务端拉取地址日志

    2020-12-20 16:25:47,118 [INFO] [antvip] AlipaySyncer POST(polling=true) http://11.167.XX.XX:9003/antcloud/antvip/instances/get 200 000001-GZ00I-GW_CLOUD&000001-DDCS_CLOUD&[1] <nil> 17.126614ms timeout=1m30s

drm.access.log

打印 DRM 访问日志。主要包括:

  • DRM 初始化日志

    2020-12-20 16:23:17,50 [INFO] [drm] initialized drm client with config: &{instanceID:00**** zone:GZ00I dataCenter:dc1 appName:crpc-client profile: advertiseIFace: accessKey: secretKey: hear
    tbeatInterval:30000000000 registryLocator:{timeout:3000000000} boltTransport:{timeout:30000000000 maxPendingCommands:2048 maxHeartbeatAttempts:3} antvipLocator:{domain:000001-DDCS_CLOUD tim
    eout:3000000000}}
  • 从 acvip 获取服务地址日志

    2020-12-20 16:23:16,44 [INFO] [drm] get servers from antvip: [{11.167.XX.XX  1 80 true DEV-SHANGHAI-ET15-ZONEA dc2 map[]} {11.165.xx.xx  1 80 true DEV-SHANGHAI-ET15-ZONEA dc1 map[]} {11.1
    65.XX.XX  1 80 false DEV-SHANGHAI-ET15-ZONEA dc1 map[]} {11.167.XX.XX  1 80 false DEV-SHANGHAI-ET15-ZONEA  map[]}]
    2020-12-20 16:23:16,50 [INFO] [drm] redial choose 11.167.XX.XX:9880
  • 订阅 dataId 日志

    2020-12-20 16:23:17,51 [INFO] [drm] send class=com.alipay.drm.client.api.model.pb.SubscriberRegReqPb req=baseInfo:<zone:"GZ00I" dataId:"Alipay.crpc-client:name=com.alipay.sofa.middleware.me
    sh.drm.MsgResource.msgSep,version=3.0@DRM" uuid:"0ce5252f-8c89-4d8c-8c63-9ffaa0dcab98" instanceId:"000001" >  res=nil err=nil elapsed=18.399µs
  • 收到 DRM 服务端推送通知,进行更新

    2020-12-20 16:24:43,554 [INFO] [drm] drm push dataID=sofa.config:name=com.alipay.sofa.middleware.servicegov.apps.crpc-client.downgradeRule,version=3.0@DRM command="CMD:zone=DEFAULT_ZONE,version=125:R@DRM"
    2020-12-20 16:24:43,569 [INFO] [drm] fetch GET http://11.167.XX.XX/queryDrmData.htm?dataId=sofa.config:name=com.alipay.sofa.middleware.servicegov.apps.crpc-client.downgradeRule,version=3.0@DRM&zone=DEFAULT_ZONE&version=125&profile=&instanceId=00**** 200 <{"appName":"crpc-client","type":"SOFA","enabled":true,"downgrade...> [125] 78 <nil> 14.886412ms
    2020-12-20 16:24:43,569 [INFO] [drm] update local value dataID=sofa.config:name=com.alipay.sofa.middleware.servicegov.apps.crpc-client.downgradeRule,version=3.0@DRM value={"appName":"crpc-client","type":"SOFA","enabled":true,"downgradeRules":[]} version=125

endpoint.access.log

打印 MOSN 启动时,模块初始化日志。主要包括:

  • Annotation 初始化日志

    2020-12-20 16:23:15,999 [INFO] [endpoint] [registryengine] [pubSubFromAnnotations] annoApp info from annotation:
    2020-12-20 16:23:15,999 [INFO] [endpoint] [registryengine] [pubSubFromAnnotations] {"antShareCloud":true,"instanceId":"00******","AntvipServerAddress":"11.167.XX.XX","dataCenter":"dc1","zon
    e":"GZ00I","appName":"crpc-client"}
    2020-12-20 16:23:15,999 [INFO] [endpoint] [registryengine] [pubSubFromAnnotations] pub info from annotation:
    2020-12-20 16:23:15,999 [INFO] [endpoint] [registryengine] [pubSubFromAnnotations] []
    2020-12-20 16:23:15,999 [INFO] [endpoint] [registryengine] [pubSubFromAnnotations] sub info from annotation:
    2020-12-20 16:23:15,999 [INFO] [endpoint] [registryengine] [pubSubFromAnnotations] [{"serviceName":"org.example.services.userInterface.IHelloService:1.0.0:default@crpc","protocol":"crpc"} {
    "serviceName":"org.example.services.echoService.XyEchoService:1.0.0:default@crpc","protocol":"crpc"}]
    2020-12-20 16:23:28,230 [INFO] [endpoint] [registryengine] [pubSubFromAnnotations] pubsub annotations done
    2020-12-20 16:23:28,230 [INFO] [endpoint] [registryengine] [pubSubFromAnnotations] done
  • 后端服务健康检查日志

    2020-12-20 16:37:00,32 [INFO] [endpoint] [health check] [confreg callback]  host=127.0.0.1:9999 changed=false isHealthy=true
    2020-12-20 16:37:00,63 [INFO] [endpoint] [health check] [conf callback once] host=127.0.0.1:9999 cluster=local_crpc_service_org.example.services.echoService.XyEchoService:1.0.0:default@crpc changed=false isHealthy=true

gateway.access.log

打印 APIGateway 初始化日志和从 acvip 获取的网关服务地址信息。

2020-12-20 16:42:22,199 [INFO] [gateway] Received gateway address changed event. domain = &{Name:000001-GZ00S-GW_CLOUD ProtectThreshold:50 HealthCheckType:TCP HealthCheckDefaultPort:12200 HealthCheckTimeout:2000 HealthCheckInterval:5000 HealthCheckRaise:1 HealthCheckFall:3 HealthCheckEnable:false HealthCheckPayload:map[] Version:4 RealNodes:[{Ip:100.88.177.40 Weight:1 HealthCheckPort:30777 Zone:ACVIP-TEST Available:true RoundTripTime:5 Reason:Success LastHealthCheckTime:1607689660570 DataCenter: Falling:false Labels:map[]}] Labels:map[] IsDeleted:false ZoneInfoList:<nil> weightedAvailableRealServers:[] availableRealServers:[] allRealServer:[] weightedAllRealServers:[] idcWeightedAvailableRsMap:map[] cityWeightedAvailableRsMap:map[] idcWeightedCntMap:map[]}
2020-12-20 16:42:22,199 [INFO] [gateway] Update gateway address success. new servers = [{Address:100.88.177.40:30777 Host:100.88.177.40}]

skywalking.access.log

打印 Skywalking 初始化日志和从 acvip 获取 Skywalking 地址信息。

2020-12-20 16:42:22,217 [INFO] [skywalking] Received sw address changed event. domain = &{Name:000001-SkyWalking_CLOUD ProtectThreshold:50 HealthCheckType:TCP HealthCheckDefaultPort:12200 HealthCheckTimeout:2000 HealthCheckInterval:5000 HealthCheckRaise:1 HealthCheckFall:3 HealthCheckEnable:false HealthCheckPayload:map[] Version:6 RealNodes:[{Ip:11.167.XX.XX Weight:1 HealthCheckPort:11800 Zone:CZ00A Available:true RoundTripTime:6 Reason:Success LastHealthCheckTime:1608112125577 DataCenter: Falling:false Labels:map[]}] Labels:map[] IsDeleted:false ZoneInfoList:<nil> weightedAvailableRealServers:[] availableRealServers:[] allRealServer:[] weightedAllRealServers:[] idcWeightedAvailableRsMap:map[] cityWeightedAvailableRsMap:map[] idcWeightedCntMap:map[]}
2020-12-20 16:42:22,217 [INFO] [skywalking] Update sw address success. new servers = [11.xx.xx.49:11800

flow-control.log

打印限流 metric 日志。

2020-12-20 16:24:46,909 [INFO] |org.example.services.userInterface.IHelloService:1.0.0:default@****.sayHi:o:r#o|3|0|3|0|2|0|0|2|0|0|0

日志格式说明:datetime | 资源点名 | pass | block | complete | exception | rt | 预占用值(忽略) | 瞬时并发量 | 资源点类型 | 监控模式 block | 秒级最大并发量 | CE 汇报的线程占用量

fault_tolerance.log

打印故障隔离日志。

fault_inject.log

打印故障注入日志。

downgrade.log

打印降级日志。

2020-12-20 16:23:17,955 [INFO] [downgrade] receive drm resource push sofa.config:name=com.alipay.sofa.middleware.servicegov.apps.crpc-client.downgradeRule,version=3.0@DRM={"appName":"crpc-client","type":"SOFA","enabled":true,"downgradeRules":[{"enabled":true,"conditions":[{"type":"SYSTEM","field":"destination.service.name","operation":"EQUAL","value":["org.example.services.userInterface.IHelloService:1.0.0:default@crpc"]},{"type":"SYSTEM","field":"destination.method.name","operation":"EQUAL","value":["sayHi"]}],"actions":[{"type":"REJECT","enabled":true,"extension":[{}]}],"logConfig":{"level":"WARN","enabled":true}}]}
2020-12-20 16:23:17,956 [INFO] local downgrade rules: &{AppName:crpc-client Enabled:true DowngradeRules:[0xc00220ad20]}
2020-12-20 16:24:43,569 [INFO] [downgrade] receive drm resource push sofa.config:name=com.alipay.sofa.middleware.servicegov.apps.crpc-client.downgradeRule,version=3.0@DRM={"appName":"crpc-client","type":"SOFA","enabled":true,"downgradeRules":[]}
2020-12-20 16:24:43,569 [INFO] local downgrade rules: &{AppName:crpc-client Enabled:true DowngradeRules:[]}