View Issue Details

IDProjectCategoryView StatusLast Update
0003683SymmetricDSBugpublic2019-04-12 08:49
ReporterondraAssigned To 
Prioritynormal 
Status closedResolutionno change required 
Product Version3.9.11 
Target VersionFixed in Version 
Summary0003683: initial.load.create.first=true can crash the application
Descriptioninitial.load.create.first=true brings the app down if the corp and store engine are deployed for the first time in one server
Steps To ReproduceI followed the steps tu run demo from the tutorial at https://www.symmetricds.org/doc/3.9/html/tutorials.html . I used the corp and store-001 configuration files. The only thing I changed was adding the auto.reload=true parameter in the corp-000.properties file and logically skipped the step of creating DB tables for the store instance. After starting the server I got these errors:

[store-001] - ManageIncomingBatchListener - Failed to load batch 000-7
org.jumpmind.db.sql.SqlException: Could not find the target table 'item_selling_price'
       at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:251)
       at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
       at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:84)
       at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
       at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:207)
       at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:210)
       at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:177)
       at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:123)
       at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1036)
       at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1013)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)

[store-001] - PullService - Could not communicate with node 'corp:000:000' at http://localhost:8080/sync/corp-000 because of unexpected error
java.io.IOException: Ack was not sent successfully. statusCode=403
       at org.jumpmind.symmetric.service.impl.AbstractService.sendAck(AbstractService.java:284)
       at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromPull(DataLoaderService.java:316)
       at org.jumpmind.symmetric.service.impl.PullService.execute(PullService.java:142)
       at org.jumpmind.symmetric.service.impl.NodeCommunicationService$1.run(NodeCommunicationService.java:519)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at java.lang.Thread.run(Thread.java:748)

[store-001] - PullService - Could not communicate with node 'corp:000:000' at http://localhost:8080/sync/corp-000 because of unexpected error
java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/sync/corp-000/pull?nodeId=001&securityToken=uCVpsYU2GZ6WwiVrJ4oyfLiArSyUDZ&hostName=HOME&ipAddress=192.168.0.104
        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:1944)
        at sun.net.www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        at org.jumpmind.symmetric.transport.http.HttpTransportManager.getInputStreamFrom(HttpTransportManager.java:308)
        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:569)
        at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromPull(DataLoaderService.java:296)
        at org.jumpmind.symmetric.service.impl.PullService.execute(PullService.java:142)
        at org.jumpmind.symmetric.service.impl.NodeCommunicationService$1.run(NodeCommunicationService.java:519)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/sync/corp-000/pull?nodeId=001&securityToken=uCVpsYU2GZ6WwiVrJ4oyfLiArSyUDZ&hostName=HOME&ipAddress=192.168.0.104
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
        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

                               
Additional InformationOS: Windows 10
JVM: jdk1.8.0_181
DB: Postgres 10.1
TagsNo tags attached.

Relationships

related to 0003679 closedchenson Registration sometimes throws java.lang.InterruptedException 

Activities

ondra

2018-08-21 08:32

reporter   ~0001224

The parameter initial.load.create.first doesn't seem to affect the behaviour. The same problem occurred with initial.load.create.first=false and with pre-created DB tables for the store instance. Probably the auto.reload=true makes the problem.

elong

2018-08-21 08:43

developer   ~0001225

Did you follow section 1.1.3 to verify it created the tables? It sounds like the item_selling_price table did not get created on store-001. Check to see if it's a case sensitive issue. Follow 1.1.3

bin/dbsql --engine store-001
select * from "item_selling_price";
select * from "ITEM_SELLING_PRICE";

ondra

2018-08-21 10:17

reporter   ~0001226

sql> select * from "item_selling_price";
Error: org.postgresql.util.PSQLException: ERROR: relation "item_selling_price" does not exist
  Position: 15
sql> select * from "ITEM_SELLING_PRICE";
Error: org.postgresql.util.PSQLException: ERROR: relation "ITEM_SELLING_PRICE" does not exist
  Position: 15

I am attaching the symmetric directory with my configuration. It only contains the engines directory and the samples directory with .bat files I am using to initialize the instance.

symmetric-server-3.9.12.zip (171,863 bytes)

ondra

2018-08-21 10:27

reporter   ~0001227

I think I see the problem. I deleted the tmp directory and now it works.

hanes

2018-09-13 14:29

developer   ~0001237

The 403 error being seen in the log is likely fixed via the fix for issue 3679.

Issue History

Date Modified Username Field Change
2018-08-21 07:51 ondra New Issue
2018-08-21 07:51 ondra Tag Attached: postgres
2018-08-21 08:32 ondra Note Added: 0001224
2018-08-21 08:43 elong Note Added: 0001225
2018-08-21 10:17 ondra File Added: symmetric-server-3.9.12.zip
2018-08-21 10:17 ondra Note Added: 0001226
2018-08-21 10:27 ondra Note Added: 0001227
2018-09-13 14:28 hanes Relationship added related to 0003679
2018-09-13 14:29 hanes Status new => closed
2018-09-13 14:29 hanes Resolution open => no change required
2018-09-13 14:29 hanes Note Added: 0001237
2019-04-12 08:49 admin Tag Detached: postgres