mycat启动报错

报错信息

 --> Wrapper Started as Daemon
STATUS | wrapper  | 2019/10/21 16:08:40 | Launching a JVM...
ERROR  | wrapper  | 2019/10/21 16:08:40 | Unable to start JVM: No such file or directory (2)
ERROR  | wrapper  | 2019/10/21 16:08:40 | JVM exited while loading the application.
STATUS | wrapper  | 2019/10/21 16:08:44 | Launching a JVM...
ERROR  | wrapper  | 2019/10/21 16:08:44 | Unable to start JVM: No such file or directory (2)
ERROR  | wrapper  | 2019/10/21 16:08:44 | JVM exited while loading the application.
STATUS | wrapper  | 2019/10/21 16:08:48 | Launching a JVM...
ERROR  | wrapper  | 2019/10/21 16:08:48 | Unable to start JVM: No such file or directory (2)
ERROR  | wrapper  | 2019/10/21 16:08:48 | JVM exited while loading the application.
STATUS | wrapper  | 2019/10/21 16:08:52 | Launching a JVM...
ERROR  | wrapper  | 2019/10/21 16:08:52 | Unable to start JVM: No such file or directory (2)
ERROR  | wrapper  | 2019/10/21 16:08:52 | JVM exited while loading the application.
STATUS | wrapper  | 2019/10/21 16:08:57 | Launching a JVM...
ERROR  | wrapper  | 2019/10/21 16:08:57 | Unable to start JVM: No such file or directory (2)
ERROR  | wrapper  | 2019/10/21 16:08:57 | JVM exited while loading the application.
FATAL  | wrapper  | 2019/10/21 16:08:57 | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
FATAL  | wrapper  | 2019/10/21 16:08:57 |   There may be a configuration problem: please check the logs.
STATUS | wrapper  | 2019/10/21 16:08:57 | <-- Wrapper Stopped

先定位到是jvm的问题
再看jvm的配置

#设置路径
vim /root/mycat/mycat/conf/wrapper.conf 
#查看配置
# Java Application
wrapper.java.command=%JAVA_HOME%/bin/java

先改成绝对路径,不用环境变量

wrapper.java.command=/usr/java/jdk1.8.0_171/bin/java

再重启

mycat restart

还是失败,继续查看日志

INFO   | jvm 4    | 2019/10/21 16:27:48 | # There is insufficient memory for the Java Runtime Environment to continue.
INFO   | jvm 4    | 2019/10/21 16:27:48 | # Native memory allocation (mmap) failed to map 715849728 bytes for committing reserved memory.
INFO   | jvm 4    | 2019/10/21 16:27:48 | # An error report file with more information is saved as:
INFO   | jvm 4    | 2019/10/21 16:27:48 | # /root/mycat/mycat/hs_err_pid21295.log
STATUS | wrapper  | 2019/10/21 16:27:52 | Launching a JVM...
ERROR  | wrapper  | 2019/10/21 16:27:52 | JVM exited while loading the application.
INFO   | jvm 5    | 2019/10/21 16:27:52 | Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
INFO   | jvm 5    | 2019/10/21 16:27:52 | Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x0000000715550000, 715849728, 0) failed; error='Cannot allocate memory' (errno=12)
INFO   | jvm 5    | 2019/10/21 16:27:52 | #
INFO   | jvm 5    | 2019/10/21 16:27:52 | # There is insufficient memory for the Java Runtime Environment to continue.
INFO   | jvm 5    | 2019/10/21 16:27:52 | # Native memory allocation (mmap) failed to map 715849728 bytes for committing reserved memory.
INFO   | jvm 5    | 2019/10/21 16:27:52 | # An error report file with more information is saved as:
INFO   | jvm 5    | 2019/10/21 16:27:52 | # /root/mycat/mycat/hs_err_pid21453.log
FATAL  | wrapper  | 2019/10/21 16:27:52 | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
FATAL  | wrapper  | 2019/10/21 16:27:52 |   There may be a configuration problem: please check the logs.
STATUS | wrapper  | 2019/10/21 16:27:52 | <-- Wrapper Stopped

尬...由于穷,买不起高配置的服务器,内存太小,这个时候改下mycat的启动配置

