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".
Related
we're trying to upgrade from Wildfly 15 to Wildfly 17. When starting the application under 17 we get lot's of DEBUGs in log as follows:
2019-07-16 08:30:41,031|DEBUG| org.jboss.as.domain.management|Identification of operation not progressing after [15000000000] ns has been requested
2019-07-16 08:30:51,029|DEBUG| io.undertow.request|Matched prefix path /management for path /management
2019-07-16 08:30:51,029|DEBUG| io.undertow.request.security|Setting authentication required for exchange HttpServerExchange{ POST /management}
2019-07-16 08:30:51,029|DEBUG| org.wildfly.security|Unable to create instance
java.security.NoSuchAlgorithmException: ELY00011: Unable to create service for 'HttpServerAuthenticationMechanismFactory.BEARER_TOKEN'
at org.wildfly.security.WildFlyElytronProvider$ProviderService.newInstance(WildFlyElytronProvider.java:342)
at org.wildfly.security.http.util.SecurityProviderServerMechanismFactory.getMechanismNames(SecurityProviderServerMechanismFactory.java:79)
at org.wildfly.security.http.util.SetMechanismInformationMechanismFactory.getMechanismNames(SetMechanismInformationMechanismFactory.java:58)
at org.wildfly.security.http.util.FilterServerMechanismFactory.getMechanismNames(FilterServerMechanismFactory.java:100)
at org.wildfly.security.http.util.SortedServerMechanismFactory.getMechanismNames(SortedServerMechanismFactory.java:50)
at org.wildfly.security.auth.server.HttpAuthenticationFactory.getAllSupportedMechNames(HttpAuthenticationFactory.java:65)
at org.wildfly.security.auth.server.AbstractMechanismAuthenticationFactory.getMechanismNames(AbstractMechanismAuthenticationFactory.java:77)
at org.jboss.as.domain.http.server.ManagementHttpServer.lambda$secureDomainAccess$3(ManagementHttpServer.java:447)
at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.authenticate(HttpAuthenticator.java:253)
at org.wildfly.security.http.HttpAuthenticator$AuthenticationExchange.access$800(HttpAuthenticator.java:242)
at org.wildfly.security.http.HttpAuthenticator.authenticate(HttpAuthenticator.java:97)
at org.wildfly.elytron.web.undertow.server.SecurityContextImpl.authenticate(SecurityContextImpl.java:96)
at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:50)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodException: org.wildfly.security.http.bearer.BearerTokenAuthenticationMechanism.<init>(java.security.Provider)
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.getConstructor(Class.java:1825)
at org.wildfly.security.WildFlyElytronProvider$ProviderService.newInstance(WildFlyElytronProvider.java:339)
Why is this and how can I get rid of these log entries?
Best regards
Mark.
This appears to be a bug in the WildFlyElytronProvider, I have created the following so we can implement a fix - https://issues.jboss.org/browse/ELY-1847
As this is just a DEBUG message you should be able to ignore in the meantime if you are not trying to use this mechanism.
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 a listener project implemented on java that consumes the data from kafka and pushes into the Vanilla Chronicle queue. I am using the java libraries of jna, jna-platform version 4.4.0 and chronicle queue version 3.6.4. When I run the project on Windows it successfully consumes and pushes the data into the queue. However when I run it on "Ubuntu 16.04.3 LTS" that is located on Azure VM while pushing the data into the queue it fails. And on also when I run it on my local ubuntu that is in VMware it also succesfully runs. Anyone has an idea what the problem is? The execution log is below:
*WARN [main] (net.openhft.affinity.Affinity:149):
Linux JNA-based affinity not usable because it failed to load! Reason: java.lang.ExceptionInInitializerError
at net.openhft.affinity.Affinity.isLinuxJNAAffinityUsable(Affinity.java:113)
at net.openhft.affinity.Affinity.<clinit>(Affinity.java:52)
at net.openhft.affinity.AffinitySupport.getThreadId(AffinitySupport.java:26)
at net.openhft.chronicle.VanillaChronicle$VanillaAppenderImpl.startExcerpt(VanillaChronicle.java:628)
at net.openhft.chronicle.VanillaChronicle$VanillaAppenderImpl.startExcerpt(VanillaChronicle.java:615)
at com.myproject.queue.DataQueueManager.add(DataQueueManager.java:55)
at com.myproject.listener.myprojectListener.initKafka(myprojectListener.java:67)
at com.myproject.listener.myprojectListener.start(myprojectListener.java:43)
at com.myproject.listener.myprojectListener.main(myprojectListener.java:35)
Caused by: java.lang.IllegalStateException: sched_getaffinity(0, (8) , cpuset) failed; errno=22
at net.openhft.affinity.impl.LinuxHelper.sched_getaffinity(LinuxHelper.java:61)
at net.openhft.affinity.impl.LinuxJNAAffinity.getAffinity(LinuxJNAAffinity.java:62)
at net.openhft.affinity.impl.LinuxJNAAffinity.<clinit>(LinuxJNAAffinity.java:49)
... 9 more
Caused by: com.sun.jna.LastErrorException: [22] H"
at com.sun.jna.Native.invokeInt(Native Method)
at com.sun.jna.Function.invoke(Function.java:390)
at com.sun.jna.Function.invoke(Function.java:323)
at com.sun.jna.Library$Handler.invoke(Library.java:236)
at net.openhft.affinity.impl.$Proxy7.sched_getaffinity(Unknown Source)
at net.openhft.affinity.impl.LinuxHelper.sched_getaffinity(LinuxHelper.java:56)
... 11 more
07.09.2017 12:58:28.631 WARN [main] (net.openhft.affinity.Affinity:149):
Posix JNA-based affinity not usable because it failed to load! Reason: java.lang.ExceptionInInitializerError
at net.openhft.affinity.Affinity.isPosixJNAAffinityUsable(Affinity.java:99)
at net.openhft.affinity.Affinity.<clinit>(Affinity.java:56)
at net.openhft.affinity.AffinitySupport.getThreadId(AffinitySupport.java:26)
at net.openhft.chronicle.VanillaChronicle$VanillaAppenderImpl.startExcerpt(VanillaChronicle.java:628)
at net.openhft.chronicle.VanillaChronicle$VanillaAppenderImpl.startExcerpt(VanillaChronicle.java:615)
at com.myproject.queue.DataQueueManager.add(DataQueueManager.java:55)
at com.myproject.listener.myprojectListener.initKafka(myprojectListener.java:67)
at com.myproject.listener.myprojectListener.start(myprojectListener.java:43)
at com.myproject.listener.myprojectListener.main(myprojectListener.java:35)
Caused by: java.lang.IllegalStateException: sched_getaffinity((4) , &(allocated#0x7f2ba436c7e0 (4 bytes) (com.sun.jna.ptr.IntByReference#a437470b)) ) errorNo=22
at net.openhft.affinity.impl.PosixJNAAffinity.getAffinity(PosixJNAAffinity.java:125)
at net.openhft.affinity.impl.PosixJNAAffinity.<clinit>(PosixJNAAffinity.java:64)
... 9 more
Caused by: com.sun.jna.LastErrorException: [22] ý
at com.sun.jna.Native.invokeInt(Native Method)
at com.sun.jna.Function.invoke(Function.java:390)
at com.sun.jna.Function.invoke(Function.java:323)
at com.sun.jna.Library$Handler.invoke(Library.java:236)
at net.openhft.affinity.impl.$Proxy8.sched_getaffinity(Unknown Source)
at net.openhft.affinity.impl.PosixJNAAffinity.getAffinity(PosixJNAAffinity.java:117)
... 10 more
07.09.2017 12:58:28.633 INFO [main] (net.openhft.affinity.Affinity:61):
Using dummy affinity control implementation
07.09.2017 12:58:28.634 ERROR [main] (com.myproject.listener.myprojectListener:71):
java.lang.UnsupportedOperationException*
Caused by: com.sun.jna.LastErrorException: [22] H"
Error code 22 from the linux source is EINVAL [1].
Looking at the man page for the function sched_getaffinity shows the reason for EINVAL being returned:
EINVAL (sched_getaffinity() and, in kernels before 2.6.9, sched_setaffinity()) cpusetsize is smaller than the size of the affinity mask used by the kernel.
This could be an issue in the library, but is more likely due to the runtime environment and the way that the VM infrastructure is reporting/using CPU masks.
As Peter has pointed out, the value of setting process affinity in a virtualised environment is questionable.
1) http://elixir.free-electrons.com/linux/v4.4.84/source/include/uapi/asm-generic/errno-base.h#L25
I have installed gerrit server setup in localhost. And after making the successful connection the Web UI has been launched. There i have registered with my gmail id in "Sign in with a Launchpad ID" option.
Its worked earlier, but now it shows the error "Provider is not supported, or was incorrectly entered." when i try to login. I had searched a lot and found some solution regarding the security issues in the installed java in the system. I have Oracle Jdk8 not OpenJdk in my system. so should i have to switch to Open Jdk. Here is my error log messages from log file.
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:90)
at sun.security.validator.Validator.getInstance(Validator.java:179)
at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:312)
at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:171)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:184)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1491)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
... 66 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:200)
at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:120)
at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:104)
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:88)
... 78 more
Issue Fixed !
As i have been using Oracle Java 8, i have installed Open Jdk 7 with the following commnad.
sudo apt-get install ca-certificates-java
But issue resolved only when i have changed java home variable in gerrit.config file.
javaHome = /usr/lib/jvm/java-7-openjdk-amd64/jre
Now the issues fixed for me..
My webserver, orion 1.5.4, run on jre 1.4.2, when I run
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
the following exception is thrown
java.security.NoSuchAlgorithmException:Algorithm PBKDF2WithHmacSHA1 not available
I google and find need to add Bouncy Castle provider, so I download bcprov-jdk14-150.jar and placed it in classpath, and download the unlimited policy files in the JVM, then when I run the program code, error thrown in line
aesCipher.init(Cipher.DECRYPT_MODE,secretKey, new IvParameterSpec(ivByte));
the error message is
Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
at javax.crypto.SunJCE_b.(DashoA12275)
... 15 more
Caused by: java.lang.SecurityException: Jurisdiction policy files are not signed by trusted signers!
at javax.crypto.SunJCE_b.a(DashoA12275)
at javax.crypto.SunJCE_b.g(DashoA12275)
at javax.crypto.SunJCE_b.f(DashoA12275)
at javax.crypto.SunJCE_t.run(DashoA12275)
at java.security.AccessController.doPrivileged(Native Method)
... 16 more
how to solve it?
I found the problem, I download the unlimited policy files for java 1.6 wrongly, should download for java 1.4.
thanks