Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

获取路由配置格式不对,解析异常 #2357

Open
lizhi1314 opened this issue Jan 3, 2025 · 0 comments
Open

获取路由配置格式不对,解析异常 #2357

lizhi1314 opened this issue Jan 3, 2025 · 0 comments

Comments

@lizhi1314
Copy link

Describe the bug
从git拉的最新版本打的包,cat-client版本为3.1.0,部署启动正常,能正常打开后台,但是客户端日志有异常,显示从服务端获取的数据无法解析。

[01-03 16:47:31.538] [ERROR] [TcpSocketSender] error when connect cat server config url http://127.0.0.1:8080/cat/s/router?domain=lab&ip=192.168.0.106&op=xml&env=unknown&hostname=MacBook-Pro.local
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; 前言中不允许有内容。
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:204)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:178)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:400)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1467)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1009)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:507)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:867)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:796)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:142)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:644)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:328)
at com.dianping.cat.configuration.property.transform.DefaultSaxParser.parseEntity(DefaultSaxParser.java:58)
at com.dianping.cat.configuration.property.transform.DefaultSaxParser.parse(DefaultSaxParser.java:29)
at com.dianping.cat.configuration.property.transform.DefaultSaxParser.parse(DefaultSaxParser.java:41)
at com.dianping.cat.configuration.DefaultClientConfigService.refreshConfig(DefaultClientConfigService.java:220)
at com.dianping.cat.configuration.DefaultClientConfigService.refreshConfig(DefaultClientConfigService.java:186)
at com.dianping.cat.configuration.DefaultClientConfigService.getRouters(DefaultClientConfigService.java:124)
at com.dianping.cat.message.io.ChannelManager.routerConfigChanged(ChannelManager.java:354)
at com.dianping.cat.message.io.ChannelManager.checkServerChanged(ChannelManager.java:143)
at com.dianping.cat.message.io.ChannelManager.run(ChannelManager.java:372)
at java.lang.Thread.run(Thread.java:750)

直接访问接口访问:172.27.232.42:2280;

很明显返回的不是xml格式,解析肯定抛异常,但是这是最新的代码,有bug的代码也提交上来?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant