首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >WSO2 BAM 2.4.1端口偏移错误

WSO2 BAM 2.4.1端口偏移错误
EN

Stack Overflow用户
提问于 2014-07-24 22:22:42
回答 1查看 356关注 0票数 0

我在windows中运行的是BAM 2.4.1。

在carbon.xml中设置。

代码语言:javascript
复制
<Ports>

        <!-- Ports offset. This entry will set the value of the ports defined below to
         the define value + Offset.
         e.g. Offset=2 and HTTPS port=9443 will set the effective HTTPS port to 9445
         -->
        <Offset>200</Offset>

bam-datasources.xml

代码语言:javascript
复制
datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration">

    <providers>
        <provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
    </providers>

    <datasources>       

        <datasource>
            <name>WSO2BAM_DATASOURCE</name>
            <description>The datasource used for analyzer data</description>
            <definition type="RDBMS">
                <configuration>
                    <url>jdbc:h2:repository/database/samples/BAM_STATS_DB;AUTO_SERVER=TRUE</url>
                    <username>wso2carbon</username>
                    <password>wso2carbon</password>
                    <driverClassName>org.h2.Driver</driverClassName>
                    <maxActive>50</maxActive>
                    <maxWait>60000</maxWait>
                    <testOnBorrow>true</testOnBorrow>
                    <validationQuery>SELECT 1</validationQuery>
                    <validationInterval>30000</validationInterval>
                </configuration>
            </definition>
        </datasource>

        <datasource>
            <name>WSO2BAM_CASSANDRA_DATASOURCE</name>
            <description>The datasource used for Cassandra data</description>
            <definition type="RDBMS">
                <configuration>
                    <url>jdbc:cassandra://localhost:9160/EVENT_KS</url>
                    <username>admin</username>
                    <password>admin</password>
                </configuration>
            </definition>
        </datasource>

        <datasource>
            <name>WSO2BAM_UTIL_DATASOURCE</name>
            <description>The datasource used for BAM utilities, such as message store etc..</description>
            <definition type="RDBMS">
                <configuration>
                    <url>jdbc:cassandra://localhost:9160/BAM_UTIL_KS</url>
                    <username>admin</username>
                    <password>admin</password>
                    <dataSourceProps>
                        <property name="externalCassandra">false</property>
                    </dataSourceProps>
                </configuration>
            </definition>
        </datasource>

        <!-- The URL configs are loaded from hector-config.xml -->
        <datasource>
            <name>WSO2BAM_HIVE_INCREMENTAL_DATASOURCE</name>
            <definition type="RDBMS">
                <configuration>
                    <username>admin</username>
                    <password>admin</password>
                    <dataSourceProps>
                        <property name="replicationFactor">1</property>
                        <property name="strategyClass">org.apache.cassandra.locator.SimpleStrategy</property>
                        <property name="readConsistencyLevel">QUORUM</property>
                        <property name="writeConsistencyLevel">QUORUM</property>
                        <property name="keyspaceName">HIVE_INCREMENTAL_KS</property>
                    </dataSourceProps>
                </configuration>
            </definition>
        </datasource>

    </datasources>

</datasources-configuration>

使用start没有问题。

但在管理控制台的"Main“中按下"Cassandra Keyspace”后,我在控制台中得到错误

代码语言:javascript
复制
The following error details are available. Please refer logs for more details.
org.wso2.carbon.cassandra.mgt.ui.CassandraAdminClientException: Error retrieving keyspace names !
at org.wso2.carbon.cassandra.mgt.ui.CassandraKeyspaceAdminClient.listKeyspacesOfCurrentUSer(CassandraKeyspaceAdminClient.java:122)
at org.apache.jsp.cassandramgt.cassandra_005fkeyspaces_jsp._jspService(org.apache.jsp.cassandramgt.cassandra_005fkeyspaces_jsp:107)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:403)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:492) ......

和服务器日志中的错误

代码语言:javascript
复制
[2014-07-24 18:09:43,190]  WARN {me.prettyprint.cassandra.connection.CassandraHo
stRetryService} -  Downed localhost(127.0.0.1):9160 host still appears to be dow
n: Unable to open transport to localhost(127.0.0.1):9160 , java.net.ConnectExcep
tion: Connection refused: connect

请注意,哪个端口9160不正确。

https://wso2.org/jira/browse/BAM-1476报告为Fixed %1,但....

怎么啦?

EN

回答 1

Stack Overflow用户

发布于 2014-07-25 08:01:20

将WSO2BAM_CASSANDRA_DATASOURCE部分中的9160值更改为9160+portOffset。另外,使用相同的值更改/conf/etc/hector-config.xml。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24936353

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档