• Bug
  • Status: Closed
  • 1 Critical
  • Resolution: Fixed
  • kkannaiy
  • Reporter: tgautier
  • April 09, 2008
  • 0
  • Watchers: 0
  • February 12, 2013
  • April 09, 2008

Description

I get the following error in my console trying to use maven 1.1.0-SNAPSHOT which gets latest 2.6.

INFO] [dso start] 2008-04-09 09:24:43,883 INFO - Terracotta 2.6-nightly-rev8038, as of 20080408-200445 (Revision 8038 by [email protected] from 2.6) [INFO] [dso start] 2008-04-09 09:24:44,473 INFO - Configuration loaded from the file at ‘/Users/tgautier/src/forge/projects/labs/tim-guice/sample/tc-config.xml’. [INFO] [dso start] 2008-04-09 09:24:44,518 INFO - Log file: ‘/Users/tgautier/src/forge/projects/labs/tim-guice/sample/terracotta/server-logs/terracotta-server.log’. [INFO] [dso start] 2008-04-09 09:24:44,579 ERROR - [INFO] [dso start] ************************************************************************************** [INFO] [dso start] The statistics store couldn’t be opened at [INFO] [dso start] ‘/Users/tgautier/src/forge/projects/labs/tim-guice/sample/statistics’. [INFO] [dso start] The CVT gathering system will not be active for this node. [INFO] [dso start] [INFO] [dso start] A common reason for this is that you’re launching several Terracotta L1 [INFO] [dso start] clients on the same machine. The default directory for the statistics store [INFO] [dso start] uses the IP address of the machine that it runs on as the identifier. [INFO] [dso start] When several clients are being executed on the same machine, a typical solution [INFO] [dso start] to properly separate these directories is by using a JVM property at startup [INFO] [dso start] that is unique for each client. [INFO] [dso start] [INFO] [dso start] For example: [INFO] [dso start] dso-java.sh -Dtc.node-name=node1 your.main.Class [INFO] [dso start] [INFO] [dso start] You can then adapt the tc-config.xml file so that this JVM property is picked [INFO] [dso start] up when the statistics directory is configured by using %(tc.node-name) in the [INFO] [dso start] statistics path. [INFO] [dso start] ************************************************************************************** [INFO] [dso start] [INFO] [dso start] 2008-04-09 09:24:44.863::INFO: Logging to STDERR via org.mortbay.log.StdErrLog [INFO] [dso start] 2008-04-09 09:24:44.915::INFO: jetty-6.1.8 [INFO] [dso start] 2008-04-09 09:24:44.961::INFO: Started [email protected]:0 [INFO] [dso start] 2008-04-09 09:24:44,808 WARN - [INFO] [dso start] ************************************************************************************** [INFO] [dso start] The statistics buffer couldn’t be opened at [INFO] [dso start] ‘/Users/tgautier/src/forge/projects/labs/tim-guice/sample/statistics’. [INFO] [dso start] The CVT system will not be active for this node. [INFO] [dso start] [INFO] [dso start] A common reason for this is that you’re launching several Terracotta L1 [INFO] [dso start] clients on the same machine. The default directory for the statistics buffer [INFO] [dso start] uses the IP address of the machine that it runs on as the identifier. [INFO] [dso start] When several clients are being executed on the same machine, a typical solution [INFO] [dso start] to properly separate these directories is by using a JVM property at startup [INFO] [dso start] that is unique for each client. [INFO] [dso start] [INFO] [dso start] For example: [INFO] [dso start] dso-java.sh -Dtc.node-name=node1 your.main.Class [INFO] [dso start] [INFO] [dso start] You can then adapt the tc-config.xml file so that this JVM property is picked [INFO] [dso start] up when the statistics directory is configured by using %(tc.node-name) in the [INFO] [dso start] statistics path. [INFO] [dso start] ************************************************************************************** [INFO] [dso start] [INFO] [dso start] 2008-04-09 09:24:44,884 INFO - JMX Server started. Available at URL[service:jmx:jmxmp://0.0.0.0:9520] [INFO] [dso start] 2008-04-09 09:24:45,690 INFO - Terracotta Server has started up as ACTIVE node on 0.0.0.0:9510 successfully, and is now ready for work. [INFO] [dso start] 2008-04-09 09:24:45,719 INFO - Update Checker: Checking… [INFO] [dso start] 2008-04-09 09:24:45,825 INFO - Update Checker: No updates found [INFO] [dso start] 2008-04-09 09:24:45,831 INFO - Update Checker: Next check at Wed Apr 16 09:24:45 PDT 2008 [INFO] DSO Server status: OK [INFO] ———————————————————————— [INFO] BUILD SUCCESSFUL [INFO] ———————————————————————— [INFO] Total time: 12 seconds [INFO] Finished at: Wed Apr 09 09:24:46 PDT 2008 [INFO] Final Memory: 11M/21M [INFO] ————————————————————————

However, when it started, my statistics directory was not there. And while it’s running, here is the ls -ltr:

tmac:sample tgautier$ ls -ltr statistics/ total 0 -rw-r–r– 1 tgautier tgautier 0 Apr 9 09:24 statistics-store-tc.lck -rw-r–r– 1 tgautier tgautier 0 Apr 9 09:24 statistics-buffer-tc.lck

So this warning is either specious, or something else bad is happening as it appears to have done something.

Comments

Geert Bevin 2008-04-09

What are the instructions to reproduce this?

Taylor Gautier 2008-04-09

Use any maven project with maven 1.1.0-SNAPSHOT

$ svn co https://svn.terracotta.org/repo/forge/projects/labs/tim-guice $ cd tim-guice $ mvn install $ cd sample

edit pom to change maven version from 1.0.5 to 1.1.0-SNAPSHOT

$ mvn package $ mvn tc:start

Geert Bevin 2008-04-09

The issue here is that H2 isn’t included in the maven deps, so it’s not there when the statistics system is started up. The lock files aren’t created by H2, but by the CVT itself. This is what it says in the server logs when this error happens:

com.tc.statistics.store.exceptions.StatisticsStoreOpenErrorException: Unexpected error while opening the store database. at com.tc.statistics.store.h2.H2StatisticsStoreImpl$1.execute(H2StatisticsStoreImpl.java:110) at com.tc.util.concurrent.FileLockGuard.guard(FileLockGuard.java:37) at com.tc.statistics.store.h2.H2StatisticsStoreImpl.open(H2StatisticsStoreImpl.java:104) at com.tc.statistics.StatisticsGathererSubSystem.setup(StatisticsGathererSubSystem.java:49) at com.tc.server.TCServerImpl.(TCServerImpl.java:118) at com.tc.server.TCServerImpl.(TCServerImpl.java:108) at com.tc.server.StandardServerFactory.createServer(StandardServerFactory.java:12) at com.tc.server.TCServerMain.main(TCServerMain.java:27) Caused by: com.tc.statistics.database.exceptions.StatisticsDatabaseNotFoundException: Unable to load JDBC driver 'org.h2.Driver' at com.tc.statistics.database.impl.AbstractStatisticsDatabase.open(AbstractStatisticsDatabase.java:46) at com.tc.statistics.database.impl.H2StatisticsDatabase.open(H2StatisticsDatabase.java:47) at com.tc.statistics.store.h2.H2StatisticsStoreImpl$1.execute(H2StatisticsStoreImpl.java:108) ... 7 more Caused by: java.lang.ClassNotFoundException: org.h2.Driver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:164) at com.tc.statistics.database.impl.AbstractStatisticsDatabase.open(AbstractStatisticsDatabase.java:44) ... 9 more

