Menu

Problem with DB connection

2014-01-20
2014-01-21
  • Manuel Rodríguez-Pascual

    Hi all,

    I am facing a extrange error with the connection to the database.

    It must be said that my Liferay server has been correctly working for some time, and I have not changed any configuration, library or any other thing. It is then difficult for me to find the source of this error.

    Taking a look at the log, there are 3 remarkable things:

    -the portlet connects to the databse correctly and inserts the information
    -there is an error looking for a particular library. This happens quite often, but (as far as I know) it does not afect the system. But maybe I am wrong!
    -Then, a second connection to the database fails because a lack of drivers (which makes no sense).

    [#|2014-01-20T16:34:58.236+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] DEBUG JSagaJobSubmission - Description inserted or update for jobId: [wms://wms005.cnaf.infn.it:7443/glite_wms_wmproxy_server]-[https://wms005.cnaf.infn.it:9000/28jHYzJXQUTyEpsJrr-NiQ]
    |#]
    [#|2014-01-20T16:34:58.237+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] DEBUG UsersTrackingDBInterface - ###I'm in app server###
    |#]
    [#|2014-01-20T16:34:58.245+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] INFO UsersTrackingDBInterface - Database connection terminated
    |#]
    [#|2014-01-20T16:34:58.246+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] INFO JobServicesDispatcher - Deleting proxy = /tmp/33c5fcb2-aec0-40b7-99a3-7f9ef4ce284c
    |#]
    [#|2014-01-20T16:34:58.246+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] INFO JobServicesDispatcher - Deleted proxy = /tmp/33c5fcb2-aec0-40b7-99a3-7f9ef4ce284c
    |#]
    [#|2014-01-20T16:34:58.246+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] INFO JobServicesDispatcher - Job service removed...
    |#]
    [#|2014-01-20T16:34:58.247+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] ERROR JSagaJobSubmission - Cannot get JobCheckStatusService: javax.naming.NamingException: Lookup failed for 'JobCheckStatusService' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: JobCheckStatusService not found]
    |#]
    [#|2014-01-20T16:34:58.247+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] INFO JSagaJobSubmission - Get local JobCheckStatusService
    |#]
    [#|2014-01-20T16:34:58.247+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [submitJob] INFO JobCheckStatusService - Starting new check jobs status thread for user test
    |#]
    [#|2014-01-20T16:34:58.248+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [pool-16-thread-1] INFO UsersTrackingDBInterface - UpdateJobsStatusAsync running in Thread : Thread[pool-16-thread-1,5,grizzly-kernel]
    |#]
    [#|2014-01-20T16:34:58.249+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [pool-16-thread-1] DEBUG UsersTrackingDBInterface - I'm not in app server
    |#]
    [#|2014-01-20T16:34:58.284+0000|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=161;_ThreadName=Thread-2;|2014-01-20 16:34:58 [pool-16-thread-1] ERROR UsersTrackingDBInterface - Cannot connect to database server: java.sql.SQLException: No suitable driver found for
    |#]
    [#|2014-01-20T16:34:58.284+0000|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=182;_ThreadName=Thread-2;|Cannot connect to database server|#]

    This is the content of the database:

    MariaDB [userstracking]> select * from ActiveGridInteractions;
    | id | common_name | tcp_address | timestamp | grid_interaction | grid_id | robot_certificate | proxy_id | virtual_organization | fqan | user_description | status | grid_ce | latitude | longitude | timestamp_endjob | email | e_token_server | id_job_collection |
    +----+-------------+-------------+---------------------+------------------+-----------------------
    | 98 | test | 127:0:0:1 | 2014-01-20 16:34:32 | 14 | [wms://wms005.cnaf.infn.it:7443/glite_wms_wmproxy_server]-[https://wms005.cnaf.infn.it:9000/28jHYzJXQUTyEpsJrr-NiQ] | /C=IT/O=INFN/OU=Robot/L=Catania/CN=Robot: Catania Science Gateway - Roberto Barbera | 332576f78a4fe70a52048043e90cd11f | gridit | gridit | jModelTest2 | SUBMITTED | | 0 | 0 | NULL | | etokenserver.ct.infn.it:8082 | NULL |
    +----+-------------+----------

    MariaDB [userstracking]> select * from JobDescription;
    | id | jobId | executable | arguments | output | error | queue | file_transfer | total_cpu | SPDM_variation | number_of_processes | JDL_requirements | output_path | input_files | output_files | proxy_renewal | resubmit_count |
    +----+--------------------------------------------------------------------------------------------
    | 42 | [wms://wms005.cnaf.infn.it:7443/glite_wms_wmproxy_server]-[https://wms005.cnaf.infn.it:9000/28jHYzJXQUTyEpsJrr-NiQ] | /usr/bin/env | sh pilot_script.sh HUMANTEST1 | jModelTest2-Output.txt | jModelTest2-Error.txt | NULL | NULL | NULL | NULL | NULL | NULL | /tmp//jobOutput/ | /opt/liferay/glassfish-3.1.2/domains/domain1/autodeploy/jModelTest2-portlet/jModelTest2Files/ensembl.tar.gz,/opt/liferay/glassfish-3.1.2/domains/domain1/autodeploy/jModelTest2-portlet/jModelTest2Files/jModelTest2.tar.gz, /opt/liferay/glassfish-3.1.2/domains/domain1/autodeploy/jModelTest2-portlet/WEB-INF/job/pilot_script.sh | HUMANTEST1.txt | Y | 10 |

    As you can see, the information has been correctly insterted. The input files exist and are accesible by Liferay user.

    any hint on where the problem can be?

     
  • Manuel Rodríguez-Pascual

    More precisely, it looks that there are 2 liferay processes. The one inserting information into the database after the portlet is eecuted works OK. The one in charge of checking the status of the tasks does not work correctly, so they remain in "submiteed" status forever.

    Maybe this is not an accurate thecnical description, but it is how it looks from the ouside.

    It must also be noticed than an -apparently- similar error was posted by Diego Scardacci here:
    https://mailman.ct.infn.it/pipermail/sg-licence/2012-November/003130.html

     
  • Manuel Rodríguez-Pascual

    Hi,

    I have re-installed everything, so I am pretty sure that the problem does not come from any incompatibility.

    To do so, I have followed the instructions in the wiki, installed the same software (including MySQL version) and libraries that Giuseppe La Rocca.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.