异常
在Linux中执行./mycat consloe命令启动mycat报错如下:
[root@localhost bin]# ./mycat console
Running Mycat-server...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
jvm 1 | wrapper | Unable to start JVM: No such file or directory (2)
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
jvm 2 | wrapper | Unable to start JVM: No such file or directory (2)
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
jvm 3 | wrapper | Unable to start JVM: No such file or directory (2)
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
jvm 4 | wrapper | Unable to start JVM: No such file or directory (2)
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
jvm 5 | wrapper | Unable to start JVM: No such file or directory (2)
wrapper | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
wrapper | There may be a configuration problem: please check the logs.
wrapper | <-- Wrapper Stopped
原因
没有配置JVM。
解决
先看系统中是否安装JDK,如果没有安装请先安装JDK,安装教程请参考:在Linux中安装JDK8
在/bin/wrapper.conf文件中添加如下内容,如果没有该文件,则创建该文件:
wrapper.java.command=java的安装目录/bin/java
本例中如下:
再执行./mycat console命令就会启动mycat成功