You must have a DataSource named "labkeyDataSource" defined in labkey.xml.

Installation Forum (Inactive)
You must have a DataSource named "labkeyDataSource" defined in labkey.xml. felix rauscher  2015-06-29 04:54
Status: Closed
 
Hi,

I am trying ot install Labkey on SL7 (equivalent to CentOS7), using tomcat (7.0.54) and postgres (9.2.10) from the distributions repositories. I get a stack trace with the You must have a DataSource named "labkeyDataSource" defined in labkey.xml error, even though I have configured the dataSource. See attached labkey.xml

The stack trace looks like this:


org.labkey.api.util.ConfigurationException: DataSources are not properly configured in labkey.xml.
       at org.labkey.api.module.ModuleLoader.initializeDataSources(ModuleLoader.java:861)
       at org.labkey.api.module.ModuleLoader.doInit(ModuleLoader.java:344)
       at org.labkey.api.module.ModuleLoader.init(ModuleLoader.java:258)
       at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
       at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
       at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
       at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
       at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
       at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
       at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)
       at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1862)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
       at java.lang.Thread.run(Thread.java:745)
Caused by: org.labkey.api.util.ConfigurationException: You must have a DataSource named "labkeyDataSource" defined in labkey.xml.
       at org.labkey.api.module.ModuleLoader.ensureDatabase(ModuleLoader.java:929)
       at org.labkey.api.module.ModuleLoader.initializeDataSources(ModuleLoader.java:838)
       ... 18 more

Another question: How could I expand the stack-trace further?

Best Regards

Felix
 
 
Jon (LabKey DevOps) responded:  2015-06-29 16:26
Hello Felix,

The XML appears to be fine when I tested it on my instance.

Have you checked your Tomcat logs (specifically the labkey.log file) to see if there were any other errors prior to the stack error you're seeing? It should give us a better idea of what occurred since that labkey.xml file itself is configured correctly.

Regards,

Jon
 
felix rauscher responded:  2015-06-30 06:32
Unfortunately, the labkey.log does not show more. (See attachment)

Do I have to create the database in psql, or should this be done by labkey?

BTW: psql -U postgres

does connect correctly after asking for the password.
 
Jon (LabKey DevOps) responded:  2015-06-30 11:21
Hi Felix,

You shouldn't have to create the database. The user you have setup in your labkey.xml should have enough permissions to do that if you made it an admin.

Can you confirm what permissions your postgres user has?

If the start-up of your LabKey instance didn't generate the database, that would mean that the user doesn't have enough permissions to do that and you would need to raise the permissions for the user.

Regards,

Jon
 
felix rauscher responded:  2015-07-15 01:25
Hi John,

I am using the postgres-user, wich should have all needed permissions.

Regards

Felix
 
Jon (LabKey DevOps) responded:  2015-07-17 11:07
Hi Felix,

Is this issue also apart of this other forum question you started here?

https://www.labkey.org/announcements/home/Server/forum/thread.view?rowId=11220

I noticed you have two different operating systems listed and two different versions of postgres as well.

Also, was both versions of Apache you were using installed via the binary distributions directly from Apache or were they installed via package manager? If so, we suspect that the problems you're seeing are related to connection pools that are available in the binary distribution and may not work correctly in the package manager versions.

Regards,

Jon
 
adam responded:  2015-07-20 12:18
We have seen some Linux distributions include a version of Tomcat that lacks tomcat-dbcp.jar, which is the standard database connection pool that LabKey Server requires. I've confirmed that starting up without that jar results in the stack trace you've reported.

We plan to improve the error message to provide more details about the root problem.

Thanks,
Adam