0

我尝试使用数据源 cassandra 将 WSO2 ML 与 WSO2 DAS 连接起来。在 ML_HOME/repository/conf/datasources/analytics-datasources.xml 和 DAS_HOME/repository/conf/datasources/analytics-datasources.xml 我有相同的配置来使用 cassandra。

<datasource>
        <name>WSO2_ANALYTICS_DS_CASSANDRA</name>
        <description>The Cassandra datasource used for analytics</description>
        <definition type="CASSANDRA">
            <configuration>
                <contactPoints>192.168.1.111</contactPoints>
                <port>9042</port>
                <!--<username>admin</username>
                <password>admin</password>
                <clusterName>cluster1</clusterName> -->
                <compression>NONE</compression>
                <poolingOptions>
                    <coreConnectionsPerHost hostDistance="LOCAL">8</coreConnectionsPerHost>
                    <maxSimultaneousRequestsPerHostThreshold hostDistance="LOCAL">1024</maxSimultaneousRequestsPerHostThreshold>
                </poolingOptions>
                <queryOptions>
                    <fetchSize>5000</fetchSize>
                    <consistencyLevel>ONE</consistencyLevel>
                    <serialConsistencyLevel>SERIAL</serialConsistencyLevel>
                </queryOptions>
                <socketOptions>
                    <keepAlive>false</keepAlive>
                    <sendBufferSize>150000</sendBufferSize>
                    <connectTimeoutMillis>12000</connectTimeoutMillis>
                    <readTimeoutMillis>12000</readTimeoutMillis>
                </socketOptions>
            </configuration>
        </definition>
    </datasource>

当我尝试使用 DAS 在 ML 中创建数据集时,尝试列出 DAS 的表时出现错误,特别是在 ConfigurationApiV11.java 中,调用 analyticsDataApi.listTables() 时的方法 getDASTables

这是我在日志中的错误:

TID: [-1234] [] [2016-09-03 22:35:59,762]  WARN {org.apache.cxf.phase.PhaseInterceptorChain} -  Application {http://api.rest.ml.carbon.wso2.org/}Lo$
org.apache.cxf.interceptor.Fault: Error while connecting to the remote service. null
    at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
    at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:167)
    at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:94)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
    at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)
    at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)
    at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:154)
    at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:126)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:113)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
4

1 回答 1

1

WSO2ML 似乎正在尝试远程连接到分析服务。默认情况下,它会自动选择模式。如果您使用单个 ML 节点并且 /AnalyticsDataConfiguration/Mode 在 repository/conf/analytics/analytics-data-config.xml 中设置为 AUTO。然后将其更改为本地。如果 ML 服务器在 Cassandra 集群可用之前启动,可能会导致 ML 服务器使用 REMOTE 模式。

于 2016-09-05T19:56:09.587 回答