Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view

Hi,

I have created cockpits, its working fine but when the server is left ideal without usage for 2 days, if i login after 2 days it is not loading data in cockpits.When i check the log file i found the following error.Please provide help ASAP. Thanks in advance.

Catalina.out error is as follows :

Dec 18, 2017 11:29:07 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/knowagecockpitengine] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@32789d92]) and a value of type [it.eng.spagobi.commons.bo.UserProfile] (value [UserProfile [userUniqueIdentifier=admin, userId=admin, userName=Ronoldo(Admin), userAttributes={login_id=admin, country=US, name=Ronoldo, TENANT_ID=DEFAULT_TENANT, language=en, email=Ronoldo.chisti@football.com}, roles=[admin], defaultRole=null, organization=DEFAULT_TENANT, isSuperadmin=true]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Dec 18, 2017 11:29:07 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/knowagecockpitengine] created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.XMLUtils$ThreadLocalDocumentBuilder@c062934]) and a value of type [org.apache.xerces.jaxp.DocumentBuilderImpl] (value [org.apache.xerces.jaxp.DocumentBuilderImpl@7dfb5c28]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Dec 18, 2017 11:29:07 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/knowagecockpitengine] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@32789d92]) and a value of type [it.eng.spagobi.commons.bo.UserProfile] (value [UserProfile [userUniqueIdentifier=admin, userId=admin, userName=Ronoldo(Admin), userAttributes={login_id=admin, country=US, name=Ronoldo, TENANT_ID=DEFAULT_TENANT, language=en, email=Ronoldo.chisti@football.com }, roles=[admin], defaultRole=null, organization=DEFAULT_TENANT, isSuperadmin=true]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Dec 18, 2017 11:29:07 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/knowagecockpitengine] created a ThreadLocal with key of type [org.apache.axis.utils.XMLUtils.ThreadLocalDocumentBuilder] (value [org.apache.axis.utils.XMLUtils$ThreadLocalDocumentBuilder@c062934]) and a value of type [org.apache.xerces.jaxp.DocumentBuilderImpl] (value [org.apache.xerces.jaxp.DocumentBuilderImpl@56d49510]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Environment Knowage 6.0.1,Linux UBuntu,Firefox & Chrome
in Source code by (940 points)
edited by
Dear

Could be a problem about dbms connection, can you found connection errors inside log files ?

Best regards

Angelo

Hi,

No I could not find any connection errors in log files(catalina.out). Which log file should i check?

I have created data set and in data set preview it is loading data but it is not loading data in cockpit only.

We have moved knowage database from Mysql to postgres..but we faced problem with cache so we left foodmart database to create cache tables(sbicache00318522e61011e7ad3fb9)..now knowage runs in both mysql(foodmart DB) and postgres(knowage DB).whether this may be a problem?....please provide steps to move knowage fully to postgres.

Server.xml :

    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
        -->
           <Resource auth="Container" description="User database that can be updated and saved"      factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/>
 
               
                <Environment name="resource_path" type="java.lang.String" value="/home/likewise-open/HTCINDIA/nareshs/naresh/POC/Knowage-Server-CE/resources"/>
                <Environment name="service_url" type="java.lang.String" value="http://localhost:8070/knowage"/>
                <Environment name="host_url" type="java.lang.String" value="http://localhost:8070"/>
                <Environment name="sso_class" type="java.lang.String" value="it.eng.spagobi.services.common.FakeSsoService"/>
                <Environment description="HMAC key" name="hmacKey" type="java.lang.String" value="abc123"/>

                <Resource auth="Container" driverClassName="org.postgresql.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/knowage" password="postgres1234" type="javax.sql.DataSource" url="jdbc:postgresql://localhost:5432/knowage_uat_13dec" username="postgres"/>
               
            <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/foodmart" password="root" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/foodmart_demo" username="root"/>
            <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/ds_cache" password="root" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/foodmart_demo" username="root"/>
</GlobalNamingResources>

1 Answer

0 votes

I would try to configure more stable database connection in your server.xml.

When defining a datasource on Tomcat, you should specify parameters to limit the connections against the database. Moreover, you should provide parameters in order to keep connection alive, otherwise connections will be closed, Tomcat will not be aware of that, and an error occurs with the next query. As an example: if nobody works with knowage during the night, connections will be closed by the database; at the first login attempt the next morning, login will fail since Tomcat will try to query the metadata database using an already closed connection.

An example of recommended datasource configuration in Tomcat is:


<Resource auth="Container" driverClassName=".....JDBC driver...."
name=".....connection name...."
type="javax.sql.DataSource"
url=".........JDBC URL...."
username=".........username........." password="....password....."
maxWait="-1"
maxActive="20" maxIdle="4" validationQuery=".....A VALID STATEMENT FOR THAT DATASOURCE...."
removeAbandoned="true" removeAbandonedTimeout="3600" logAbandoned="true" testOnReturn="true"
testWhileIdle="true" timeBetweenEvictionRunsMillis="10000" minEvictableIdleTimeMillis="60000"
/>

by (15.2k points)
...