ArcGIS Server服务无法启动日志

服务器断电后再次开机,ArcGIS for Server系统服务无法启动。手动启动服务后,服务状态会自动变回为Stop状态。
service_error.log中的错误信息如下:
com.esri.arcgis.discovery.nodeagent.NodeAgentException: java.lang.RuntimeException: com.esri.arcgis.discovery.json.JSONException: A JSONObject text must begin with ''{'' at character 1 of
at com.esri.arcgis.discovery.nodeagent.impl.NodeAgent.start(NodeAgent.java:268)
at com.esri.arcgis.discovery.nodeagent.impl.Main.start(Main.java:52)
Caused by: java.lang.RuntimeException: com.esri.arcgis.discovery.json.JSONException: A JSONObject text must begin with ''{'' at character 1 of
at com.esri.arcgis.discovery.logging.impl.LogService.init(LogService.java:325)
at com.esri.arcgis.discovery.logging.impl.LogService.<init>(LogService.java:96)
at com.esri.arcgis.discovery.nodeagent.impl.NodeAgent.registerLogService(NodeAgent.java:555)
at com.esri.arcgis.discovery.nodeagent.impl.NodeAgent.start(NodeAgent.java:257)
... 1 more
Caused by: com.esri.arcgis.discovery.json.JSONException: A JSONObject text must begin with ''{'' at character 1 of
at com.esri.arcgis.discovery.json.JSONTokener.syntaxError(JSONTokener.java:450)
at com.esri.arcgis.discovery.json.JSONObject.<init>(JSONObject.java:178)
at com.esri.arcgis.discovery.json.JSONObject.<init>(JSONObject.java:276)
at com.esri.arcgis.discovery.logging.LogConfig.fromJSONString(LogConfig.java:186)
at com.esri.arcgis.discovery.logging.impl.LogService.init(LogService.java:284)
... 4 more
java.lang.RuntimeException: com.esri.arcgis.discovery.json.JSONException: A JSONObject text must begin with ''{'' at character 1 of
at com.esri.arcgis.discovery.logging.impl.LogService.init(LogService.java:325)
at com.esri.arcgis.discovery.logging.impl.LogService.<init>(LogService.java:96)
at com.esri.arcgis.discovery.nodeagent.impl.NodeAgent.registerLogService(NodeAgent.java:555)
at com.esri.arcgis.discovery.nodeagent.impl.NodeAgent.start(NodeAgent.java:257)
at com.esri.arcgis.discovery.nodeagent.impl.Main.start(Main.java:52)
Caused by: com.esri.arcgis.discovery.json.JSONException: A JSONObject text must begin with ''{'' at character 1 of
at com.esri.arcgis.discovery.json.JSONTokener.syntaxError(JSONTokener.java:450)
at com.esri.arcgis.discovery.json.JSONObject.<init>(JSONObject.java:178)
at com.esri.arcgis.discovery.json.JSONObject.<init>(JSONObject.java:276)
at com.esri.arcgis.discovery.logging.LogConfig.fromJSONString(LogConfig.java:186)
at com.esri.arcgis.discovery.logging.impl.LogService.init(LogService.java:284)
... 4 more

service.log中提到如下信息:

Mon Nov 09 17:24:42 PKT 2015:Start NodeAgent.start().
Mon Nov 09 17:24:42 PKT 2015:Loading all observers.
Mon Nov 09 17:24:43 PKT 2015:Invoking beforeStart() for all observers.
WARNING: Could not connect to Log service. Writing log message to console.
<Msg time=2015-11-09T17:24:43,296 type=DEBUG code=9999 source=Admin process=4024 thread=1 methodName= machine= user= elapsed=>Loading all observers.</Msg>
Mon Nov 09 17:24:57 PKT 2015:Starting RMI connector for NodeAgent.
Mon Nov 09 17:24:58 PKT 2015:Registering NodeAgent as JMX bean.
Mon Nov 09 17:24:58 PKT 2015:Registering and starting log service.
已邀请:

张赛

赞同来自:

【解决办法】:
问题分析:
首先,根据上述log信息中提到(1)json对象以及(2)service.log的Registering and starting log service,可判断这一错误的出现是由某个与log有关的json文件导致的。
其次,日志中提到A JSONObject text must begin with ''{'' at character 1 of,说明在json文件中可能由于字符编码或其他原因导致读取json文件读取错误
基于上述判断以及进一步的分析,问题可定位至【ArcGIS Server】安装目录\framework\etc下的arcgis-logsettings.json文件。通过向这一文件开头输入其他非{字符,从而可浮现类似情况,即ArcGIS Server 系统服务启动后自动关闭。 

解决方案:
修改arcgis-logsettings.json文件,确保其符合正确的格式。具体格式如图所示。

[attach]https://c.ap1.content.force.co ... 6HUM6[/attach]

许丹石 - Esri技术支持工程师

赞同来自:

补充,文件格式例如:
{
  "logDir": "C:\\arcgisserver\\logs\\",
  "logLevel": "WARNING",
  "maxErrorReportsCount": 10,
  "maxLogFileAge": 90,
  "usageMeteringEnabled": false,
  "statisticsConfig": {
    "enabled": true,
    "samplingInterval": 30,
    "maxHistory": 0,
    "statisticsDir": "E:\\arcgisserver\\directories\\arcgissystem"
  }
}

要回复问题请先登录注册