Does opentsdb runs with java 1.7

64 views
Skip to first unread message

Sachin Mittal

unread,
Aug 18, 2017, 10:41:27 AM8/18/17
to OpenTSDB
Hi All
I was successfully able to run opentsdb 2.4 on windows box having java 8.

However when I try to run the same on centos running java 1.7 it never starts the opentsdb.
From the logs I see that last good logs are:

2017-08-18 17:35:19,167 2140 [AsyncHBase I/O Worker #1] INFO  org.hbase.async.HBaseClient - Resolved IP address for host: VMINNAGPRDAPP01 is: 192.168.73.139
2017-08-18 17:35:19,168 2141 [AsyncHBase I/O Worker #1] INFO  org.hbase.async.HBaseClient - Added client for region RegionInfo(table="tsdb-uid", ....
2017-08-18 17:35:19,170 2143 [AsyncHBase I/O Worker #1] INFO  org.hbase.async.HBaseClient - Resolved IP address for host: VMINNAGPRDAPP01 is: 192.168.73.139
2017-08-18 17:35:19,170 2143 [AsyncHBase I/O Worker #1] INFO  org.hbase.async.HBaseClient - Added client for region RegionInfo(table="tsdb", ....


But I see no logs for plugins loaded or any final log like
2017-08-18 19:54:04,999 1935 [main] INFO  net.opentsdb.tools.OpenTSDBMain - Ready to serve on /0.0.0.0:4242

Instead I see a final log like:

2017-08-18 17:35:19,270 2243 [main] INFO  net.opentsdb.core.TSDB - Flushing compaction queue

And a stack trace:
Exception in thread "main" java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
        at org.hbase.async.HBaseClient.flush(HBaseClient.java:811)
        at org.hbase.async.HBaseClient.shutdown(HBaseClient.java:1061)
        at net.opentsdb.core.TSDB$1HClientShutdown.call(TSDB.java:1644)
        at net.opentsdb.core.TSDB$1HClientShutdown.call(TSDB.java:1639)
        at com.stumbleupon.async.Deferred.doCall(Deferred.java:1278)
        at com.stumbleupon.async.Deferred.addCallbacks(Deferred.java:688)
        at com.stumbleupon.async.Deferred.addCallbackDeferring(Deferred.java:738)
        at net.opentsdb.core.TSDB.shutdown(TSDB.java:1723)
        at net.opentsdb.tools.OpenTSDBMain.launchTSD(OpenTSDBMain.java:432)
        at net.opentsdb.tools.OpenTSDBMain.process(OpenTSDBMain.java:171)
        at net.opentsdb.tools.OpenTSDBMain.main(OpenTSDBMain.java:151)

I did some investigating and I find that in my fatjar asynchbase jar was built with manifest
Archiver-Version: Plexus Archiver
Built-By: clarsen
Created-By: Apache Maven 3.2.3
Build-Jdk: 1.8.0_25

and opentsdb was built with manifest
Implementation-Version: 2.4.0RC1
Implementation-Vendor-Id: net.opentsdb
mainClass: net.opentsdb.tools.OpenTSDBMain
Specification-Vendor: The OpenTSDB Authors
Build-Jdk: 1.7.0_141
Built-By: centos

So it seems clear that the hbase client is built using 1.8 and there was a change in concurrenthashmap api between 1.7 and 1.8 and hence the error.

Let me now is there a way to build or fetch any compatible asynchbase built with 1.7.

Thanks
Sachin

ManOLamancha

unread,
Aug 30, 2017, 1:53:36 AM8/30/17
to OpenTSDB
On Friday, August 18, 2017 at 7:41:27 AM UTC-7, Sachin Mittal wrote:

and opentsdb was built with manifest
Implementation-Version: 2.4.0RC1
Implementation-Vendor-Id: net.opentsdb
mainClass: net.opentsdb.tools.OpenTSDBMain
Specification-Vendor: The OpenTSDB Authors
Build-Jdk: 1.7.0_141
Built-By: centos

So it seems clear that the hbase client is built using 1.8 and there was a change in concurrenthashmap api between 1.7 and 1.8 and hence the error.

Let me now is there a way to build or fetch any compatible asynchbase built with 1.7.

That is odd as we're targeting 1.6 with AsyncHBase still:

 82       <plugin>
 83         <groupId>org.apache.maven.plugins</groupId>
 84         <artifactId>maven-compiler-plugin</artifactId>
 85         <version>2.5.1</version>
 86         <configuration>
 87           <source>1.6</source>
 88           <target>1.6</target>
 89           <compilerArgument>-Xlint</compilerArgument>
 90         </configuration>
 91       </plugin>


I'll have to rebuild with the proper JVM and link it in the next cut of OpenTSDB.
Reply all
Reply to author
Forward
0 new messages