简体   繁体   English

WSO2 BAM 2.4.1端口偏移错误

[英]WSO2 BAM 2.4.1 port offset error

I am running BAM 2.4.1 in windows. 我在Windows中运行BAM 2.4.1。

set in carbon.xml. 在carbon.xml中设置。

<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 bam-datasources.xml

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>

no problem with start. 开始没有问题。

But after press "Cassandra Keyspaces" in "Main" of management console I get errors in console 但是在管理控制台的“ Main”中按“ Cassandra Keyspaces”后,控制台出现错误

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) ......

and error in server log 和服务器日志中的错误

[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

note, what port 9160 is not correct. 注意,什么端口9160不正确。

https://wso2.org/jira/browse/BAM-1476 reported as Fixed [ 1 ] but.... https://wso2.org/jira/browse/BAM-1476报告为固定[1],但是...

What is wrong? 怎么了?

Change 9160 value in the WSO2BAM_CASSANDRA_DATASOURCE section to 9160+portOffset. 将WSO2BAM_CASSANDRA_DATASOURCE部分中的9160值更改为9160 + portOffset。 Also change /conf/etc/hector-config.xml with the same value. 另外,将/conf/etc/hector-config.xml更改为相同的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM