We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Webservices won't start

I've installed OpenClinica without issue but the webservices are proving trickier. The webservice page just 404's because the webapp fails to start due to "One or more listeners failed to start". I've enabled the webservice logging to see what happens there ... but the logs are utterly empty. See the relevant chunk of catalina.out below. Any ideas on how to track this down?

INFO: Deploying web application directory /var/lib/tomcat7/webapps/OpenClinica-ws
Jan 21, 2016 1:40:46 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://code.google.com/p/jmesa is already defined
Jan 21, 2016 1:40:46 PM org.apache.catalina.startup.TldConfig execute
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jan 21, 2016 1:40:51 PM liquibase.database.template.JdbcTemplate comment
INFO: Lock Database
Jan 21, 2016 1:40:51 PM liquibase.lock.LockHandler acquireLock
INFO: Successfully acquired change log lock
Jan 21, 2016 1:40:53 PM liquibase.database.AbstractDatabase getRanChangeSetList
INFO: Reading from databasechangelog
Jan 21, 2016 1:40:53 PM liquibase.database.template.JdbcTemplate comment
INFO: Release Database Lock
Jan 21, 2016 1:40:53 PM liquibase.lock.LockHandler releaseLock
INFO: Successfully released change log lock
Jan 21, 2016 1:40:53 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Jan 21, 2016 1:40:53 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/OpenClinica-ws] startup failed due to previous errors
Technical details: Amazon Linux, OC 3.7.

Comments

  • lindsay.stevenslindsay.stevens ✭✭✭ Posts: 404 ✭✭✭
    via Email
    Did you change the db name setting from ${WEBAPP.lower} to just
    openclinica? There would be no openclinica-ws database.
  • agapowagapow Posts: 6
    Sure did. Or rather, I hardcoded the dbname as "db=openclinica".

    Is sysURL important for the webservices? I couldn't figure what that should be set as.
  • toskriptoskrip ✭✭✭ Posts: 273 ✭✭✭
    I don't think sysURL is used in webservices. sysURL is used e.g. when OC dynamically creates absolute web links in user interface (a similar purposes). Your log does not say too much about the root of the problem. Very common is that people forgets to increase permgen size for tomcat. Did you increase -XX:MaxPermSize in JAVA_OPTS for your tomcat installation? OC deployed together with WS needs more permanent memory otherwise it fails to deploy.

    T
  • agapowagapow Posts: 6
    Update: I have it working. I changed several things:
    • I boosted the memory available to the system and made sure the right JAVA_OPTS were in place as suggested above. It may not have been the issue but I was going to have to do it sometime anyway and it might have been hiding other problems.
    • A number of settings in openclinica-ws.config/datainfo.properties had to be changed. The database and logging setting were fine, but "misfireThreshold", "threadCount" and "collectStats" needed to be set as well, otherwise it looks like parsing the file was erroring out and bringing the app to a halt.
    Another point was that some of the useful detailed errors / messages only appeared in "catalina.out" not "catalina.(date).log". I know very little of Tomcat so can't pick what the difference was.

    All in all, it was a lengthy process with a lot of trial and error
  • GerbenRienkGerbenRienk ✭✭✭ Posts: 818 ✭✭✭
    Hi,
    Can you please share which settings worked for you?
    Many thanks,
    Gerben Rienk
  • Csaba.HalmagyiCsaba.Halmagyi ✭✭ Posts: 54 ✭✭
    Hi Gerben,

    Just faced this issue a few minutes ago.
    To solve this you have to give all variables in your datainfo.properties an actual value.

    So instead of using log.dir=${log.dir} use log.dir=log.dir=${catalina.home}/logs/openclinica-ws .

    This is how my datainfo.properties looks like:

    #############################################################################
    # 1 - Database Configuration
    #
    #
    # REQUIRED
    #############################################################################
    dbType=postgres
    dbUser=clinica
    dbPass=mysupersecretpassword
    db=openclinica
    dbPort=5432
    dbHost=localhost

    #############################################################################
    # 2 - filePath
    #
    #
    # REQUIRED.
    #############################################################################
    filePath=${catalina.home}/${WEBAPP.lower}.data/

    #############################################################################
    # 3 - Attached File Location
    #
    # NOT REQUIRED
    #############################################################################
    # attached_file_location=

    #############################################################################
    # 4 - user_account_notification
    #
    #
    # REQUIRED.
    #############################################################################
    userAccountNotification=email

    #############################################################################
    # 5 - adminEmail
    #
    # REQUIRED
    #############################################################################
    [email protected]

    #############################################################################
    # 6- Spring Based Email System
    #
    #############################################################################
    mailHost=mail.smtp.com
    mailPort=25
    mailProtocol=smtp
    mailUsername=
    mailPassword=
    mailSmtpAuth=false
    mailSmtpStarttls.enable=false
    mailSmtpsAuth=false
    mailSmtpsStarttls.enable=false
    mailSmtpConnectionTimeout=100
    [email protected]

    #############################################################################
    # 8 - sysURL
    #
    # REQUIRED
    #############################################################################
    sysURL=http://localhost:8080/${WEBAPP}

    #############################################################################
    # 9 - max_inactive_interval
    #
    #
    # REQUIRED
    #############################################################################
    maxInactiveInterval=3600

    ############################################################################
    # 11 - Logging configuration
    #
    log.dir=${catalina.home}/logs/openclinica
    logLocation=local
    #
    # Specify logging level - trace/debug/info/warn/error
    logLevel=info
    syslog.host=localhost
    syslog.port=514



    #############################################################################
    # 15- Quartz Scheduler Configuration
    #
    # REQUIRED
    #############################################################################
    org.quartz.jobStore.misfireThreshold=18000000
    # threadCount should be set to zero on web services modules
    org.quartz.threadPool.threadCount=0
    org.quartz.threadPool.threadPriority=5

    #############################################################################
    # 16 - CCTS configuration
    #
    #
    # NOT REQUIRED
    #############################################################################
    ccts.waitBeforeCommit=6000


    #############################################################################
    # 19 - Usage statistics configuration
    # 'collectStats' value to 'false'
    collectStats=true
    usage.stats.host=usage.openclinica.com
    usage.stats.port=514
    OpenClinica.version=3.8

    #############################################################################
    # 20 - Rule Designer configuration
    #############################################################################
    designerURL=https://designer.openclinica.com/


    Regards,

    Csaba
  • agapowagapow Posts: 6
    Big thumbs up to Csaba. Yes, that's the issue. The webservices dataproperties has same format as the main application and doesn't use most of the settings but they still have to be given an actual value or the file parsing fails. This is a real gap in the installation documentation.
  • RCHENURCHENU Posts: 207
    Well, thanks Csaba, that was very (very) helpful !
Sign In or Register to comment.