2014-09-04 75 views
9

當我想分析Java PROGRAMM從日食開始jvisualvm 1.3.8我得到Eclipse控制檯中的錯誤消息:jvisualvm:軟件導致連接中止:套接字寫入錯誤

Software caused connection abort: socket write error. 

這也發生在我從命令行控制檯啓動沒有Eclipse(java -jar ...)的程序。我從JDK 1.8.0_20測試了jvisualvm並下載了最新的1.3.8版本。這裏是堆棧跟蹤:

Profiler Agent: Waiting for connection on port 5140 (Protocol version: 15) 
Profiler Agent: Established connection with the tool 
Profiler Agent: Local accelerated session 
Profiler Agent: Connection with agent closed 
Profiler Agent Error: Exception when trying to send response or command to client: 
java.net.SocketException: Software caused connection abort: socket write error 
*** Profiler engine warning: class load hook invoked at inappropriate time for java.lang.Throwable$PrintStreamOrWriter, loader = null 
*** This class will not be instrumented unless you re-run the instrumentation command 
*** Please report this problem to [email protected] 
=============================== Stack trace ===================== 
*** Profiler engine warning: class load hook invoked at inappropriate time for java.lang.Throwable$WrappedPrintStream, loader = null 
*** This class will not be instrumented unless you re-run the instrumentation command 
*** Please report this problem to [email protected] 
=============================== Stack trace ===================== 
*** Profiler engine warning: class load hook invoked at inappropriate time for java.util.IdentityHashMap$KeySet, loader = null 
*** This class will not be instrumented unless you re-run the instrumentation command 
*** Please report this problem to [email protected] 
=============================== Stack trace ===================== 
java.lang.Exception: Stack trace 
     at java.lang.Thread.dumpStack(Thread.java:1329) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(ProfilerInterface.java:912) 
     at java.util.IdentityHashMap.keySet(IdentityHashMap.java:976) 
     at java.util.Collections$SetFromMap.<init>(Collections.java:5512) 
     at java.util.Collections.newSetFromMap(Collections.java:5496) 
     at java.lang.Throwable.printStackTrace(Throwable.java:650) 
     at java.lang.Throwable.printStackTrace(Throwable.java:643) 
     at java.lang.Throwable.printStackTrace(Throwable.java:634) 
     at java.lang.Thread.dumpStack(Thread.java:1329) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(ProfilerInterface.java:912) 
     at java.lang.Throwable.printStackTrace(Throwable.java:643) 
     at java.lang.Throwable.printStackTrace(Throwable.java:634) 
     at java.lang.Thread.dumpStack(Thread.java:1329) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(ProfilerInterface.java:912) 
     at java.lang.Throwable.printStackTrace(Throwable.java:643) 
     at org.netbeans.lib.profiler.server.ProfilerServer.handleIOExceptionOnSend(ProfilerServer.java:1698) 
     at org.netbeans.lib.profiler.server.ProfilerServer.sendComplexCmdToClient(ProfilerServer.java:706) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.sendRootClassLoadedCommand(ProfilerInterface.java:1418) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.access$900(ProfilerInterface.java:70) 
     at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.initiateInstrumentation(ProfilerInterface.java:232) 
     at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.run(ProfilerInterface.java:137) 
=============================== End stack trace ================= 
java.lang.Exception: Stack trace 
     at java.lang.Thread.dumpStack(Thread.java:1329) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(ProfilerInterface.java:912) 
     at java.lang.Throwable.printStackTrace(Throwable.java:643) 
     at java.lang.Throwable.printStackTrace(Throwable.java:634) 
     at java.lang.Thread.dumpStack(Thread.java:1329) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(ProfilerInterface.java:912) 
     at java.lang.Throwable.printStackTrace(Throwable.java:643) 
     at org.netbeans.lib.profiler.server.ProfilerServer.handleIOExceptionOnSend(ProfilerServer.java:1698) 
     at org.netbeans.lib.profiler.server.ProfilerServer.sendComplexCmdToClient(ProfilerServer.java:706) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.sendRootClassLoadedCommand(ProfilerInterface.java:1418) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.access$900(ProfilerInterface.java:70) 
     at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.initiateInstrumentation(ProfilerInterface.java:232) 
     at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.run(ProfilerInterface.java:137) 
