On Fri, Oct 17, 2014 at 5:23 PM, Akila Nimantha [IT/EKO/LOITS] <
aki...@lolctech.com> wrote:

>  Hi Inosh and Manoj,
>
>
>
> I have already created a oracle schema manually with name stats_db. Now I
> changed WSO2AM_STATS_DB datasource in master-datasource.xml and erased
> datasource from bam-datasource.xml file.
>

This means you are using BAM 2.4.0 not BAM 2.4.1.


> And after that there are five tables created in the database I created
> manually. Check below for created tables. (at the beginig of bam server,
> there is a error regarding “Failed to create the table API_REQUEST_SUMMARY
> ”).
>
>
>
>
>
> But when I trying to subscribe to a api, bam shut down with below
> error(same like before).
>
>
>
> ERROR {org.apache.cassandra.service.CassandraDaemon} -  Exception in
> thread Thread[Thrift:21,5,main]
>
> java.lang.OutOfMemoryError: unable to create new native thread
>
>         at java.lang.Thread.start0(Native Method)
>
>         at java.lang.Thread.start(Thread.java:714)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:949)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.processWorkerExit(ThreadPoolExecutor.java:1017)
>
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1163)
>
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>         at java.lang.Thread.run(Thread.java:745)
>
>
>
> and afterthat gateway give following error,
>
>
>
> TID: [0] [AM] [2014-10-17 22:39:21,930] ERROR
> {org.wso2.carbon.databridge.agent.thrift.lb.ReceiverGroup} -  No receiver
> is reachable at reconnection, can't publish the events
> {org.wso2.carbon.databridge.agent.thrift.lb.ReceiverGroup}
>
> TID: [0] [AM] [2014-10-17 22:39:23,084]  INFO
> {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil} -
> 'admin@carbon.super [-1234]' logged in at [2014-10-17 22:39:23,084+0530]
> {org.wso2.carbon.core.services.util.CarbonAuthenticationUtil}
>
> TID: [0] [AM] [2014-10-17 22:39:51,930] ERROR
> {org.wso2.carbon.databridge.agent.thrift.lb.ReceiverGroup} -  No receiver
> is reachable at reconnection, can't publish the events
> {org.wso2.carbon.databridge.agent.thrift.lb.ReceiverGroup}
>
> TID: [0] [AM] [2014-10-17 22:39:51,939] ERROR
> {org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher} -
> Reconnection failed for for tcp://172.20.2.150:7617/
> {org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher}
>
>
>
> Please check attachments for bam log and api-manager.xml
>
> Also I tried restarting my mchine and replacing bam with newly extracted
> one.
>
> ****there are two .tbox files in api manager(api_manager_analytics.tbox
> and api_manager_analytics_oracle.tbox). since I am using an oracle database
> should I copy orcle tbox or default as mentioned in the documentation.*****
>
>
>
> Regards,
>
> Akila
>
>
>
>
>
> *From:* Manoj Gunawardena [mailto:man...@wso2.com]
> *Sent:* 16 October 2014 7:11 PM
> *To:* Inosh Goonewardena
> *Cc:* Akila Nimantha [IT/EKO/LOITS]; dev@wso2.org
>
> *Subject:* Re: [Dev] error in setup BAM server in API cluster setup
>
>
>
> Hi Inosh,
>
> Thanks for the correction.
>
>
>
> On Thu, Oct 16, 2014 at 7:06 PM, Inosh Goonewardena <in...@wso2.com>
> wrote:
>
>  Hi,
>
> On Thu, Oct 16, 2014 at 6:56 PM, Manoj Gunawardena <man...@wso2.com>
> wrote:
>
>    Hi Akila,
>
> seems to be WSO2AM_STATS_DB table doesn't exists and unable to create new
> native thread error indicates the OS cannot create thread for JVM. Database
> configurations correct, but make sure table is created. You can start the
> server with -DsetUp option to create the DB.
>
>
>
> -Dsetup will not create the stat DB for you. You have to create it manually
>
>
>
>   Did u create DB manually? or above option.
>
> If you are still facing the thrift port issue, Please share the 
> api-manager.xml
> configuration file.
>
> Thanks
>
>
>
> On Thu, Oct 16, 2014 at 3:53 PM, Akila Nimantha [IT/EKO/LOITS] <
> aki...@lolctech.com> wrote:
>
>  Hi Inosh,
>
>
>
> I have already created WSO2AM_STATS_DB in bam_datasources.xml. and also I
> am using BAM 2.4.1 version downloaded last week.
>
> Please check below for WSO2AM_STATS_DB in bam_datasources.xml
>
>
>
> <datasource>
>
>               <name>WSO2AM_STATS_DB</name>
>
>               <description>The datasource used for getting statistics to
> API Manager</description>
>
>               <jndiConfig>
>
>                      <name>jdbc/WSO2AM_STATS_DB</name>
>
>               </jndiConfig>
>
>               <definition type="RDBMS">
>
>                      <configuration>
>
>                            <url>jdbc:oracle:thin:@000.000.000.000.000
> :0000/fusion</url>
>
>                            <username>stats_db</username>
>
>                            <password>stats_db</password>
>
>
> <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
>
>                            <maxActive>50</maxActive>
>
>                            <maxWait>60000</maxWait>
>
>                            <testOnBorrow>true</testOnBorrow>
>
>                            <validationQuery>SELECT 1</validationQuery>
>
>                            <validationInterval>30000</validationInterval>
>
>                      </configuration>
>
>               </definition>
>
> </datasource>
>
>
>
>
>
> Regards,
>
> Akila
>
>
>
> *From:* Inosh Goonewardena [mailto:in...@wso2.com]
> *Sent:* 16 October 2014 3:37 PM
> *To:* Akila Nimantha [IT/EKO/LOITS]
> *Cc:* Dinesh J Weerakkody; Gihan Anuruddha; dev@wso2.org
>
>
> *Subject:* Re: [Dev] error in setup BAM server in API cluster setup
>
>
>
> Hi Akila,
>
> Seems like you haven't create the datasource for WSO2AM_STATS_DB to
> BAM(<BAM_HOME>/repository/conf/datasources/bam_datasources.xml) as
> mentioned in [1]. However, if you are using BAM version prior to BAM 2.4.1
> you have to add the datasource to
> master-datasources.xml(<BAM_HOME>/repository/conf/datasources/master-datasources.xml)
>
> Caused by: java.lang.RuntimeException: Error in getting data source
> properties: *The data source: WSO2AM_STATS_DB does not exist for tenant:
> carbon.super*
>     at
> org.wso2.carbon.hive.data.source.access.util.DataSourceAccessUtil.getDataSourceProperties(DataSourceAccessUtil.java:57)
>     ... 25 more
> Caused by: java.lang.RuntimeException: T*he data source: WSO2AM_STATS_DB
> does not exist for tenant: carbon.super*
>     at
> org.wso2.carbon.hive.data.source.access.util.DataSourceAccessUtil.getDataSourceProperties(DataSourceAccessUtil.java:47)
>     ... 25 more
>
>
>
> [1] -
> https://docs.wso2.com/display/AM170/Publishing+API+Runtime+Statistics#PublishingAPIRuntimeStatistics-ConfiguringWSO2BAM
>
>
>
> On Thu, Oct 16, 2014 at 3:20 PM, Akila Nimantha [IT/EKO/LOITS] <
> aki...@lolctech.com> wrote:
>
>  Hi Dinesh, Gihan,
>
>
>
> I think not yet solved the problem.
>
> What I did was changed to Oracle and try the same. First started bam
> server and after gateway, keymanager,publisher and finally store. Now noe
> api manager nodes up and running without any error.but bam server give
> error repeatedly. Please check server logs bam and store servers.
>
> But I can see api invoke events from bam console(by login to the Cassandra
> cluster).
>
> When I trying to subscribe to a api, bam server going down with
> outofmemmory message.
>
>
>
> Regards,
>
> Akila
>
>
>
> *From:* Dinesh J Weerakkody [mailto:dine...@wso2.com]
> *Sent:* 14 October 2014 5:02 PM
>
>
> *To:* Akila Nimantha [IT/EKO/LOITS]
> *Cc:* dev@wso2.org
> *Subject:* Re: [Dev] error in setup BAM server in API cluster setup
>
>
>
> Hi Akila,
>
> Have you solved your problem?
>
>
>
> On Mon, Oct 13, 2014 at 11:21 PM, Inosh Goonewardena <in...@wso2.com>
> wrote:
>
>  Hi,
>
>
> On Mon, Oct 13, 2014 at 6:15 PM, Akila Nimantha [IT/EKO/LOITS] <
> aki...@lolctech.com> wrote:
>
>  Dear Gihan,
>
>
>
> Yes I used figures displayed in my BAM log.
>
> Can you please tell me is there a specific server that I should put these
> configurations. Because I am trying to add BAM in a clustered setup. My
> followed document says just <api_home> and so on. So what should I change
> or both. For now I did same configuration in both four
> components(Gateway,keymanager,publisher and store).
>
>
>
>  You need to configure usage tracking only in APIM-Gateway nodes. Please
> make sure APIM-Gateway nodes have the access to above BAM thrift server
> ports(telnet from gateway nodes to make sure).
>
>
>
>
>
>  Regards,
>
> Akila
>
>
>
> *From:* Gihan Anuruddha [mailto:gi...@wso2.com]
> *Sent:* 13 October 2014 5:50 PM
>
>
> *To:* Akila Nimantha [IT/EKO/LOITS]
> *Cc:* dev@wso2.org
> *Subject:* Re: [Dev] error in setup BAM server in API cluster setup
>
>
>
> Hi Akila,
>
>
>
> During the BAM server startup, it will show a message like below. Please
> use that IP address to connect to BAM.
>
>
>
> [2014-10-13 14:51:17,448]  INFO
> {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -
>  Thrift Server started at 0.0.0.0
>
> [2014-10-13 14:51:17,453]  INFO
> {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -
>  Thrift SSL port : 7711
>
> [2014-10-13 14:51:17,456]  INFO
> {org.wso2.carbon.databridge.receiver.thrift.internal.ThriftDataReceiver} -
>  Thrift port : 7611
>
>
>
>
>
> Regards,
>
> Gihan
>
>
>
> On Mon, Oct 13, 2014 at 5:46 PM, Akila Nimantha [IT/EKO/LOITS] <
> aki...@lolctech.com> wrote:
>
>  Hi harsha,
>
>
>
> Yes ip is correct .i put port as 7617 because I used 6 as BAM offset.
> please check below for apiusagetracking element details,
>
>
>
> <APIUsageTracking>
>
>         <Enabled>true</Enabled>
>
>
> <PublisherClass>org.wso2.carbon.apimgt.usage.publisher.APIMgtUsageDataBridgeDataPublisher</PublisherClass>
>
>         <ThriftPort>7617</ThriftPort>
>
>         <BAMServerURL>tcp://172.20.2.150:7617/</BAMServerURL>
>
>         <BAMUsername>admin</BAMUsername>
>
>         <BAMPassword>admin</BAMPassword>
>
>         <DataSourceName>jdbc/WSO2AM_STATS_DB</DataSourceName>
>
>     </APIUsageTracking>
>
>
>
> Regards,
>
> Akila
>
>
>
>
>
> *From:* Harsha Kumara [mailto:hars...@wso2.com]
> *Sent:* 13 October 2014 4:46 PM
> *To:* Akila Nimantha [IT/EKO/LOITS]
> *Cc:* dev@wso2.org
> *Subject:* Re: [Dev] error in setup BAM server in API cluster setup
>
>
>
> Hi Akila,
>
>
>
> Seems like it's a connection issue. Have you specified correct IPs and
> ports in the configurations.
>
>
>
> Thanks,
>
> Harsha
>
>
>
> On Mon, Oct 13, 2014 at 4:08 PM, Akila Nimantha [IT/EKO/LOITS] <
> aki...@lolctech.com> wrote:
>
>  Hi all,
>
>
>
> I am trying add BAM server(
> https://docs.wso2.com/display/AM170/Publishing+API+Runtime+Statistics) in
> API manager Cluster setup(
> https://docs.wso2.com/display/CLUSTER420/Clustering+API+Manager).
>
> I just trying with default H2 database configurations and I get following
> error.
>
> org.wso2.carbon.databridge.agent.thrift.exception.AgentException: Cannot
> borrow client for TCP,172.20.2.150:7617,TCP,172.20.2.150:7717
>
>        at
> org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:58)
>
>        at
> org.wso2.carbon.databridge.agent.thrift.DataPublisher.start(DataPublisher.java:273)
>
>        at
> org.wso2.carbon.databridge.agent.thrift.DataPublisher.<init>(DataPublisher.java:161)
>
>        at
> org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher$ReceiverConnectionWorker.run(AsyncDataPublisher.java:787)
>
>        at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>
>        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>
>        at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>
>        at java.lang.Thread.run(Thread.java:745)
>
> Caused by: org.apache.thrift.transport.TTransportException: Could not
> connect to 172.20.2.150 on port 7717
>
>        at
> org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:212)
>
>        at
> org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:166)
>
>        at
> org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:90)
>
>        at
> org.wso2.carbon.databridge.agent.thrift.internal.pool.client.secure.SecureClientPoolFactory.makeObject(SecureClientPoolFactory.java:48)
>
>        at
> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1212)
>
>        at
> org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:50)
>
>        ... 8 more
>
> Caused by: java.net.ConnectException: Connection refused
>
>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>
>        at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
>
>        at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
>
>        at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
>
>        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
>
>        at java.net.Socket.connect(Socket.java:579)
>
>        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
>
>        at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:407)
>
>        at
> sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:88)
>
>        at
> org.apache.thrift.transport.TSSLTransportFactory.createClient(TSSLTransportFactory.java:208)
>
>
>
> what should I do and when we setup BAM in api cluster is there specific
> server component(gateway or keymanager or store or publisher or both)to
> setup????????????????????
>
>
>
> Regards,
>
> Akila
>
>
>
> This message (including any attachments) is intended only for the use of
> the individual or entity to which it is addressed and may contain
> information that is non-public, proprietary, privileged, confidential, and
> exempt from disclosure under applicable law or may constitute as attorney
> work product. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and (i) destroy
> this message if a facsimile or (ii) delete this message immediately if this
> is an electronic communication. Thank you.
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
>
> --
>
> Harsha Kumara
>
> Software Engineer, WSO2 Inc.
>
> Mobile: +94775505618
>
> Blog:harshcreationz.blogspot.com
>
> This message (including any attachments) is intended only for the use of
> the individual or entity to which it is addressed and may contain
> information that is non-public, proprietary, privileged, confidential, and
> exempt from disclosure under applicable law or may constitute as attorney
> work product. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and (i) destroy
> this message if a facsimile or (ii) delete this message immediately if this
> is an electronic communication. Thank you.
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
>
> --
>
> W.G. Gihan Anuruddha
>
> Senior Software Engineer | WSO2, Inc.
>
> M: +94772272595
>
> This message (including any attachments) is intended only for the use of
> the individual or entity to which it is addressed and may contain
> information that is non-public, proprietary, privileged, confidential, and
> exempt from disclosure under applicable law or may constitute as attorney
> work product. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and (i) destroy
> this message if a facsimile or (ii) delete this message immediately if this
> is an electronic communication. Thank you.
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
>
> Regards,
>
> Inosh Goonewardena
> Associate Technical Lead- WSO2 Inc.
> Mobile: +94779966317
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
>
>
> *Dinesh J. Weerakkody*
>
> Software Engineer
>
> WSO2 Inc.
> lean | enterprise | middleware
> M : +94 727 361788 | E : dine...@wso2.com | W : www.wso2.com
>
> This message (including any attachments) is intended only for the use of
> the individual or entity to which it is addressed and may contain
> information that is non-public, proprietary, privileged, confidential, and
> exempt from disclosure under applicable law or may constitute as attorney
> work product. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and (i) destroy
> this message if a facsimile or (ii) delete this message immediately if this
> is an electronic communication. Thank you.
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
>
> Regards,
>
> Inosh Goonewardena
> Associate Technical Lead- WSO2 Inc.
> Mobile: +94779966317
>
> This message (including any attachments) is intended only for the use of
> the individual or entity to which it is addressed and may contain
> information that is non-public, proprietary, privileged, confidential, and
> exempt from disclosure under applicable law or may constitute as attorney
> work product. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and (i) destroy
> this message if a facsimile or (ii) delete this message immediately if this
> is an electronic communication. Thank you.
>
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
>
>
> --
>
> Manoj Gunawardena
>
> Tech Lead
>
> WSO2, Inc.: http://wso2.com
>
> lean.enterprise.middleware
>
> Mobile : +94 77 2291643
>
>
>
>
> --
>
> Regards,
>
> Inosh Goonewardena
> Associate Technical Lead- WSO2 Inc.
> Mobile: +94779966317
>
>
>
>
> --
>
> Manoj Gunawardena
>
> Tech Lead
>
> WSO2, Inc.: http://wso2.com
>
> lean.enterprise.middleware
>
> Mobile : +94 77 2291643
>
> This message (including any attachments) is intended only for the use of
> the individual or entity to which it is addressed and may contain
> information that is non-public, proprietary, privileged, confidential, and
> exempt from disclosure under applicable law or may constitute as attorney
> work product. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, distribution, or copying of this
> communication is strictly prohibited. If you have received this
> communication in error, notify us immediately by telephone and (i) destroy
> this message if a facsimile or (ii) delete this message immediately if this
> is an electronic communication. Thank you.
>



-- 
Regards,

Inosh Goonewardena
Associate Technical Lead- WSO2 Inc.
Mobile: +94779966317
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to