In standalone mode master process uses /usr/bin/java which resolves to JVM 1.8 and worker process /usr/lib/jvm/java/bin/java which resolves to 1.7. In my Spark application I'm using some APIs introduced in 1.8.
Looking at stack trace one line that comes up is: Caused by: java.lang.NoClassDefFoundError: Could not initialize class SomeClassDefinedByMe which internally creates instance from java.time which I believe is only in JDK 1.8.
How do I force worker to use JVM 1.8?
Update:
For now I renamed /usr/lib/jvm/java/bin/java and created a link that points to /usr/bin/java. This solved the problem but still would like to know why both processes use different binary location and where is this set.
On each Worker node, edit ${SPARK_HOME}/conf/spark-env.sh and define the appropriate $JAVA_HOME e.g.
export JAVA_HOME=/usr/bin/java
That file is sourced by ${SPARK_HOME}/bin/load-spark-env.sh which is invoked by each and every Spark command-line utility:
${SPARK_HOME}/bin/spark-shell via ${SPARK_HOME}/bin/spark-class
${SPARK_HOME}/bin/spark-submit via ${SPARK_HOME}/bin/spark-class
...
${SPARK_HOME}/sbin/start-slave.sh
...
Side note: the Linux alternatives are the standard way to define which JVM is on top of your PATH...
Typical setup with a "fixed" setting, not relying on the priority set by the OpenJDK RPM install:
$ ls -AFl $(which java)
lrwxrwxrwx. 1 root root 22 Feb 15 16:06 /usr/bin/java -> /etc/alternatives/java*
$ alternatives --display java | grep -v slave
java - status is manual.
link currently points to /usr/java/jdk1.8.0_92/jre/bin/java
/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java - priority 18091
/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java - priority 16000
/usr/java/jdk1.8.0_92/jre/bin/java - priority 18092
Current `best' version is /usr/java/jdk1.8.0_92/jre/bin/java.
...provided that $PATH is defined properly for the Linux account that launches the Spark slaves!
Related
We have deployed our application on rhel 7 from rhel 6 and after deployment we are seeing following error in the catalina.properties, due to this my vm link is getting down frequently. We are using Documentum CMIS 16.4 version on tomcat 8.5 version.
Following is the error's details:
27-Nov-2018 01:57:00.536 SEVERE [https-jsse-nio-0.0.0.0-12510-Acceptor-0] org.apache.tomcat.util.net.NioEndpoint$Acceptor.run Socket accept failed
java.io.IOException: Too many open files
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:457)
at java.lang.Thread.run(Thread.java:748)
Here are my efforts in order to solve this problem:
I have increased ulimit value from 1024 to 8192 for specific user and rebooted it, recycled tomcat service but nothing happened. I had done changed to file named /etc/security/limits.d/20-nproc.conf/20-nproc.conf. kindly help here.
I don't have privileges to add a comment, so posting as an answer. Try to find out which files are open by using the command
lsof -p <pid> | wc -l.
That will tell you which files are not getting closed.
You can also check the limits of a running process by
cat /proc/<pid>/limits
I have installed Timesten database (full version) on linux (Linux is guest OS installed through Oracle viritual box with cloudera VM)
I am trying to run following sqoop command on linux and getting below errors
command
sqoop list-tables --connect jdbc:timesten:direct:dsn=sampledb_1122 --driver com.timesten.jdbc.TimesTenDriver
**error**
ERROR manager.SqlManager: Error reading database metadata: java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbc in java.library.path
java.sql.SQLException: Problems with loading native library/missing methods: no ttJdbc in java.library.path
at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1809)
at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:305)
at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:161)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:233)
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:878)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.SqlManager.listTables(SqlManager.java:520)
at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)
at org.apache.sqoop.Sqoop.run(Sqoop.java:143)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:179)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:218)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:227)
at org.apache.sqoop.Sqoop.main(Sqoop.java:236)
Could not retrieve tables list from server
18/02/18 18:56:04 ERROR tool.ListTablesTool: manager.listTables() returned null
TimesTen bin and lib folder location
/home/cloudra/timesten/TimesTen/tt1122_64/bin
/home/cloudera/timesten/TimesTen/tt1122_64/lib
Following values are setup in my environment and other parameters
USERNAME=cloudera
DESKTOP_SESSION=gnome
MAIL=/var/spool/mail/cloudera
PATH=/var/lib/sqoop:/home/cloudera/timesten/TimesTen/tt1122_64/bin:/home/cloudera/timesten/TimesTen/tt1122_64/lib:/home/cloudera/anaconda3/bin:/var/lib/sqoop:/home/cloudra/timesten/TimesTen/tt1122_64/bin:/home/cloudera/timesten/TimesTen/tt1122_64/lib:/home/cloudera/anaconda3/bin:/home/cloudera/anaconda3/bin:/usr/local/firefox:/sbin:/usr/java/jdk1.7.0_67-cloudera/bin:/usr/local/apache-ant/apache-ant-1.9.2/bin:/usr/local/apache-maven/apache-maven-3.0.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/cloudera/bin
PWD=/home/cloudera
THREAD_FLAGS=native
HOME=/home/cloudera
SHLVL=2
M2_HOME=/usr/local/apache-maven/apache-maven-3.0.4
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LOGNAME=cloudera
CVS_RSH=ssh
CLASSPATH=/home/cloudera/timesten/TimesTen/tt1122_64/lib/ttjdbc6.jar
[cloudera#quickstart ~]$ echo $LD_LIBRARY_PATH
/home/cloudera/timesten/TimesTen/tt1122_64/lib:/home/cloudera/timesten/TimesTen/tt1122_64/lib:
[cloudera#quickstart ~]$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
[cloudera#quickstart ~]$
cloudera#quickstart bin]$ ./ttversion
TimesTen Release 11.2.2.8.0 (64 bit Linux/x86_64) (tt1122_64:53396) 2015-01-20T08:36:31Z
Instance admin: cloudera
Instance home directory: /home/cloudera/timesten/TimesTen/tt1122_64
World accessible
Daemon home directory: /home/cloudera/timesten/TimesTen/tt1122_64/info
PL/SQL enabled.
In addition to above.. the ttjdbc6.jar file is located at following location
[cloudera#quickstart sqoop]$ pwd
/var/lib/sqoop
[cloudera#quickstart sqoop]$ ls -ltr
total 0
lrwxrwxrwx 1 root root 40 Jun 9 2015 mysql-connector-java.jar -> /usr/share/java/mysql-connector-java.jar
lrwxrwxrwx 1 root root 58 Feb 16 21:37 ttjdbc6.jar -> /home/cloudera/timesten/TimesTen/tt1122_64/lib/ttjdbc6.jar
[cloudera#quickstart timesten]$ pwd
/usr/lib/timesten
[cloudera#quickstart timesten]$ ls -ltr
total 276
-rwxrwxrwx 1 root root 279580 Feb 18 11:33 ttjdbc6.jar
Java_library_path output
[cloudera#quickstart timesten]$ java -XshowSettings:properties
Property settings:
awt.toolkit = sun.awt.X11.XToolkit
file.encoding = UTF-8
file.encoding.pkg = sun.io
file.separator = /
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.awt.printerjob = sun.print.PSPrinterJob
java.class.path = /home/cloudera/timesten/TimesTen/tt1122_64/lib/ttjdbc6.jar
java.class.version = 51.0
java.endorsed.dirs = /usr/java/jdk1.7.0_67-cloudera/jre/lib/endorsed
java.ext.dirs = /usr/java/jdk1.7.0_67-cloudera/jre/lib/ext
/usr/java/packages/lib/ext
java.home = /usr/java/jdk1.7.0_67-cloudera/jre
java.io.tmpdir = /tmp
java.library.path = /home/cloudera/timesten/TimesTen/tt1122_64/lib
/home/cloudera/timesten/TimesTen/tt1122_64/lib
/usr/java/packages/lib/amd64
/usr/lib64
/lib64
/lib
/usr/lib
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.7.0_67-b01
I execute ttenv.sh scripts but it is not setting up any parameter when I check env parameters, so I had to do it manually.
Gurus and experts.. please help me here.. not sure what is the issue and why I am getting the above error.
Thanks for your help..
The key line here is this:
java.sql.SQLException: Problems with loading native library/missing methods:
no ttJdbc in java.library.path
The TimesTen JDBC driver is a type 1 / 2 driver and it relies on the underlying TimesTen native libraries. Specifically it needs several shared libraries located in <TimesTen_install_dir>/lib such as libttJdbc.so (the one that the error is complaining about), libtten.so etc. Typically you need to make sure that the java.library.path includes this directory (which it appears is the case) and that the CLASSPATH includes the ttjdbc7.jar file in that directory. Another possibility is that your TimesTen installation is a 'client only' installation in which case you cannot use the 'direct' driver and if you try to do so then you would get this exact error. I suggest checking to see if you actually have the files libttJdbc.so and libtten.so in <TimesTen_install_dir>/lib and if not, then this means you have a client only install and need to configure / use client/server connectivity instead.
7:46:20 PM Gradle sync started
7:46:35 PM Gradle sync failed: Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.10/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Consult IDE log for more details (Help | Show Log)
the jvm version is 1.7.0_79
and the studio version is 2.1.1
Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine.
There's no space available in RAM. To fix go to /android-studio-dir/bin and edit studio.vmoptions and studio64.vmoptions to increment the -Xmx and to reserve more memory to Java. Note that the number of processes active may influence on that.
Probably, the /tmp location is full..
Found this somewhere..
Use df command
df
You should see an output with a line like this:
tmpfs 102400 102312 88 100% /tmp
So to change the size of the tmp file:
sudo mount -o remount,size=2G /tmp
Done! Now, It should work..
I need a command to check the permgenspace in tomcat server. The basic is if I am hitting permgenspace error I want to see the space there.
I used below command to check permgenspace, It is always showing same size eventhough Tomcat may hits the java.lang.OutOfMemoryError: PermGen space error.
java -XX:+PrintFlagsFinal tomcat | grep PermSize
uintx AdaptivePermSizeWeight = 20 {product}
uintx MaxPermSize = 174063616 {pd product}
uintx PermSize = 21757952 {pd product}
Error: Could not find or load main class tomcat
Please suggest me on this.
You should try the following command:
jstat -gcpermcapacity SERVERPID
For java 8+ this command is deprecated; Use these ones instead :
jstat -gcutil SERVERPID
jstat -gc SERVERPID
Source : http://docs.oracle.com/javase/7/docs/technotes/tools/share/jstat.html#gcpermcapacity_option
You could try this :
export JAVA_OPTS="-Xms1024m -Xmx10246m -XX:NewSize=256m
-XX:MaxNewSize=356m -XX:PermSize=256m -XX:MaxPermSize=356m"
You can change the actual heap size and PermGen Space as per your requirement.
Restart and run tomcat command again
I have two linux servers having a tomcat 7.0.42 running with two java applications packaged in 2 WAR files. I'm using JDK7u25 on linux, but one of them still has a symbolic link to jdk1.4.2 (I have no admin rights, so I can't change it).
The Linux server that has the correct symbolic link /usr/bin/java --> jdk 7, works fine. The applications are running without any issues.
The other Linux server that has /usr/bin/java --> jdk1.4.2, BUT has a JAVA_HOME in tomcat set to jdk 7, (JAVA_HOME=//jdk_1.7.0.25/), throws me an error when deploying my apps. My apps need the Forkjoin API (available only in jdk 7).
The only difference I noticed between these two servers, is the symbolic links.
I copied the working tomcat (directory + apps + JDK) to the not working server, and set the JAVA_HOME to the imported working JDK, but still not working... It keeps throwing me error message and can't run the apps.
Here are the logs, although I think it's not explicit enough to understand what I am doing.
WARNING: Exception encountered when executing an asynchronous task
com.quartetfs.fwk.QuartetRuntimeException: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube
at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:493)
at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:408)
at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249)
at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.compute(DistributedDimensionsManager.java:439)
at jsr166.cancellable.impl.CancellableRecursiveAction.executeTask(CancellableRecursiveAction.java:28)
at jsr166.cancellable.impl.CancellableForkJoinTask.exec(CancellableForkJoinTask.java:79)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:990)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1631)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
Caused by: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube
at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.mergeDimensionsInCube(ADistributedActivePivot.java:1014)
at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.onInitialRemoteCommit(ADistributedActivePivot.java:861)
at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:479)
... 9 more
Caused by: java.lang.IllegalArgumentException: The measure CollateralValue.SUM belongs to more than one cube
at com.quartetfs.biz.pivot.distribution.impl.PolymorphicLocalityIdentifier.validateAndContribute(PolymorphicLocalityIdentifier.java:235)
at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$MergeDimensionsTask.compute(ADistributedActivePivot.java:770)
at jsr166.cancellable.impl.CancellableRecursiveAction.executeTask(CancellableRecursiveAction.java:28)
at jsr166.cancellable.impl.CancellableForkJoinTask.exec(CancellableForkJoinTask.java:79)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360)
at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691)
at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.mergeDimensionsInCube(ADistributedActivePivot.java:1009)
... 11 more
Aug 07, 2013 8:18:11 PM com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask compute
INFO: Exception encountered during a broadcasting task. Retrying ...
com.quartetfs.fwk.QuartetRuntimeException: java.util.concurrent.ExecutionException: com.quartetfs.fwk.QuartetRuntimeException: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube
at com.quartetfs.biz.pivot.distribution.impl.RemoteInstanceDistributionManager.onMembersChanged(RemoteInstanceDistributionManager.java:217)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger$MembersNotificationAction$1.compute(ADistributedMessenger.java:1046)
at jsr166e.RecursiveAction.exec(RecursiveAction.java:161)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinTask.doJoin(ForkJoinTask.java:345)
at jsr166e.ForkJoinTask.invokeAll(ForkJoinTask.java:756)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger$MembersNotificationAction.execute(ADistributedMessenger.java:1050)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:181)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:157)
at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249)
at jsr166.impl.DeferredActionQueue.executeAll(DeferredActionQueue.java:68)
at jsr166.impl.DeferredActionQueue$DeferredExecutionAction.compute(DeferredActionQueue.java:274)
at jsr166e.RecursiveAction.exec(RecursiveAction.java:161)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360)
at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691)
at com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask.compute(SafeBroadcastingTask.java:101)
at jsr166e.RecursiveTask.exec(RecursiveTask.java:65)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:990)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1631)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
Caused by: java.util.concurrent.ExecutionException: com.quartetfs.fwk.QuartetRuntimeException: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getResult(ACompositeFuture.java:155)
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getOrCancel(ACompositeFuture.java:251)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessages(ADistributedMessenger.java:793)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessage(ADistributedMessenger.java:864)
at com.quartetfs.biz.pivot.distribution.impl.RemoteInstanceDistributionManager.onMembersChanged(RemoteInstanceDistributionManager.java:215)
... 21 more
Caused by: com.quartetfs.fwk.QuartetRuntimeException: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube
at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:493)
at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:408)
at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249)
at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.compute(DistributedDimensionsManager.java:439)
at jsr166.cancellable.impl.CancellableRecursiveAction.executeTask(CancellableRecursiveAction.java:28)
at jsr166.cancellable.impl.CancellableForkJoinTask.exec(CancellableForkJoinTask.java:79)
... 4 more
Caused by: com.quartetfs.biz.pivot.MergeException: [rcpcn0c-29706] Could not merge commit 2 from BoNYslNonCashCollateralsCube( r9szn0c-50673) in BoNYslNonCashCollateralsDistributedCube
at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.mergeDimensionsInCube(ADistributedActivePivot.java:1014)
at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.onInitialRemoteCommit(ADistributedActivePivot.java:861)
at com.quartetfs.biz.pivot.distribution.impl.DistributedDimensionsManager$ApplyInitialMessageTask.consume(DistributedDimensionsManager.java:479)
... 9 more
Caused by: java.lang.IllegalArgumentException: The measure CollateralValue.SUM belongs to more than one cube
at com.quartetfs.biz.pivot.distribution.impl.PolymorphicLocalityIdentifier.validateAndContribute(PolymorphicLocalityIdentifier.java:235)
at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$MergeDimensionsTask.compute(ADistributedActivePivot.java:770)
at jsr166.cancellable.impl.CancellableRecursiveAction.executeTask(CancellableRecursiveAction.java:28)
at jsr166.cancellable.impl.CancellableForkJoinTask.exec(CancellableForkJoinTask.java:79)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360)
at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691)
at com.quartetfs.biz.pivot.impl.ADistributedActivePivot$DistributedTransactionManager.mergeDimensionsInCube(ADistributedActivePivot.java:1009)
... 11 more
and the other repeated log error:
SEVERE: HelloMessage [HelloMessage-rcpcn0c-47329-62] could not be transmitted
java.util.concurrent.CancellationException
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getResult(ACompositeFuture.java:159)
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getOrCancel(ACompositeFuture.java:251)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessages(ADistributedMessenger.java:793)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessage(ADistributedMessenger.java:864)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.broadcast(ADistributedMessenger.java:881)
at com.quartetfs.tech.distribution.messenger.impl.JGroupsMessenger.ensureMembersCommunication(JGroupsMessenger.java:174)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger$MembersNotificationAction.execute(ADistributedMessenger.java:1004)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:181)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:157)
at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249)
at jsr166.impl.DeferredActionQueue.executeAll(DeferredActionQueue.java:68)
at jsr166.impl.DeferredActionQueue$DeferredExecutionAction.compute(DeferredActionQueue.java:274)
at jsr166e.RecursiveAction.exec(RecursiveAction.java:161)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360)
at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691)
at com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask.compute(SafeBroadcastingTask.java:101)
at jsr166e.RecursiveTask.exec(RecursiveTask.java:65)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:990)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1631)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
Aug 07, 2013 8:18:29 PM com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask compute
INFO: Exception encountered during a broadcasting task. Retrying ...
com.quartetfs.fwk.QuartetRuntimeException: Could not connect to remote instances
at com.quartetfs.tech.distribution.messenger.impl.JGroupsMessenger.ensureMembersCommunication(JGroupsMessenger.java:188)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger$MembersNotificationAction.execute(ADistributedMessenger.java:1004)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:181)
at jsr166.impl.DeferredActionQueue$ConsumerProcedure.consume(DeferredActionQueue.java:157)
at jsr166.impl.SingleConsumerQueue.tryConsume(SingleConsumerQueue.java:249)
at jsr166.impl.DeferredActionQueue.executeAll(DeferredActionQueue.java:68)
at jsr166.impl.DeferredActionQueue$DeferredExecutionAction.compute(DeferredActionQueue.java:274)
at jsr166e.RecursiveAction.exec(RecursiveAction.java:161)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinTask.doInvoke(ForkJoinTask.java:360)
at jsr166e.ForkJoinTask.invoke(ForkJoinTask.java:691)
at com.quartetfs.tech.distribution.messenger.impl.SafeBroadcastingTask.compute(SafeBroadcastingTask.java:101)
at jsr166e.RecursiveTask.exec(RecursiveTask.java:65)
at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:264)
at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:990)
at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1631)
at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
Caused by: java.util.concurrent.CancellationException
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getResult(ACompositeFuture.java:159)
at com.quartetfs.tech.distribution.messenger.future.impl.ACompositeFuture.getOrCancel(ACompositeFuture.java:251)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessages(ADistributedMessenger.java:793)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.sendMessage(ADistributedMessenger.java:864)
at com.quartetfs.tech.distribution.messenger.impl.ADistributedMessenger.broadcast(ADistributedMessenger.java:881)
at com.quartetfs.tech.distribution.messenger.impl.JGroupsMessenger.ensureMembersCommunication(JGroupsMessenger.java:174)
... 16 more
Can it be from the java under /usr/bin/javaeven if I have set JAVA_HOME to the right place? I can't find how tomcat really uses java...
Tomcat, as Stephen indicated, uses multiple different ways, depending on the server configuration, to determine what java is being used.
In most cases, I would start by checking on the working server for the existence of $JAVA_HOME, as well as custom $PATH settings. Check the usual suspects: /etc/profile, /etc/profile.d/, .bash, .profile or the like.
You may even find that JAVA_HOME is specified both at the user level, but also at the service level in the init scripts if you are running it as an actual service.
At this moment, there are many variables that are unanswered in your question:
1.) Are you running the process as the same user in both locations?
2.) Are the users configured identically in both locations, with the same PATH precedence and ENV variables?
3.) Are the init scripts the same?
By providing us as much detail as possible, we can provide a more complete/thorough response.
Does Tomcat uses the java under the symbolic link /usr/bin/java?
It entirely depends on how you have configured Tomcat and how you are launching it.
But the good news that all of that happens in shell scripts that you can easily read ... and if necessary "hack" to figure out which java command is being used. Start with the launch command or init.d script or whatever, and trace it through.
Also, bear in mind that a lot of this stuff is dependent on the Linux distro that you are using, and how they have put together the Tomcat "package".