jmap Exception in thread "main" java.io.IOException: 拒绝访问。
环境:
现有一个独立运行的系统S(有独立的jre,但是没jdk),现想通过jmap导出其内存堆栈信息。于是另外安装一个jdk。可是jdk的版本跟S系统的jre不能对应上。出了很多错误。
总是报错:
C:\Program Files\Java\jdk1.7.0_04\bin>jmap -dump:format=b,file=D:/test/test_mem.
bin 15112
Dumping heap to D:\test\test_mem.bin ...
Exception in thread "main" java.io.IOException: 拒绝访问。
at sun.tools.attach.WindowsVirtualMachine.enqueue(Native Method)
at sun.tools.attach.WindowsVirtualMachine.execute(WindowsVirtualMachine.
java:96)
at sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualM
achine.java:217)
at sun.tools.attach.HotSpotVirtualMachine.dumpHeap(HotSpotVirtualMachine
.java:180)
at sun.tools.jmap.JMap.dump(JMap.java:242)
at sun.tools.jmap.JMap.main(JMap.java:140)
C:\Users\Administrator>jmap -dump:format=b,file=test_mema.bin 10036
10036: Unable to attach to 64-bit process
linux:/opt/software/jdk1.7.0_09/bin # ./jmap -F -dump:format=b,file=test_mema.bin 8152
Attaching to process ID 8152, please wait...
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.tools.jmap.JMap.runTool(JMap.java:197)
at sun.tools.jmap.JMap.main(JMap.java:128)
Caused by: sun.jvm.hotspot.runtime.VMVersionMismatchException: Supported versions are 23.5-b02. Target VM is 24.51-b03
at sun.jvm.hotspot.runtime.VM.checkVMVersion(VM.java:234)
at sun.jvm.hotspot.runtime.VM.<init>(VM.java:297)
at sun.jvm.hotspot.runtime.VM.initialize(VM.java:367)
at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.java:598)
at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:493)
at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.java:331)
at sun.jvm.hotspot.tools.Tool.start(Tool.java:163)
at sun.jvm.hotspot.tools.HeapDumper.main(HeapDumper.java:77)
... 6 more
Attaching to process ID 8152, please wait...
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0xf6934777, pid=10859, tid=2925202288
#
# JRE version: 6.0_29-b11
# Java VM: Java HotSpot(TM) Server VM (20.4-b02 mixed mode linux-x86 )
# Problematic frame:
# C [libsaproc.so+0x1777] long double restrict+0x1d
#
# An error report file with more information is saved as:
# /opt/software/jdk1.6.0_29/bin/hs_err_pid10859.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Aborted
8152: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
貌似 1.6 不支持F参数
后面换成了一个jdk1.7 64位的就ok了!
----------- 其实更简单的做法是,。 将安装好的jdk(jdk1.6以上版本),然后将其中jre覆盖S系统的jre,重启jre即可。
—— 不过在win7上还是一直报第一个错: "main" java.io.IOException: 拒绝访问。。。。
jmap Exception in thread "main" java.io.IOException: 拒绝访问。的更多相关文章
- windows下eclipse远程连接hadoop错误“Exception in thread"main"java.io.IOException: Call to Master.Hadoop/172.20.145.22:9000 failed ”
在VMware虚拟机下搭建了hadoop集群,ubuntu-12.04,一台master,三台slave.hadoop-0.20.2版本.在 master机器上利用eclipse-3.3连接hadoo ...
- 解决方案--java执行cmd命令ProcessBuilder--出错Exception in thread "main" java.io.IOException: Cannot run program "dir d:\": CreateProcess error=2(xjl456852原创)
当我尝试在java中通过ProcessBuilder运行window的cmd命令时出现错误: public static void main(String [] args) throws IOExce ...
- Exception in thread "main" java.io.IOException: Failed to set permissions of path
在跑BuildForest的时候,编写了下面的程序: package test.breiman; import org.apache.mahout.classifier.df.mapreduce.Bu ...
- WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Exception in thread "main" java.io.IOException: No FileSystem for sc F
1.执行脚本程序报如下所示的错误: [hadoop@slaver1 script_hadoop]$ hadoop jar web_click_mr_hive.jar com.bie.hive.mr.C ...
- nutch爬取时Exception in thread “main” java.io.IOException: Job failed!
用cygwin运行nutch 1.2爬取提示IOException: $ bin/nutch crawl urls -dir crawl -depth 3 -topN 10 crawl started ...
- spark运行java-jar:Exception in thread "main" java.io.IOException: No FileSystem for scheme: hdfs
今天碰到的一个 spark问题,困扰好久才解决 首先我的spark集群部署使用的部署包是官方提供的 spark-1.0.2-bin-hadoop2.tgz 部署在hadoop集群上. 在运行java ...
- Exception in thread "main" java.io.IOException: Mkdirs failed to create /var/folders/q0/1wg8sw1x0dg08cmm5m59sy8r0000gn/T/hadoop-unjar6090005653875084137/META-INF/license at org.apache.hadoop.util.Run
在使用hadoop运行jar时出现. 解决方法 zip -d Test.jar LICENSE zip -d Test.jar META-INF/LICENSE 完美解决.
- [改错_19/04/01] 学习Java.IO 对象数据流时出现 Exception in thread "main" java.io.EOFException ...at cn.sxt.test.Test_DataStream.main(Test_DataStream.java:31) 错误 .
过程描述:编译可以通过,就是每次运行时出现如下的图片,百思不得其解. 错误原因: byte[] datas=baos.toByteArray(); 放在了oos.writeInt(14);oos.fl ...
- "main" java.io.IOException: Mkdirs failed to create /user/centos/hbase-staging (exists=false, cwd=file:/home/centos)
Exception in thread "main" java.io.IOException: Mkdirs failed to create /user/centos/hbase ...
随机推荐
- 写个简单的chrome插件-京东商品历史价格查询
说chrome插件编写的先关文章, 首推小茗的[干货]Chrome插件(扩展)开发全攻略. 有非常完善的理论,引用和demo代码. 但是还是建议看官方的 chrome extensions. chro ...
- Word所有字体按比例缩小
ctrl + [ 不然每次都要一部分一部分的修改啊
- 《DSP using MATLAB》Problem 4.21
快到龙抬头,居然下雪了,天空飘起了雪花,温度下降了近20°. 代码: %% -------------------------------------------------------------- ...
- 【BZOJ2683】简单题
cdq分治妙啊 (被改过题面的)原题: dydxh所出的题目是这样的:有一个N*N矩阵,给出一系列的修改和询问,修改是这样的:将(x,y)中的数字加上k,而询问是这样的:求(x1,y1)到(x2,y2 ...
- 记录一次服务器CPU 100%的解决过程
昨天客户反馈业务系统很慢,而且偶尔报错. 查看nginx日志: [root@s2 nginx]# tail log/error.log 2017/03/14 12:54:46 [error] 1704 ...
- 51Nod1526 分配笔名
分析 在trie树上贪心,将所有串加入trie树中,在深度较深的地方匹配会更优. 由于只需要知道最后的总质量,所以直接取每个点的子树中最大的匹配即可 复杂度\(O(\sum len)\) 加串的时候把 ...
- redis sentinel 高可用(HA)方案部署,及python应用示例
redis sentinel(哨兵)高可用集群的部署方法,并通过 python 程序实例讲解如何使用 redis sentinel 简介 介绍 redis sentinel(哨兵)集群的部署,配置一主 ...
- stenciljs 学习一 web 组件开发
stenciljs 介绍参考官方网站,或者 https://www.cnblogs.com/rongfengliang/p/9706542.html 创建项目 使用脚手架工具 npm init ste ...
- mysql 事务隔离级别详解
事物的 隔离级别,说简单非常简单(新手也能说出 是个隔离级别 和 影响),说男也非常难.(很多 有几年编程 经验的程序员依旧搞不清楚) 废话不多少 直接开始: 事务的隔离级别 是用来描述 事务的读关系 ...
- HttpCookieCollection类
一.最近在研究HttpRequest类的时候,发现返回的cookie集合是存在放这个类的对象的.而实际上这个类只是一个HttpCookie对象的集合,关于HttpCookie类可以查看http://w ...