Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java

一、MyCat安装版本


  • Linux版本:CentOS 6.7
  • Mycat-server-1.4-release-20151019230038-linux.tar.gz
  • Mycat-server-1.6-RELEASE-20161028204710-linux.tar.gz

最终选择版本:Mycat-server-1.6-RELEASE-20161028204710-linux.tar.gz

参考文档连接:

http://songwie.com/teachs?searthstr=Mycat&start=0&limit=100

https://github.com/MyCATApache/Mycat-Server/wiki/2.0-Mycat%E5%AE%89%E8%A3%85%E4%B8%8E%E4%BD%BF%E7%94%A8


二、安装MyCat

1、在目录:/usr/local/hadoop下直接解压即可:

tar -zxvf Mycat-server-1.6-RELEASE-20161028204710-linux.tar.gz

2、./mycat start 启动发生异常


3、./mycat restart 重启后仍然出现类似问题


4、vim wrapper.log 查询日志定位异常信息

root@TheOne logs]# vim wrapper.log

STATUS | wrapper  | 2018/07/15 06:20:27 | --> Wrapper Started as Daemon
STATUS | wrapper  | 2018/07/15 06:20:28 | Launching a JVM...
INFO   | jvm 1    | 2018/07/15 06:20:28 | Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
INFO   | jvm 1    | 2018/07/15 06:20:28 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: TheOne: TheOne: Name or service not known
ERROR  | wrapper  | 2018/07/15 06:20:28 | JVM exited while loading the application.
STATUS | wrapper  | 2018/07/15 06:20:32 | Launching a JVM...
INFO   | jvm 2    | 2018/07/15 06:20:32 | Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
ERROR  | wrapper  | 2018/07/15 06:20:32 | JVM exited while loading the application.
INFO   | jvm 2    | 2018/07/15 06:20:32 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: TheOne: TheOne: Name or service not known
STATUS | wrapper  | 2018/07/15 06:20:36 | Launching a JVM...
INFO   | jvm 3    | 2018/07/15 06:20:36 | Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
ERROR  | wrapper  | 2018/07/15 06:20:37 | JVM exited while loading the application.
INFO   | jvm 3    | 2018/07/15 06:20:37 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: TheOne: TheOne: Name or service not known
STATUS | wrapper  | 2018/07/15 06:20:41 | Launching a JVM...
INFO   | jvm 4    | 2018/07/15 06:20:41 | Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
ERROR  | wrapper  | 2018/07/15 06:20:41 | JVM exited while loading the application.
INFO   | jvm 4    | 2018/07/15 06:20:41 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: TheOne: TheOne: Name or service not known
STATUS | wrapper  | 2018/07/15 06:20:45 | Launching a JVM...
INFO   | jvm 5    | 2018/07/15 06:20:45 | Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=64M; support was removed in 8.0
ERROR  | wrapper  | 2018/07/15 06:20:45 | JVM exited while loading the application.
@ 

5、解决方案:

vim /etc/hosts 添加主机映射关系


./mycat restart 重启后仍然出现进程丢失的现象

6、重新安装后,启动状态正常


三、连接SQLyog(与连接MySQL类似)



附录:MyCat操作命令

./mycat start 启动

./mycat stop 停止

./mycat console 前台运行

./mycat install 添加到系统自动启动(暂未实现)

./mycat remove 取消随系统自动启动(暂未实现)

./mycat restart 重启服务

./mycat pause 暂停

./mycat status 查看启动状态

猜你喜欢

转载自blog.csdn.net/jinYwuM/article/details/81059036
今日推荐