MySQL数据库--读写分离时的BUG

x33g5p2x  于2021-11-02 转载在 Mysql  
字(2.7k)|赞(0)|评价(0)|浏览(205)

问题:在amoeba服务器配置amoeba服务时,netstat -anpt | grep java没有反应,端口没有开启

[root@localhost conf]# /usr/local/amoeba/bin/amoeba start&
[4] 33191
[root@localhost conf]# log4j:WARN log4j config load completed from file:/usr/local/amoeba/conf/log4j.xml
2021-03-09 11:19:47,145 INFO  context.MysqlRuntimeContext - Amoeba for Mysql current versoin=5.1.45-mysql-amoeba-proxy-2.2.0
Exception in thread "main" com.meidusa.amoeba.config.ConfigurationException: Initialisation bean=com.meidusa.amoeba.mysql.parser.MysqlQueryRouter@16290fbc error
    with nested exception 
com.meidusa.amoeba.util.InitialisationException: cannot found Pool=mater
	at com.meidusa.amoeba.context.ProxyRuntimeContext.initAllInitialisableBeans(ProxyRuntimeContext.java:336)
	at com.meidusa.amoeba.context.ProxyRuntimeContext.init(ProxyRuntimeContext.java:291)
	at com.meidusa.amoeba.server.AmoebaProxyServer.main(AmoebaProxyServer.java:161)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:461)
with nested exception com.meidusa.amoeba.util.InitialisationException: cannot found Pool=mater
com.meidusa.amoeba.util.InitialisationException: cannot found Pool=mater
	at com.meidusa.amoeba.route.AbstractQueryRouter.init(AbstractQueryRouter.java:483)
	at com.meidusa.amoeba.context.ProxyRuntimeContext.initAllInitialisableBeans(ProxyRuntimeContext.java:331)
	at com.meidusa.amoeba.context.ProxyRuntimeContext.init(ProxyRuntimeContext.java:291)
	at com.meidusa.amoeba.server.AmoebaProxyServer.main(AmoebaProxyServer.java:161)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:344)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:461)

[root@localhost conf]# netstat -anpt | grep java
[root@localhost conf]# netstat -anpt | grep 8066

分析原因

第一时间,我先想到了是不是我在前面的配置文件中的内容配错了,所以,我首先查看了amoeba服务器的两个配置文件
*
amoeba.xml 、 dbServers.xml

解决问题

查看修改配置文件,配置文件的具体内容可以看我之前的‘搭建 MySQL’ 读写分离的amoeba服务器配置amoeba服务(192.168.126.12)部分

vim amoeba.xml	

vim dbServers.xml

结果真的是配置文件错了,vim dbServers.xml 的配置文件里120行的后半个注释没有去除干净 还留了一部分,删掉之后就好了

总结

所以,兄弟们 在配置服务文件时一定要细心,仔细的检查一下,不然就会很费时间和精力的,实在检查不出来就重新做,这样来的还比较快一点

相关文章

微信公众号

最新文章

更多