GridSphere and GridPortlet db handling

View: New views
7 Messages — Rating Filter:   Alert me  

GridSphere and GridPortlet db handling

by monaw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Upon further research (and a mental break), I see that GridSphere 2.2.8 and GridPortlet 1.4 are both using hibernate and hibernate uses c3p0 to manage the connection pooling so there will be no direct references to c3p0 inside either GridSphere or GridPortlet code.

Then why does GridSphere 2.2.8 not come with the c3p0 jar file?  How is it using c3p0 without the needed jar file?

Additionally, why is GridSphere able to get and maintain connection to the db when GridPortlet times out?

thanks,
Mona

*********************************************************
    Mona Wong-Barnum
    Data Services Portal Developer
    San Diego Supercomputer Center

    Being balanced is...
        being secure enough to be vulnerable,
        strong enough to be gentle,
        wise enough to be humble,
        powerful enough to serve others
*********************************************************




_______________________________________________
Gridsphere-users mailing list
Gridsphere-users@...
http://lists.gridsphere.org/mailman/listinfo/gridsphere-users

Re: GridSphere and GridPortlet db handling

by monaw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi:

Sorry I mis-spoke, c3p0 jar file does come with GridSphere 2.2.8 and GridPortlet 1.4.

My problem & questions remain:

Problem:  GridPortlet is unable to retrieve proxy information from the db after 15 minutes (our MySQL timeout value).  We get "Broken pipe" errors in catalina.out.  I've tried various values in the GridPortlet's hibernate.properties (e.g. hibernate.c3p0.timeout, hibernate.c3p0.idle_test_period) but nothing seems to have made any difference.

Questions: Why is GridSphere able to maintain connection to the db while GridPortlet is not?  Is GridPortlet using GridSphere's c3p0 setting?

Please help.

thanks,
Mona

*********************************************************
    Mona Wong-Barnum
    Data Services Portal Developer
    San Diego Supercomputer Center

    Being balanced is...
        being secure enough to be vulnerable,
        strong enough to be gentle,
        wise enough to be humble,
        powerful enough to serve others
*********************************************************




_______________________________________________
Gridsphere-users mailing list
Gridsphere-users@...
http://lists.gridsphere.org/mailman/listinfo/gridsphere-users

Re: GridSphere and GridPortlet db handling

by monaw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Here is part of what is displayed in catalina.out when I login to the portal and clicked on Grid and then clicked on Credentials:

[...]
2153498:DEBUG:(QueryTranslator.java:logQuery:208)
< SQL: select credential0_.gsoid as gsoid, credential0_.useroid as useroid, credential0_.dn as dn, credential0_.label as label, credential0_.timecreated as timecrea6_, credential0_.lastupdated as lastupda7_, credential0_.lastactivated as lastacti8_ from credentialContext credential0_ where (credential0_.useroid='047995ba1379790e0113797a32a80035' ) >

2153499:DEBUG:(BatcherImpl.java:logOpenPreparedStatement:204)
< about to open: 2 open PreparedStatements, 0 open ResultSets >

2153500:DEBUG:(BatcherImpl.java:log:230)
< select credential0_.gsoid as gsoid, credential0_.useroid as useroid, credential0_.dn as dn, credential0_.label as label, credential0_.timecreated as timecrea6_, credential0_.lastupdated as lastupda7_, credential0_.lastactivated as lastacti8_ from credentialContext credential0_ where (credential0_.useroid='047995ba1379790e0113797a32a80035' ) >

2153502:DEBUG:(BatcherImpl.java:getPreparedStatement:253)
< preparing statement >

2153505:DEBUG:(JDBCExceptionReporter.java:logExceptions:49)
< SQL Exception >

java.sql.SQLException: No operations allowed after connection closed.Connection was implicitly closed due to underlying exception/error:


** BEGIN NESTED EXCEPTION ** 

com.mysql.jdbc.CommunicationsException
MESSAGE: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
        at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
        at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2690)
        at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2619)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1552)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2978)
        at com.mysql.jdbc.Connection.execSQL(Connection.java:2902)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:933)
        at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1027)
        at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
        at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:89)
        at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:880)
        at net.sf.hibernate.loader.Loader.doQuery(Loader.java:273)
        at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:138)
        at net.sf.hibernate.loader.Loader.doList(Loader.java:1063)
        at net.sf.hibernate.loader.Loader.list(Loader.java:1054)
        at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
        at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1554)
        at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:49)
        at org.gridlab.gridsphere.services.util.database.hibernate.SessionImpl.restoreList(SessionImpl.java:261)
        at org.gridlab.gridsphere.services.util.database.GridPortletsDatabase.restoreList(GridPortletsDatabase.java:71)
        at org.gridlab.gridsphere.services.security.gss.impl.CredentialRetrievalServiceImpl.getCredentialRetrievalContexts(CredentialRetrievalServiceImpl.java:71)
        at org.gridlab.gridsphere.services.security.gss.CredentialAuthModule.checkAuthentication(CredentialAuthModule.java:72)
        at org.gridlab.gridsphere.services.core.user.impl.LoginServiceImpl.login(LoginServiceImpl.java:256)
        at org.gridlab.gridsphere.servlets.GridSphereServlet.login(GridSphereServlet.java:488)
        at org.gridlab.gridsphere.servlets.GridSphereServlet.processRequest(GridSphereServlet.java:207)
        at org.gridlab.gridsphere.servlets.GridSphereServlet.doGet(GridSphereServlet.java:136)
        at org.gridlab.gridsphere.servlets.GridSphereServlet.doPost(GridSphereServlet.java:564)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.gridlab.gridsphere.filters.GridSphereFilter.doFilter(GridSphereFilter.java:77)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:619)


