gpt4 book ai didi

java - SymmetricDS MalformedURLException

转载 作者:太空宇宙 更新时间:2023-11-04 14:21:29 28 4
gpt4 key购买 nike

我正在配置 SymmetricDS 3.6.12 的两个实例。服务器实例在 Glassfish 3 服务器中工作,使用 8181 端口作为 https。客户端实例作为服务运行(在 jetty 中),https 端口为 31417。这两个实例已配置并正在运行。客户端的 sym_tables 已使用来自服务器的数据进行更新,但是我想要同步的表都不起作用。我在服务器中收到此错误:

2014-11-25 23:34:31,493 WARN [ERPServer] [FileSyncService] [erpserver-file_push-1] Could not communicate with node 'PDV:19742872000153:19742872000153' at https://fe80:0:0:0:0:5efe:c0a8:18f%net10:31417/sync/19742872000153 because of unexpected error
java.net.MalformedURLException: Stream handler unavailable due to: For input string: "0:0:0:0:5efe:c0a8:18f%net10:31417"
at java.net.URL.<init>(URL.java:619)
at java.net.URL.<init>(URL.java:482)
at java.net.URL.<init>(URL.java:431)
at org.jumpmind.symmetric.transport.http.HttpTransportManager.getFilePushTransport(HttpTransportManager.java:217)
at org.jumpmind.symmetric.service.impl.FileSyncService.pushFilesToNode(FileSyncService.java:606)
at org.jumpmind.symmetric.service.impl.FileSyncService.execute(FileSyncService.java:593)
at org.jumpmind.symmetric.service.impl.NodeCommunicationService$2.run(NodeCommunicationService.java:307)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.IllegalStateException: Stream handler unavailable due to: For input string: "0:0:0:0:5efe:c0a8:18f%net10:31417"
at org.apache.felix.framework.URLHandlersStreamHandlerProxy.parseURL(URLHandlersStreamHandlerProxy.java:431)
at java.net.URL.<init>(URL.java:614)
... 9 more

更多信息

服务器是这样配置的:

engine.name=ERPServer
group.id=ERP
external.id=19742872000153ERP
registration.url=
sync.url=https://$(ipAddress):8181/symmetric_ds/sync/$(engineName)

客户端是这样配置的:

engine.name=19742872000153
group.id=PDV
external.id=19742872000153
registration.url=https://192.168.1.150:8181/symmetric_ds/sync/ERPServer
sync.url=https://$(ipAddress):31417/sync/$(engineName)

我已检查客户端使用的 IPv6 (fe80:0:0:0:0:5efe:c0a8:18f%net10) 并验证它是否是有效的 IP。查看这部分错误消息:

java.net.MalformedURLException: Stream handler unavailable due to: For input string: "0:0:0:0:5efe:c0a8:18f%net10:31417"

我们可以看到该 url 没有 IP 的第一部分 (fe80),而是在 url 中显示了端口 (31417)。这是 SymmetricDS 的错误吗?我可以做些什么来解决这个问题吗?

最佳答案

注册网址是硬编码的:

registration.url=https://192.168.1.150:8181/symmetric_ds/sync/ERPServer

这就是客户端成功注册的原因。问题在于 ipAddress 变量替换。检查为什么在客户端将其替换为 fe80:0:0:0:0:5efe:c0a8:18f%net10 并将其修复。

关于java - SymmetricDS MalformedURLException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27138987/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com