[Solved] Mongo Error: cant post the change to mongodb there is transaction error

Mongo database
Edit, add data error:
can post the change to mongodb there is transaction error

submit transaction error:

add set error in query:

prompt: not master

Reason:
the slave node used in Mongo master-slave only has read permission by default, and the slave node connected by itself
solution:
setting in Mongo allows the slave node to be writable, or directly connects to the IP address of the master node

Read More: