Java EOF problems on HotspotFX - java

On the last 30 days I've encountered this error twice on Hotspot.
java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2570)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1314)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368)
at xy.wZV(Unknown Source)
at xy.run(Unknown Source)
at java.lang.Thread.run(Thread.java:679)
Any idea on how to replicate the error?
And if there are there any fellow programmers/traders who have experienced this same error I would appreciate some input. Thanks.

It looks like your ObjectInputStream found end-of-file in the middle of reading an object. Where is this ObjectInputStream from? Maybe the file got truncated, or the connection got closed prematurely?

Related

I am getting java.io.IOException: Broken pipe when the response data is huge

I am getting java.io.IOException: Broken pipe issue in Higher environment where the code is deployed. But in local system it works fine.
The data is very huge, more than 1000 JSON objects and it takes about 40 seconds to get the response in Local system.
The error logs is as follows
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:341) ~[tomcat-embed-core-9.0.16.jar!/:9.0.16]
at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:766) ~[tomcat-embed-core-9.0.16.jar!/:9.0.16]
at org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:671) ~[tomcat-embed-core-9.0.16.jar!/:9.0.16]
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:376) ~[tomcat-embed-core-9.0.16.jar!/:9.0.16]
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:354) ~[tomcat-embed-core-9.0.16.jar!/:9.0.16]
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:96) ~[tomcat-embed-core-9.0.16.jar!/:9.0.16]
at org.springframework.session.web.http.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:620) ~[spring-session-core-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:639) ~[spring-security-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
at org.springframework.security.web.util.OnCommittedResponseWrapper$SaveContextServletOutputStream.write(OnCommittedResponseWrapper.java:639) ~[spring-security-web-5.1.4.RELEASE.jar!/:5.1.4.RELEASE]
and so on... Please help. Not finding any solution to fix this.

Spark 1.6 java.io.IOException: Filesystem closed

I have a strange issue. I'm not closing file system by .close() or .abort().
Locally my application is working perfectly, but when I try to do spark-submit on cluster I have got a lot of Exceptions
> ERROR scheduler.LiveListenerBus: Listener EventLoggingListener threw an exception
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.scheduler.EventLoggingListener$$anonfun$logEvent$3.apply(EventLoggingListener.scala:150)
at org.apache.spark.scheduler.EventLoggingListener$$anonfun$logEvent$3.apply(EventLoggingListener.scala:150)
at scala.Option.foreach(Option.scala:236)
at org.apache.spark.scheduler.EventLoggingListener.logEvent(EventLoggingListener.scala:150)
at org.apache.spark.scheduler.EventLoggingListener.onApplicationEnd(EventLoggingListener.scala:196)
at org.apache.spark.scheduler.SparkListenerBus$class.onPostEvent(SparkListenerBus.scala:54)
at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
at org.apache.spark.scheduler.LiveListenerBus.onPostEvent(LiveListenerBus.scala:31)
at org.apache.spark.util.ListenerBus$class.postToAll(ListenerBus.scala:55)
at org.apache.spark.util.AsynchronousListenerBus.postToAll(AsynchronousListenerBus.scala:38)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(AsynchronousListenerBus.scala:87)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1$$anonfun$apply$mcV$sp$1.apply(AsynchronousListenerBus.scala:72)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1$$anonfun$apply$mcV$sp$1.apply(AsynchronousListenerBus.scala:72)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1$$anonfun$run$1.apply$mcV$sp(AsynchronousListenerBus.scala:71)
at org.apache.spark.util.Utils$.tryOrStopSparkContext(Utils.scala:1182)
at org.apache.spark.util.AsynchronousListenerBus$$anon$1.run(AsynchronousListenerBus.scala:70)
Caused by: java.io.IOException: Filesystem closed
at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:858)
at org.apache.hadoop.hdfs.DFSOutputStream.flushOrSync(DFSOutputStream.java:2350)
at org.apache.hadoop.hdfs.DFSOutputStream.hflush(DFSOutputStream.java:2296)
at org.apache.hadoop.fs.FSDataOutputStream.hflush(FSDataOutputStream.java:130)
... 20 more
But application is still running, until I have got. This error kills my app.
> ERROR util.Utils: Uncaught exception in thread Thread-3
java.io.IOException: Filesystem closed
at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:858)
at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:2120)
at org.apache.hadoop.hdfs.DistributedFileSystem$20.doCall(DistributedFileSystem.java:1253)
at org.apache.hadoop.hdfs.DistributedFileSystem$20.doCall(DistributedFileSystem.java:1249)
at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1249)
at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1417)
at org.apache.spark.scheduler.EventLoggingListener.stop(EventLoggingListener.scala:224)
at org.apache.spark.SparkContext$$anonfun$stop$8$$anonfun$apply$mcV$sp$5.apply(SparkContext.scala:1744)
at org.apache.spark.SparkContext$$anonfun$stop$8$$anonfun$apply$mcV$sp$5.apply(SparkContext.scala:1744)
at scala.Option.foreach(Option.scala:236)
at org.apache.spark.SparkContext$$anonfun$stop$8.apply$mcV$sp(SparkContext.scala:1744)
at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1220)
at org.apache.spark.SparkContext.stop(SparkContext.scala:1743)
at org.apache.spark.SparkContext$$anonfun$3.apply$mcV$sp(SparkContext.scala:604)
at org.apache.spark.util.SparkShutdownHook.run(ShutdownHookManager.scala:267)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply$mcV$sp(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1$$anonfun$apply$mcV$sp$1.apply(ShutdownHookManager.scala:239)
at org.apache.spark.util.Utils$.logUncaughtExceptions(Utils.scala:1818)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply$mcV$sp(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anonfun$runAll$1.apply(ShutdownHookManager.scala:239)
at scala.util.Try$.apply(Try.scala:161)
at org.apache.spark.util.SparkShutdownHookManager.runAll(ShutdownHookManager.scala:239)
at org.apache.spark.util.SparkShutdownHookManager$$anon$2.run(ShutdownHookManager.scala:218)
at org.apache.hadoop.util.ShutdownHookManager$1.run(ShutdownHookManager.java:54)
The last error is totally randomly, but it occurs 90% times when I'm using my app. Can be there be some with cluster configuration or my code is wrong?
Thanks
If the FileSystem is closed somewhere , the error will also occur when you use it again.

Error when running Karaf in ODL

A few minutes after initiating Karaf, I always receive this error. Cant figure out what the impact of this is or how to fix it:
opendaylight-user#root>Exception in thread "config-pusher" java.lang.SecurityException: Insufficient roles/credentials for operation
at org.apache.karaf.management.KarafMBeanServerGuard.handleInvoke(KarafMBeanServerGuard.java:289)
at org.apache.karaf.management.KarafMBeanServerGuard.invoke(KarafMBeanServerGuard.java:85)
at org.apache.karaf.management.boot.KarafMBeanServerBuilder$MBeanInvocationHandler.invoke(KarafMBeanServerBuilder.java:63)
at com.sun.proxy.$Proxy0.invoke(Unknown Source)
at com.sun.jmx.mbeanserver.MXBeanProxy$InvokeHandler.invoke(MXBeanProxy.java:150)
at com.sun.jmx.mbeanserver.MXBeanProxy.invoke(MXBeanProxy.java:167)
at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:258)
at com.sun.proxy.$Proxy16.beginConfig(Unknown Source)
at org.opendaylight.controller.config.util.ConfigRegistryJMXClient.beginConfig(ConfigRegistryJMXClient.java:96)
at org.opendaylight.controller.netconf.confignetconfconnector.transactions.TransactionProvider.getTestTransaction(TransactionProvider.java:120)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.test(EditConfig.java:109)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.executeTests(EditConfig.java:96)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.getResponseInternal(EditConfig.java:75)
at org.opendaylight.controller.netconf.confignetconfconnector.operations.editconfig.EditConfig.handleWithNoSubsequentOperations(EditConfig.java:308)
at org.opendaylight.controller.netconf.util.mapping.AbstractLastNetconfOperation.handle(AbstractLastNetconfOperation.java:33)
at org.opendaylight.controller.netconf.util.mapping.AbstractNetconfOperation.handle(AbstractNetconfOperation.java:100)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.sendRequestGetResponseCheckIsOK(ConfigPusherImpl.java:342)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfig(ConfigPusherImpl.java:293)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.pushConfigWithConflictingVersionRetries(ConfigPusherImpl.java:135)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.internalPushConfigs(ConfigPusherImpl.java:103)
at org.opendaylight.controller.netconf.persist.impl.ConfigPusherImpl.process(ConfigPusherImpl.java:76)
at org.opendaylight.controller.netconf.persist.impl.osgi.ConfigPersisterActivator$InnerCustomizer$1.run(ConfigPersisterActivator.java:181)
at java.lang.Thread.run(Thread.java:745)
Has any one else experienced this or know how to fix it?
Karaf 3.0.1 has a known JMX bug that should be fixed in 3.0.2… if you don’t get your bin/karaf from "controller/opendaylight/distributions/opendaylight-karaf-resources" you will get this exception.
Edit this file:
karaf/target/assembly/system/org/opendaylight/controller/karaf-parent/1.5.3-SNAPSHOT/karaf-parent-1.5.3-SNAPSHOT.pom
And set ignorePermissions tag true.
References:
https://lists.opendaylight.org/pipermail/controller-dev/2014-September/006551.html
https://lists.opendaylight.org/pipermail/controller-dev/2014-September/006552.html

SocketException: errno = 0x44

When attempting to create a connect a socket in a VM running on a vxWorks system I'm getting a rather odd SocketException thrown intermittently. I have not been able to isolate what is causing the exception to occur. Without modifying any external factors successful connection is seemingly random.
Here's the top of the stack trace (from where it enters java.net):
(0000069317) java.net.SocketException: errno2: 68, error: errno = 0x44 for fd: 38
(0000069323) at java.net.PlainSocketImpl.socketConnect(Native Method)
(0000069326) at java.net.PlainSocketImpl.doConnect(Unknown Source)
(0000069329) at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
(0000069366) at java.net.PlainSocketImpl.connect(Unknown Source)
(0000069372) at java.net.Socket.connect(Unknown Source)
The block throwing the exception is as below:
socket = new Socket();
socket.connect(addr, CONNECT_TIMEOUT);
Where addr is a java.net.SocketAddress.
Can anyone provide some insight into what errno 0x44 is?
vxWorks have different errno code numbering than Unix systems.
In vxWorks errno 0x44 (68) is EINPROGRESS.
EINPROGRESS may be set by the following routines:
aio_read(), aio_return(), aio_write()
EINPROGRESS is not usually error. With asynchronous IO, it just indicate that something is started, but it is not yet completed.
Maybe Java translates 68 incorrectly to EADV.
Try to use:
socket.connect(addr);
instead of
socket.connect(addr, CONNECT_TIMEOUT);
Maybe that is enough for avoid AIO and EINPROGRESS.

xSocket ExtendedClosedChannelException

I have an error that I sometimes met. The error stack trace is below;
2011-05-04-xWorkerPool-1-thread-2--FATAL-su.games.engine.communication.gameSocketDataHandler:ServiceSocketDataHandler.onData:
could not write. channel is close or not initialized (id=25c1031512fb560155a71db6548S1517c (closed))-----
org.xsocket.connection.ExtendedClosedChannelException: could not write. channel is close or not initialized (id=25c1031512fb560155a71db6548S1517c (closed))
at org.xsocket.connection.AbstractNonBlockingStream.ensureStreamIsOpenAndWritable(AbstractNonBlockingStream.java:1537)
at org.xsocket.connection.AbstractNonBlockingStream.write(AbstractNonBlockingStream.java:1054)
at org.xsocket.connection.AbstractNonBlockingStream.write(AbstractNonBlockingStream.java:1039)
at su.games.engine.communication.ServiceSocketDataHandler.onData(ServiceSocketDataHandler.java:63)
at org.xsocket.connection.HandlerAdapter.performOnData(HandlerAdapter.java:242)
at org.xsocket.connection.HandlerAdapter.access$200(HandlerAdapter.java:42)
at org.xsocket.connection.HandlerAdapter$PerformOnDataTask.run(HandlerAdapter.java:210)
at org.xsocket.SerializedTaskQueue.performPendingTasks(SerializedTaskQueue.java:161)
at org.xsocket.SerializedTaskQueue.access$100(SerializedTaskQueue.java:40)
at org.xsocket.SerializedTaskQueue$MultithreadedTaskProcessor.run(SerializedTaskQueue.java:189)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I use the xSocket 2.8.15 version(jar). Sorry for the tag I have permission issue to create a new tag.The error can be defined as follows. I have number of INonBlockingConnection object and when I try to write some data by using the nbc.write() I get an error as defined above. I search the google and visit the xSocket mailing list. But I can not find any solution. I need some help. Thanks the site StackOverflow and help sorry for the English. I am waiting your advice.
KingSpeech.
The error appears fairly self explanatory. It appears that your connection has been closed or failed to connect. This is most likely due to a problem on the other side (or your network)

Categories

Resources