简体   繁体   English

jvisualvm:软件导致连接中止:套接字写入错误

[英]jvisualvm: Software caused connection abort: socket write error

When I want to profile a java programm started from eclipse with jvisualvm 1.3.8 I get the error message within eclipse console: 当我想用jvisualvm 1.3.8描述从eclipse开始的java程序时,我在eclipse控制台中收到错误信息:

Software caused connection abort: socket write error.

This also happens when I start the program without eclipse (java -jar ...) from command line console. 当我从命令行控制台启动没有eclipse(java -jar ...)的程序时,也会发生这种情况。 I tested jvisualvm from JDK 1.8.0_20 and downloaded the newest version 1.3.8. 我从JDK 1.8.0_20测试了jvisualvm并下载了最新版本1.3.8。 Here is the stacktrace: 这是堆栈跟踪:

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 feedback@profiler.netbeans.org 
=============================== 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 feedback@profiler.netbeans.org 
=============================== 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 feedback@profiler.netbeans.org 
=============================== 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 

After this the port 5140 is opened by my application to be profiled. 在此之后,我的应用程序打开端口5140以进行分析。 I googled a lot and could not find any help with this. 我google了很多,找不到任何帮助。 I also wrote another simple program and the error occured as well. 我还写了另一个简单的程序,也发生了错误。

What can I do? 我能做什么?

I've encountered this a few times. 我已经遇到过这几次了。 What OS platform are you running this on? 你运行这个OS平台是什么? Windows? 视窗? or *nix? 还是* nix?

On Windows, you'll almost certainly need to run your Eclipse and/or the jvisualvm using Admin privs...I typically set up a command prompt, Run As ... Administrator. 在Windows上,您几乎肯定需要使用Admin privs运行Eclipse和/或jvisualvm ...我通常设置一个命令提示符,Run As ... Administrator。

On Linux, you'll need to be running Eclipse and/or jvisualvm as either root or with an account that has privs that match or exceed the account running the pid you are trying to monitor. 在Linux上,您需要以root用户身份运行Eclipse和/或jvisualvm,或者使用具有匹配或超过运行您要监控的pid的帐户的权限的帐户。

This is definitely a firewall issue. 这绝对是一个防火墙问题。 Most likely you will not have rights to disable your firewall if an OS is not asking you (Windows). 如果操作系统没有问您(Windows),很可能您无权禁用防火墙。 In my case I had eventually ran the application on another box where I had rights to allow JVisualVM to connect to my application. 在我的情况下,我最终在另一个盒子上运行了应用程序,我有权允许JVisualVM连接到我的应用程序。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 软件导致连接中止:套接字写入错误 - Software caused connection abort: socket write error “软件导致连接中止:套接字写入错误”的官方原因 - Official reasons for "Software caused connection abort: socket write error" 软件导致连接异常终止:写入DataOutputStream时套接字写入错误 - Software caused connection abort: socket write error while writing to DataOutputStream java.net.SocketException:软件导致连接中止:重新提交请求时套接字写入错误 - java.net.SocketException: Software caused connection abort: socket write error when resubmitting the request javax.servlet.jsp.JspException:无法插入页面…软件导致连接中止:套接字写入错误 - javax.servlet.jsp.JspException: Can't insert page … Software caused connection abort: socket write error 通过串行端口java.net.SocketException的通信:软件导致连接中止:套接字写入错误 - Communication through serial port, java.net.SocketException: Software caused connection abort: socket write error 在FTP中存储ObjectOutputStream导致java.net.SocketException:软件导致连接中止:套接字写入错误 - Store ObjectOutputStream in FTP causes java.net.SocketException: Software caused connection abort: socket write error Maven Web项目在eclipse(tomcat 7)中运行错误:错误:无法调用Tomcat管理器:软件导致连接中止:套接字写入错误 - The maven web project runs error in eclipse(tomcat 7):error:Cannot invoke Tomcat manager: Software caused connection abort: socket write error 软件导致连接中止:即使从最近的列表中清除了该应用程序,套接字写入错误(它在与服务不同的线程中运行) - Software caused connection abort: socket write error on clearing the app from recent list even (it running in a different thread from a service) 读取输入流时出错:软件导致连接中止'在java服务器中 - Error while reading inputstream : Software caused connection abort' in java server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM