mycat配置完成后启动报错:
STATUS | wrapper | 2016/01/07 22:44:23 | --> Wrapper Started as Daemon
STATUS | wrapper | 2016/01/07 22:44:23 | Launching a JVM...
ERROR | wrapper | 2016/01/07 22:44:25 | JVM exited while loading the application.
INFO | jvm 1 | 2016/01/07 22:44:25 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: MySQL-Server1: MySQL-Server1: Name or service not known
STATUS | wrapper | 2016/01/07 22:44:29 | Launching a JVM...
ERROR | wrapper | 2016/01/07 22:44:29 | JVM exited while loading the application.
INFO | jvm 2 | 2016/01/07 22:44:29 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: MySQL-Server1: MySQL-Server1: Name or service not known
STATUS | wrapper | 2016/01/07 22:44:34 | Launching a JVM...
ERROR | wrapper | 2016/01/07 22:44:34 | JVM exited while loading the application.
INFO | jvm 3 | 2016/01/07 22:44:34 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: MySQL-Server1: MySQL-Server1: Name or service not known
STATUS | wrapper | 2016/01/07 22:44:38 | Launching a JVM...
ERROR | wrapper | 2016/01/07 22:44:38 | JVM exited while loading the application.
INFO | jvm 4 | 2016/01/07 22:44:38 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: MySQL-Server1: MySQL-Server1: Name or service not known
STATUS | wrapper | 2016/01/07 22:44:42 | Launching a JVM...
ERROR | wrapper | 2016/01/07 22:44:43 | JVM exited while loading the application.
INFO | jvm 5 | 2016/01/07 22:44:43 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: MySQL-Server1: MySQL-Server1: Name or service not known
FATAL | wrapper | 2016/01/07 22:44:43 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up.
FATAL | wrapper | 2016/01/07 22:44:43 | There may be a configuration problem: please check the logs.
STATUS | wrapper | 2016/01/07 22:44:43 | <-- Wrapper Stopped
根据报错信息,怀疑主机名没有绑定
修改hosts文件,绑定主机名
# vim /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.163.144 server1
重新启动mycat服务
# ./mycat start
查看启动日志
# ./mycat console
Running Mycat-server...
Mycat-server is already running.
mycat正常启动