=============================== End stack trace ================= 
java.lang.Exception: Stack trace 
     at java.lang.Thread.dumpStack(Thread.java:1329) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.classLoadHook(ProfilerInterface.java:912) 
     at java.lang.Throwable.printStackTrace(Throwable.java:643) 
     at org.netbeans.lib.profiler.server.ProfilerServer.handleIOExceptionOnSend(ProfilerServer.java:1698) 
     at org.netbeans.lib.profiler.server.ProfilerServer.sendComplexCmdToClient(ProfilerServer.java:706) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.sendRootClassLoadedCommand(ProfilerInterface.java:1418) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.access$900(ProfilerInterface.java:70) 
     at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.initiateInstrumentation(ProfilerInterface.java:232) 
     at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.run(ProfilerInterface.java:137) 
=============================== End stack trace ================= 
java.net.SocketException: Software caused connection abort: socket write error 
     at java.net.SocketOutputStream.socketWrite0(Native Method) 
     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) 
     at java.net.SocketOutputStream.write(SocketOutputStream.java:153) 
     at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1877) 
     at java.io.ObjectOutputStream$BlockDataOutputStream.writeBytes(ObjectOutputStream.java:1985) 
     at java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream.java:2168) 
     at java.io.ObjectOutputStream$BlockDataOutputStream.writeUTF(ObjectOutputStream.java:2007) 
     at java.io.ObjectOutputStream.writeUTF(ObjectOutputStream.java:869) 
     at org.netbeans.lib.profiler.wireprotocol.RootClassLoadedCommand.writeObject(RootClassLoadedCommand.java:159) 
     at org.netbeans.lib.profiler.wireprotocol.WireIO.sendComplexCommand(WireIO.java:301) 
     at org.netbeans.lib.profiler.server.ProfilerServer.sendComplexCmdToClient(ProfilerServer.java:703) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.sendRootClassLoadedCommand(ProfilerInterface.java:1418) 
     at org.netbeans.lib.profiler.server.ProfilerInterface.access$900(ProfilerInterface.java:70) 
     at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.initiateInstrumentation(ProfilerInterface.java:232) 
     at org.netbeans.lib.profiler.server.ProfilerInterface$InitiateProfilingThread.run(ProfilerInterface.java:137) 
Profiler Agent Error: Exception when handling command from client: 
java.net.SocketException: Software caused connection abort: recv failed 
Profiler Agent: Connection with agent closed 

之後,由我的應用程序打開端口5140被分析。我GOOGLE了很多,找不到任何幫助。我還寫了另一個簡單的程序,併發生錯誤。

我該怎麼辦?

+0

您是否在企業環境中運行?我遇到了同樣的問題,並懷疑這是由於本地計算機上運行的公司防火牆或其他網絡監視軟件造成的。 – darrenmc 2015-02-04 11:12:06

回答

0

我遇到過這幾次。你在使用哪種操作系統平臺?視窗?或* nix?

在Windows上,您幾乎可以肯定需要使用Admin privs來運行Eclipse和/或jvisualvm ...我通常會設置一個命令提示符Run As ... Administrator。

在Linux上,您需要運行Eclipse和/或jvisualvm作爲root用戶或具有與您正在嘗試監視的pid運行的帳戶相匹配或超過帳戶的priv的帳戶。

0

這絕對是一個防火牆問題。如果操作系統不問你(Windows),你很可能無權禁用你的防火牆。在我的情況下,我最終在另一個盒子上運行了應用程序,我有權讓JVisualVM連接到我的應用程序。

相關問題