我试图在tomcat上运行对称DS战争。以下是我遵循的步骤:
当我的客户端节点尝试向主节点注册时,它会提供以下内容 错误如下所示:
[SGW-000] - DataLoaderService - 请求当前配置{symmetricVersion = 3.8.28,configVersion = null} [SGW-000] - PullService - 无法与节点通信' null:null:?'在http://10.97.57.75:31415/symmetric-ds/sync因为意外错误 java.io.IOException:服务器返回HTTP响应代码:403为URL:http://10.97.57.75:31415/symmetric-ds/sync/config?nodeId=000&securityToken=07a654896b216bfd6acb9746470f73&hostName=mc-ha-vm1.edcharman.com&ipAddress=10.97.57.74&symmetricVersion=3.8.28&configVersion= at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 在sun.net.www.protocol.http.HttpURLConnection $ 10.run(HttpURLConnection.java:1926) 在sun.net.www.protocol.http.HttpURLConnection $ 10.run(HttpURLConnection.java:1921) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1920) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1490) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) at org.jumpmind.symmetric.transport.http.HttpTransportManager.getInputStreamFrom(HttpTransportManager.java:301) 在org.jumpmind.symmetric.transport.http.HttpIncomingTransport.openStream(HttpIncomingTransport.java:118) 在org.jumpmind.symmetric.transport.http.HttpIncomingTransport.openReader(HttpIncomingTransport.java:125) at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromTransport(DataLoaderService.java:554) at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromConfig(DataLoaderService.java:487) 在org.jumpmind.symmetric.service.impl.PullService.pullConfigData(PullService.java:170) at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:623) at org.jumpmind.symmetric.AbstractSymmetricEngine.start(AbstractSymmetricEngine.java:571) 在org.jumpmind.symmetric.ClientSymmetricEngine.start(ClientSymmetricEngine.java:244) 在org.jumpmind.symmetric.web.SymmetricEngineHolder $ EngineStarter.run(SymmetricEngineHolder.java:524) 引起:java.io.IOException:服务器返回HTTP响应代码:403 for at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) 在java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) 在org.jumpmind.symmetric.transport.http.HttpIncomingTransport.openConnectionCheckRedirects(HttpIncomingTransport.java:159) 在org.jumpmind.symmetric.transport.http.HttpIncomingTransport.openStream(HttpIncomingTransport.java:99) ......还有8个
有人可以帮忙吗?
答案 0 :(得分:0)
我认为使用Tomcat运行对称DS对于新来者来说有点棘手。所以我分享了对我有用的步骤:
主节点上的同步网址: sync.url = https://masterNodeIP:31415/warName/sync
在客户端节点上注册url: sync.url = https://masterNodeIP:31415/warName/sync
转到symmetric-ds-3.x.x-server / bin文件夹并创建symmetric-ds.war: ./symadmin create-war /战争之路/ symmetric-ds.war
将war复制到/ tomcat / webeapps文件夹。
将〜/ symmetric-server-3.8.28 / lib中的postgresql-9.4-1212.jre7.jar文件复制到 〜/ apache-tomcat-8.0.24 / webapps / symmetric-ds / WEB-INF / lib文件夹
在/tomcat.x.x/conf/server.xml中执行以下端口配置
在主节点上执行以下命令以打开注册: 主节点ID:ABC-000 客户端节点组:XYZ Clinet节点外部id:001 ../bin/symadmin --engine ABC-000 open-registration XYZ 001