我正在配置两个SymmetricDS 3.6.12实例。该服务器实例在Glassfish 3服务器中运行,使用8181端口作为https。客户端实例通过31417中的https端口作为服务(在码头中)运行。这两个实例已配置并正在运行。客户端上的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
并进行了修复。