报错信息
STATUS | wrapper | 2021/01/13 19:48:13 | --> Wrapper Started as Daemon
STATUS | wrapper | 2021/01/13 19:48:13 | Launching a JVM...
ERROR | wrapper | 2021/01/13 19:48:13 | JVM exited while loading the application.
INFO | jvm 1 | 2021/01/13 19:48:13 | OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
INFO | jvm 1 | 2021/01/13 19:48:13 | OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006c0000000, 716177408, 0) failed; error='Cannot allocate memory' (errno=12)
INFO | jvm 1 | 2021/01/13 19:48:13 | #
INFO | jvm 1 | 2021/01/13 19:48:13 | # There is insufficient memory for the Java Runtime Environment to continue.
INFO | jvm 1 | 2021/01/13 19:48:13 | # Native memory allocation (mmap) failed to map 716177408 bytes for committing reserved memory.
INFO | jvm 1 | 2021/01/13 19:48:13 | # An error report file with more information is saved as:
INFO | jvm 1 | 2021/01/13 19:48:13 | # /usr/local/tools/mycat/hs_err_pid21149.log
STATUS | wrapper | 2021/01/13 19:48:17 | Launching a JVM...
ERROR | wrapper | 2021/01/13 19:48:17 | JVM exited while loading the application.
INFO | jvm 2 | 2021/01/13 19:48:17 | OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
INFO | jvm 2 | 2021/01/13 19:48:17 | OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000006c0000000, 716177408, 0) failed; error='Cannot allocate memory' (errno=12)
INFO | jvm 2 | 2021/01/13 19:48:17 | #
INFO | jvm 2 | 2021/01/13 19:48:17 | # There is insufficient memory for the Java Runtime Environment to continue.
INFO | jvm 2 | 2021/01/13 19:48:17 | # Native memory allocation (mmap) failed to map 716177408 bytes for committing reserved memory.
INFO | jvm 2 | 2021/01/13 19:48:17 | # An error report file with more information is saved as:
INFO | jvm 2 | 2021/01/13 19:48:17 | # /usr/local/tools/mycat/hs_err_pid21155.log
STATUS | wrapper | 2021/01/13 19:48:21 | Launching a JVM...
ERROR | wrapper | 2021/01/13 19:48:21 | JVM exited while loading the application.
这个原因是可能是你的服务器配置较低,在未对mycat进行配置的时候,/conf/wrapper.conf 的配置文件
#默认配置
wrapper.java.additional.10=-Xmx4G
wrapper.java.additional.11=-Xms1G
#修改为
wrapper.java.additional.10=-Xmx640M
wrapper.java.additional.11=-Xms256M
修改之后重新运行
进入bin目录下:
[root@iZwz9afmkjj6loeq6vr628Z bin]# ./mycat restart
Stopping Mycat-server...
Mycat-server was not running.
Starting Mycat-server...
查看日志文件:
STATUS | wrapper | 2021/01/13 23:40:25 | Launching a JVM...
INFO | jvm 1 | 2021/01/13 23:40:25 | OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
INFO | jvm 1 | 2021/01/13 23:40:27 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
INFO | jvm 1 | 2021/01/13 23:40:27 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
INFO | jvm 1 | 2021/01/13 23:40:27 |
INFO | jvm 1 | 2021/01/13 23:40:28 | 2021-01-13 23:40:28,517 [INFO ][WrapperSimpleAppMain] total resouces of dataHost localhost1 is :2 (io.mycat.backend.datasource.PhysicalDBPool:PhysicalDBPool.java:100)
INFO | jvm 1 | 2021/01/13 23:40:28 | 2021-01-13 23:40:28,548 [INFO ][WrapperSimpleAppMain] create layer cache pool TableID2DataNodeCache of type encache ,default cache size 10000 ,default expire seconds18000 (io.mycat.cache.CacheService:CacheService.java:125)
INFO | jvm 1 | 2021/01/13 23:40:28 | 2021-01-13 23:40:28,550