tomcat部署完成cat后,启动tomcat会有告警提示,加载数据源文件目录并不是默认的/data/appdatas/cat目录。代码是直接拉取的master分支进行打包的
[2023-05-10 16:54:06.041] [INFO] CAT home: /root/.cat
[2023-05-10 16:54:06.042] [INFO] User dir: /usr/local/apache-tomcat-8.5.88/bin
[2023-05-10 16:54:06.048] [INFO] Thread group(Cat) created.
[2023-05-10 16:54:06.049] [INFO] CAT client configuration: domain: cat, host: 192.168.0.196(ecs-2084), servers
[2023-05-10 16:54:06.049] [INFO] Starting thread(Cat-ConfigureRefresher) ...
[05-10 16:54:06.057] [WARN] [DefaultDataSourceProvider] Data sources configuration(/root/.cat/datasources.xml) is not found!
log4j:WARN No appenders could be found for logger (com.dianping.cat.netty.util.internal.logging.InternalLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
[05-10 16:54:06.144] [ERROR] [ServerConfigManager] Error when executing query(SELECT c.id,c. name
,c.content,c.creation_date,c.modify_date FROM config c WHERE c.name = ?) failed, proto: Config[content: null, creation-date: null, id: 0, key-id: 0, modify-date: null, name: server-config], message: java.lang.RuntimeException: No data source(cat) defined!.
2条答案
按热度按时间noj0wjuj1#
朋友,你应该是采用了 4.0-RC1 版本,也就是master分支。根据作者发布的 https://github.com/dianping/cat/releases 文档和代码来说,更改了默认的加载路径。
ltskdhd12#
加环境变量CAT_HOME=/data/appdatas/cat