#设置路径
vim /root/mycat/mycat/conf/wrapper.conf 
#修改配置
wrapper.java.additional.10=-Xmx640M
wrapper.java.additional.11=-Xms256M

再启动....

mycat restart

还是报错,看日志

INFO   | jvm 1    | 2019/10/21 16:37:19 | WrapperSimpleApp: Encountered an error running main: java.lang.ExceptionInInitializerError
INFO   | jvm 1    | 2019/10/21 16:37:19 | java.lang.ExceptionInInitializerError
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.MycatStartup.main(MycatStartup.java:53)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at java.lang.reflect.Method.invoke(Method.java:498)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at java.lang.Thread.run(Thread.java:748)
INFO   | jvm 1    | 2019/10/21 16:37:19 | Caused by: io.mycat.config.util.ConfigException: org.xml.sax.SAXParseException; lineNumber: 29; columnNumber: 10; 元素内容必须由格式正确的字符数据或标记组成。
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.config.loader.xml.XMLSchemaLoader.load(XMLSchemaLoader.java:121)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.config.loader.xml.XMLSchemaLoader.<init>(XMLSchemaLoader.java:78)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.config.loader.xml.XMLSchemaLoader.<init>(XMLSchemaLoader.java:82)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.config.ConfigInitializer.<init>(ConfigInitializer.java:76)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.config.MycatConfig.<init>(MycatConfig.java:72)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.MycatServer.<init>(MycatServer.java:166)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.MycatServer.<clinit>(MycatServer.java:109)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   ... 7 more
INFO   | jvm 1    | 2019/10/21 16:37:19 | Caused by: org.xml.sax.SAXParseException; lineNumber: 29; columnNumber: 10; 元素内容必须由格式正确的字符数据或标记组成。
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1472)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.startOfMarkup(XMLDocumentFragmentScannerImpl.java:2635)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.config.util.ConfigUtil.getDocument(ConfigUtil.java:115)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   at io.mycat.config.loader.xml.XMLSchemaLoader.load(XMLSchemaLoader.java:111)
INFO   | jvm 1    | 2019/10/21 16:37:19 |   ... 13 more
STATUS | wrapper  | 2019/10/21 16:37:21 | <-- Wrapper Stopped

查看配置文件,在schema.xml 文件发现确实多了个<(提示很友好)


配置文件格式出错.png

修改掉之后再重启

mycat restart

再产看日志,终于启动成功了

STATUS | wrapper  | 2019/10/21 16:53:45 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2019/10/21 16:53:45 | Launching a JVM...
INFO   | jvm 1    | 2019/10/21 16:53:46 | Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
INFO   | jvm 1    | 2019/10/21 16:53:46 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO   | jvm 1    | 2019/10/21 16:53:46 |   Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
INFO   | jvm 1    | 2019/10/21 16:53:46 | 
INFO   | jvm 1    | 2019/10/21 16:53:48 | MyCAT Server startup successfully. see logs in logs/mycat.log
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 219,869评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,716评论 3 396
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 166,223评论 0 357
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 59,047评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 68,089评论 6 395
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,839评论 1 308
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,516评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,410评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,920评论 1 319
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,052评论 3 340
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,179评论 1 352
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,868评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,522评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,070评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,186评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,487评论 3 375
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,162评论 2 356

推荐阅读更多精彩内容

  • 转载:https://www.cnblogs.com/joylee/p/7513038.html 学会数据库读写分...
    Leo_df55阅读 4,000评论 0 3
  • ORA-00001: 违反唯一约束条件 (.) 错误说明:当在唯一索引所对应的列上键入重复值时,会触发此异常。 O...
    我想起个好名字阅读 5,324评论 0 9
  • 传统关系型数据库的分布式开发通常需要自己做,不仅耗时耗力而且效果不是很理想,当想快速搭建时,最初想到的是看有没有第...
    欢醉阅读 2,393评论 0 8
  • 我想写一封信,一封不知道谁会收到的心, 信里面戴着深深的思念和爱意。
    不好意思你是我的阅读 205评论 0 0
  • 2017年3月23日晚十点多,偶然的机会下载了<简书>,本人对他并不了解,只是听家妹说过,也有简单的介绍。 ...
    莲莲俊阅读 177评论 0 0