Geert Bevin 2008-04-09

Added the dependency to the tc-maven-plugin’s pom, you need to reinstall it for this to work.

Kalai Kannaiyan 2008-04-15

Retested with Terracotta 2.6-nightly-rev8192, as of 20080414-180425 (Revision 8192 by [email protected] from 2.6), it is working as expected

Steps:

  1. svn co https://svn.terracotta.org/repo/forge/projects/labs/tim-guice
  2. cd tim-guice
  3. mvn install
  4. cd sample
  5. edit pom to change maven version from 1.0.5 to 1.1.0-SNAPSHOT
  6. mvn package
  7. mvn tc:start

ACtual: Terracotta server started successfully as expected.

[INFO] Starting DSO Server [INFO] OK [INFO] [dso start] 2008-04-15 15:59:19,671 INFO - Terracotta 2.6-nightly-rev8192 , as of 20080414-180425 (Revision 8192 by [email protected] from 2.6) [INFO] [dso start] 2008-04-15 15:59:20,593 INFO - Configuration loaded from the file at ‘c:\tim-guice\sample\tc-config.xml’. [INFO] [dso start] 2008-04-15 15:59:20,671 INFO - Log file: ‘c:\tim-guice\sample \terracotta\server-logs\terracotta-server.log’. [INFO] [dso start] 2008-04-15 15:59:21,531 INFO - Statistics store: ‘c:\tim-guic e\sample\statistics’. [INFO] [dso start] 2008-04-15 15:59:21.913::INFO: Logging to STDERR via org.mor tbay.log.StdErrLog [INFO] [dso start] 2008-04-15 15:59:21.976::INFO: jetty-6.1.8 [INFO] [dso start] 2008-04-15 15:59:21.054::INFO: Started [email protected] .0.0.0:0 [INFO] [dso start] 2008-04-15 15:59:22,234 INFO - Statistics buffer: ‘c:\tim-gui ce\sample\statistics’. [INFO] [dso start] 2008-04-15 15:59:22,437 INFO - JMX Server started. Available at URL[service:jmx:jmxmp://0.0.0.0:9520] [INFO] DSO Server status: OK