Mycat大型项目使用案例

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

1Mycat+percona+keepalived+haproxy作者:zuoyuezong@163.com为什么Mycat难相信很多哥们做mycat不是不全就是这出错那里出错最后崩溃的边缘晃荡几分钟后不了了之,要么公司的mycat是个这里提供一个例子至于mycat的介绍就是:,java[root@node24src]#tar-xfMycat-server-1.4-RELEASE-20150901112004-linux.tar.gz[root@node24src]#mvmycat//usr/local/[root@node24src]#useraddmycat[root@node24local]#chownmycat:rootmycat/-R2[root@node24src]#rpm-ivhjre-8u51-linux-x64.rpmPreparing...###########################################[100%]1:jre1.8.0_51###########################################[100%]UnpackingJARfiles...rt.jar...jsse.jar...charsets.jar...localedata.jar...jfxrt.jar...plugin.jar...javaws.jar...Deploy.jar...[root@node24src]#java-versionjavaversion1.8.0_51Java(TM)SERuntimeEnvironment(build1.8.0_51-b16)JavaHotSpot(TM)64-BitServerVM(build25.51-b03,mixedmode)此处注意java版本不得低于1.6至此Mycat安装就算完成了32.mysql环境以及Mycat配置我的环境如下10.1.166.22:mysqldn110.1.166.23mysqldn210.1.166.24mysqldn310.1.166.25mysqldn410.1.166.26mysqldn5配置hosts文件[root@node22src]#cat/etc/hosts127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.localdomain4::1localhostlocalhost.localdomainlocalhost6localhost6.localdomain610.1.166.22node2210.1.166.22dn110.1.166.23dn210.1.166.24dn310.1.166.25dn410.1.166.26dn54传到各个机器foriin10.1.166.2210.1.166.2310.1.166.2410.1.166.2510.1.166.26;doscp/etc/hosts$i:/etc;done为你的mycat用户设置个密码[root@node24src]#passwdmycatChangingpasswordforusermycat.Newpassword:BADPASSWORD:itisWAYtooshortBADPASSWORD:istoosimpleRetypenewpassword:passwd:allauthenticationtokensupdatedsuccessfully.原始mycat测试配置[root@node24conf]#../logs/wrapper.log[root@node24conf]#[root@node24conf]#pwd/usr/local/mycat/conf[root@node24conf]#../bin/mycatstartStartingMycat-server...5报错处理方案[root@node24conf]#cat../logs/wrapper.logSTATUS|wrapper|2015/09/1801:27:36|--WrapperStartedasDaemonSTATUS|wrapper|2015/09/1801:27:36|LaunchingaJVM...INFO|jvm1|2015/09/1801:27:36|JavaHotSpot(TM)64-BitServerVMwarning:ignoringoptionMaxPermSize=64M;supportwasremovedin8.0ERROR|wrapper|2015/09/1801:27:36|JVMexitedwhileloadingtheapplication.INFO|jvm1|2015/09/1801:27:36|Error:Exceptionthrownbytheagent:java.net.MalformedURLException:Localhostnameunknown:java.net.UnknownHostException:node24:node24:unknownerrorSTATUS|wrapper|2015/09/1801:27:41|LaunchingaJVM...INFO|jvm2|2015/09/1801:27:41|JavaHotSpot(TM)64-BitServerVMwarning:ignoringoptionMaxPermSize=64M;supportwasremovedin8.0INFO|jvm2|2015/09/1801:27:41|Error:Exceptionthrownbytheagent:java.net.MalformedURLException:Localhostnameunknown:java.net.UnknownHostException:node24:node24:unknownerrorERROR|wrapper|2015/09/1801:27:41|JVMexitedwhileloadingtheapplication.STATUS|wrapper|2015/09/1801:27:45|LaunchingaJVM...INFO|jvm3|2015/09/1801:27:45|JavaHotSpot(TM)64-BitServerVMwarning:ignoringoptionMaxPermSize=64M;supportwasremovedin8.0ERROR|wrapper|2015/09/1801:27:45|JVMexitedwhileloadingtheapplication.INFO|jvm3|2015/09/1801:27:45|Error:Exceptionthrownbytheagent:java.net.MalformedURLException:Localhostnameunknown:java.net.UnknownHostException:node24:node24:unknownerrorSTATUS|wrapper|2015/09/1801:27:50|LaunchingaJVM...INFO|jvm4|2015/09/1801:27:50|JavaHotSpot(TM)64-BitServerVMwarning:ignoringoptionMaxPermSize=64M;supportwasremovedin8.0INFO|jvm4|2015/09/1801:27:50|Error:Exceptionthrownbytheagent:java.net.MalformedURLException:Localhostnameunknown:java.net.UnknownHostException:node24:node24:unknownerrorERROR|wrapper|2015/09/1801:27:50|JVMexitedwhileloadingtheapplication.STATUS|wrapper|2015/09/1801:27:54|LaunchingaJVM...6INFO|jvm5|2015/09/1801:27:54|JavaHotSpot(TM)64-BitServerVMwarning:ignoringoptionMaxPermSize=64M;supportwasremovedin8.0ERROR|wrapper|2015/09/1801:27:54|JVMexitedwhileloadingtheapplication.INFO|jvm5|2015/09/1801:27:54|Error:Exceptionthrownbytheagent:java.net.MalformedURLException:Localhostnameunknown:java.net.UnknownHostException:node24:node24:unknownerrorFATAL|wrapper|2015/09/1801:27:54|Therewere5failedlaunchesinarow,eachlastinglessthan300seconds.Givingup.FATAL|wrapper|2015/09/1801:27:54|Theremaybeaconfigurationproblem:pleasecheckthelogs.STATUS|wrapper|2015/09/1801:27:55|--WrapperStopped发现有报错所以要先启动一下原始的连原始的都报错那还配置没有意义ERROR|wrapper|2015/09/1801:27:36|JVMexitedwhileloadingtheapplication.INFO|jvm1|2015/09/1801:27:36|Error:Exceptionthrownbytheagent:java.net.MalformedURLException:Localhostnameunknown:java.net.UnknownHostException:node24:node24:unknownerror看到了是域名的报错可能是刚刚我修改hosts文件的时候没有写本机名[root@node24conf]#cat/etc/hosts127.0.0.1localhostlocalhost1localhost.localdomainlocalhost4localhost4.localdomain4::1localhostlocalhost.localdomainlocalhost6localhost6.localdomain610.1.166.22node2210.1.166.22dn110.1.166.23dn210.1.166.24dn310.1.166.25dn410.1.166.26dn5[root@node24conf]#hostnamenode24[root@node24conf]#cat/etc/sysconfig/network7NETWORKING=yesHOSTNAME=node24所以需要改变的是Hosts文件中需要定义node24改为[root@node24conf]#cat/etc/hosts127.0.0.1nod

1 / 58
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功