zoukankan      html  css  js  c++  java
  • mycat启动失败

    1.问题

    使用mycat配置主从读写分离,启动mycat报错信息如下:

    STATUS | wrapper  | 2020/06/17 17:00:11 | --> Wrapper Started as Daemon
    STATUS | wrapper  | 2020/06/17 17:00:11 | Launching a JVM...
    ERROR  | wrapper  | 2020/06/17 17:00:11 | JVM exited while loading the application.
    INFO   | jvm 1    | 2020/06/17 17:00:11 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: mysql01: mysql01: Name or service not known
    STATUS | wrapper  | 2020/06/17 17:00:15 | Launching a JVM...
    INFO   | jvm 2    | 2020/06/17 17:00:16 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: mysql01: mysql01: Name or service not known
    ERROR  | wrapper  | 2020/06/17 17:00:16 | JVM exited while loading the application.
    STATUS | wrapper  | 2020/06/17 17:00:20 | Launching a JVM...
    ERROR  | wrapper  | 2020/06/17 17:00:20 | JVM exited while loading the application.
    INFO   | jvm 3    | 2020/06/17 17:00:20 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: mysql01: mysql01: Name or service not known
    STATUS | wrapper  | 2020/06/17 17:00:25 | Launching a JVM...
    ERROR  | wrapper  | 2020/06/17 17:00:25 | JVM exited while loading the application.
    INFO   | jvm 4    | 2020/06/17 17:00:25 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: mysql01: mysql01: Name or service not known
    STATUS | wrapper  | 2020/06/17 17:00:29 | Launching a JVM...
    ERROR  | wrapper  | 2020/06/17 17:00:30 | JVM exited while loading the application.
    INFO   | jvm 5    | 2020/06/17 17:00:30 | Error: Exception thrown by the agent : java.net.MalformedURLException: Local host name unknown: java.net.UnknownHostException: mysql01: mysql01: Name or service not known
    FATAL  | wrapper  | 2020/06/17 17:00:30 | There were 5 failed launches in a row, each lasting less than 300 seconds.  Giving up.
    FATAL  | wrapper  | 2020/06/17 17:00:30 |   There may be a configuration problem: please check the logs.
    STATUS | wrapper  | 2020/06/17 17:00:30 | <-- Wrapper Stopped

    2.问题解决

    原因:无法解析主机名

    解决方法:

    修改hosts文件

    [mysql@mysql01 ~]$ cat /etc/hosts
    127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
    ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
    192.168.12.60 mysql01

    再次启动mycat,状态正常。

    [mysql@mysql01 ~]$ mycat status
    Mycat-server is running (37136).
  • 相关阅读:
    网站结构之扁平结构与树形结构的区分
    如何提高网站的访问速度
    CSS透明度大汇总
    Microsoft.AlphaImageLoader滤镜讲解
    浏览器的渲染原理简介
    ACM思维题训练 Section A
    CF--思维练习--CodeForces
    CF--思维练习--CodeForces
    CF--思维练习--CodeForces
    CF思维联系--CodeForces
  • 原文地址:https://www.cnblogs.com/orcl-2018/p/13153865.html
Copyright © 2011-2022 走看看