Worklight v6 iwap

时间:2013-06-24 14:35:25

标签: ibm-mobilefirst worklight-security worklight-analytics

我设置了Worklight V6 Server和IWAP。 我发现我的worklight app控制台有分析选项卡,还有IWAP控制台。 有仪表板视图,搜索视图,搜索日志视图,地理分析视图。

然后我在我的应用程序中放入WL.Logger.error和WL.Analytics.log代码并发出这些日志 但我在IWAP控制台上找不到任何数据。 并且我的IWAP日志中存在以下NumberFormatException。我能解决这个问题吗?

[2013-06-24 18:02:35,998][DEBUG][action.search.type       ] [Rattler] [worklight][7], node[M8YymIEGQbae4fbtkc2cyA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@465651a2]
org.elasticsearch.search.SearchParseException: [worklight][7]: from[0],size[-1],sort[<custom:"worklight_data.timestamp": org.elasticsearch.index.field.data.longs.LongFieldDataType$1@79b8644>!]: Parse Failure [Failed to parse source [{"sort": {"worklight_data.timestamp": {"order": "desc"}}, "from": 0, "script_fields": {}, "facets": {}, "query": {"query_string": {"query": "worklight_data.log.message:* AND worklight_data.timestamp:[NaN TO * ]"}}, "size": 1000}]]
        at org.elasticsearch.search.SearchService.parseSource(SearchService.java:566)
        at org.elasticsearch.search.SearchService.createContext(SearchService.java:481)
        at org.elasticsearch.search.SearchService.createContext(SearchService.java:466)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:236)
        at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:141)
        at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
        at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205)
        at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192)
        at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:178)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
        at java.lang.Thread.run(Thread.java:779)
Caused by: java.lang.NumberFormatException: For input string: "NaN"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:76)
        at java.lang.Long.parseLong(Long.java:452)
        at java.lang.Long.parseLong(Long.java:494)
        at org.elasticsearch.index.mapper.core.LongFieldMapper.rangeQuery(LongFieldMapper.java:176)
        at org.apache.lucene.queryParser.MapperQueryParser.getRangeQuerySingle(MapperQueryParser.java:342)
        at org.apache.lucene.queryParser.MapperQueryParser.getRangeQuery(MapperQueryParser.java:331)
        at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1496)
        at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1319)
        at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1275)
        at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
        at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
        at org.elasticsearch.index.query.QueryStringQueryParser.parse(QueryStringQueryParser.java:212)
        at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:188)

1 个答案:

答案 0 :(得分:1)

请检查以下内容:

1 - 您使用的是开发者版吗?在Worklight v6中,Analytics控制台无法在开发人员版本中运行。这可能会在将来的版本中更改。我之前从未见过这个例外,但我想知道它是否因为尝试使用开发人员版本而发生。

2 - 在您的initOptions.js中,分析已设置为true:

  

analytics:{enabled:true}

3 - 在worklight.properties中,您应该将队列大小设置为1,以便在控制台上立即看到分析

  

wl.analytics.queue.size = 1

重要提示队列大小应仅在测试模式下设置为1,因为使用1不会在生产模式下缩放。

如果您仍然遇到问题,请将更多信息发布到WL.Analytics.log和您的worklight.properties以进行分析。

修改

如果您在开发模式下运行Worklight 6.0,则需要在worklight.properties中使用以下标志:

wl.analytics.debug=true