** END NESTED EXCEPTION **



Last packet sent to the server was 1 ms ago.

STACKTRACE:

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: 

** BEGIN NESTED EXCEPTION ** 

java.net.SocketException
MESSAGE: Broken pipe

STACKTRACE:

java.net.SocketException: Broken pipe
        at java.net.SocketOutputStream.socketWrite0(Native Method)
[...]

*********************************************************
    Mona Wong-Barnum
    Data Services Portal Developer
    San Diego Supercomputer Center

    Being balanced is...
        being secure enough to be vulnerable,
        strong enough to be gentle,
        wise enough to be humble,
        powerful enough to serve others
*********************************************************




_______________________________________________
Gridsphere-users mailing list
Gridsphere-users@...
http://lists.gridsphere.org/mailman/listinfo/gridsphere-users

Re: GridSphere and GridPortlet db handling

by Thawan Kooburat-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
   My Gridportlets have the db connection problem too. When I
monitored the MySQL, I saw that GridSphere renew it connection
properly according to "hibernate.c3p0.timeout" in GridSphere's
hibernate.properties file.
   However, when I look into Gridportlets' hibernate.properties file,
I did not see any c3p0-related parameters. I am not sure why it does
not use the same configuration as the one used by GridSphere. So I
copy all c3p0-related parameters and put in to Gridportlets' hibernate
properties. ( I set the hibernate.c3p0.timeout to be slightly lesser
than the MySQL's time out value)
   After modified all these parameters, my GridPortlets can maintain
db connections properly after MySQL's time out, but I still need more
test to ensure that it works properly.

Cheers,
Thawan Kooburat

On 7/2/07, Mona Wong-Barnum <mona@...> wrote:

> Hi:
>
>  Sorry I mis-spoke, c3p0 jar file does come with GridSphere 2.2.8 and
> GridPortlet 1.4.
>
>  My problem & questions remain:
>
>  Problem:  GridPortlet is unable to retrieve proxy information from the db
> after 15 minutes (our MySQL timeout value).  We get "Broken pipe" errors in
> catalina.out.  I've tried various values in the GridPortlet's
> hibernate.properties (e.g. hibernate.c3p0.timeout,
> hibernate.c3p0.idle_test_period) but nothing seems to have made any
> difference.
>
>  Questions: Why is GridSphere able to maintain connection to the db while
> GridPortlet is not?  Is GridPortlet using GridSphere's c3p0 setting?
>
>  Please help.
>
> thanks,
> Mona
>
_______________________________________________
Gridsphere-users mailing list
Gridsphere-users@...
http://lists.gridsphere.org/mailman/listinfo/gridsphere-users

Re: GridSphere and GridPortlet db handling

by Thawan Kooburat-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
   It still does not work.
   I saw that GridPortlets still maintain its connections properly,
but after I left it for some period  of time ( at least 4-5 db
connection timeouts have passed) I saw the db connection problems
again. The error report that Gridportlets try to use a closed
connection, but there are working connections in MySQL's connection
pool. Strangely, GridSphere still works fine again, I do not know why
this could happen.
   Any idea?

Thawan Kooburat
_______________________________________________
Gridsphere-users mailing list
Gridsphere-users@...
http://lists.gridsphere.org/mailman/listinfo/gridsphere-users

GridSphere and GridPortlet db handling

by chika m tambun :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

should i change gridportlets' hibernate.properties too?!

==============
chika@earth:/ws/gs/2.2.10/projects/gridportlets$ vi
webapp/WEB-INF/persistence/hibernate.properties
==============

?!


--

http://www.its.ac.id 
_______________________________________________
Gridsphere-users mailing list
Gridsphere-users@...
http://lists.gridsphere.org/mailman/listinfo/gridsphere-users

Re: GridSphere and GridPortlet db handling

by rmanansa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes. you can change it in the deployed hibernate.properties file in  
tomcat. Or the correct way is to change it in the webapp/WEB-INF/
persistence folder and then re-deploy to tomcat.
Cheers,
-RAmil




On Sep 9, 2009, at 12:25 AM, chika m tambun wrote:

should i change gridportlets' hibernate.properties too?!

==============
chika@earth:/ws/gs/2.2.10/projects/gridportlets$ vi
webapp/WEB-INF/persistence/hibernate.properties
==============

?!


--

http://www.its.ac.id
_______________________________________________
Gridsphere-users mailing list
Gridsphere-users@...
http://lists.gridsphere.org/mailman/listinfo/gridsphere-users


_______________________________________________
Gridsphere-users mailing list
Gridsphere-users@...
http://lists.gridsphere.org/mailman/listinfo/gridsphere-users