publish data error

+2 votes

Hi 

Now we have 4 nodes A,B,C,D and two streams. And we have created a java project to publish items to stream through JSON. Previously we can publish items to stream no problem and there is already more than two million items. But we often encountered with publishing error recently. Please find following error message.

Error while doing transaction with the blockchain. Code: -26.0 Message: Error: this transaction was rejected. This may be because you are sharing private keys between nodes, and another node has spent the funds used by this transaction.

 

asked Aug 20, 2019 by ZRZ

1 Answer

0 votes
Are you publishing simultaneously from two nodes using the same address?

Is there something else about this transaction that might be a problem, e.g. the size of the JSON?
answered Aug 20, 2019 by MultiChain
Currently we just publish data through one node. And the JSON size is not large.
Is there any other possibility? Thanks
We had another report like this, so please clarify which version of MultiChain you are using, and which API to publish the data.
We are using the MultiChain 1.0.4 now and publishing items through "publish" method. Publish one item for per transaction
It seems the other report was not relevant. Please upgrade your node to 1.0.8 and then let me know if the problem still persists, and we'll send further suggestions on how to generate log information to help debug it.
Hi I just found that we used load balancing strategy on our current chain. Is that might be a problem? According to "Clustering nodes for high availability" article,  we can use failover rather than load balancing. And if we use failover, in which one transactions are only sent from one node, if one node down, try to send from another node. Is this process auto run by multichain or we need to handle it on our java project? And is there other suggestions? For example keep load balancing but need to share private key between nodes.

Thanks for help
First, you can use the dumpprivkey / importprivkey to share private keys between nodes.

Second, the failover process should be managed by your own application, but it can be quite simple - if one node stops responding, wait a few seconds, and then switch to another.
...