I am trying to run symmetric DS war on tomcat. Below ar the steps I followed :
- I have created war using this command: command: ../bin/symadmin create-war /root/symmetric-ds.war
- Then I deployed war on the tomcat.
When my client node tries to register with master node it gives following error as shown below:
[SGW-000] - DataLoaderService - Requesting current configuration {symmetricVersion=3.8.28, configVersion=null} [SGW-000] - PullService - Could not communicate with node 'null:null:?' at http://10.97.57.75:31415/symmetric-ds/sync because of unexpected error java.io.IOException: Server returned HTTP response code: 403 for 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) at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1926) at 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) at org.jumpmind.symmetric.transport.http.HttpIncomingTransport.openStream(HttpIncomingTransport.java:118) at 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) at 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) at org.jumpmind.symmetric.ClientSymmetricEngine.start(ClientSymmetricEngine.java:244) at org.jumpmind.symmetric.web.SymmetricEngineHolder$EngineStarter.run(SymmetricEngineHolder.java:524) Caused by: java.io.IOException: Server returned HTTP response code: 403 for at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480) at org.jumpmind.symmetric.transport.http.HttpIncomingTransport.openConnectionCheckRedirects(HttpIncomingTransport.java:159) at org.jumpmind.symmetric.transport.http.HttpIncomingTransport.openStream(HttpIncomingTransport.java:99) ... 8 more
Can anyone please help here ?
I think running symmetric DS with Tomcat is little bit tricky for new comers. So I sharing steps that worked for me:
sync url on master node: sync.url=https://masterNodeIP:31415/warName/sync
register url on client node: sync.url=https://masterNodeIP:31415/warName/sync
Go to symmetric-ds-3.x.x-server/bin folder and create symmetric-ds.war: ./symadmin create-war /Path of war/symmetric-ds.war
Copy war to /tomcat/webeapps folder.
copy postgresql-9.4-1212.jre7.jar file from ~/symmetric-server-3.8.28/lib to ~/apache-tomcat-8.0.24/webapps/symmetric-ds/WEB-INF/lib folder
Do following port configuration in /tomcat.x.x/conf/server.xml
Execute below command on master node to open registration: master node id: ABC-000 client node group: XYZ Clinet node external id: 001 ../bin/symadmin --engine ABC-000 open-registration XYZ 001