Version 1.4.2 start upSpecify the configuration file location /root/seata-config/registry.conf via the environment variable SEATA_CONFIG_NAME docker run --name seata-server \ -p 8091:8091 \ -e SEATA_CONFIG_NAME=file:/root/seata-config/registry \ -v /User/seata/config:/root/seata-config \ seataio/seata-server Configuration Files Achieving high availability requires relying on the registration center, configuration center, and database registry { type = "nacos" nacos application = "seata-server" serverAddr = "192.168.199.2" namespace = "test" group = "SEATA_GROUP" cluster = "default" username = "" password = "" } } config { type = "nacos" nacos serverAddr = "192.168.199.2" namespace = "test" group = "SEATA_GROUP" username = "" password = "" } } NACOS ConfigurationNote: When using nacos configuration, you need to configure text values for each configuration item under the corresponding group (SEATA_GROUP) instead of creating a properties file containing all configurations. You can use the script in the official source code to import all available configuration references 1. Using a database store.mode=db Create a databaseDatabase creation script -- -------------------------------- The script used when storeMode is 'db' -------------------------------- -- the table to store GlobalSession data CREATE TABLE IF NOT EXISTS `global_table` ( `xid` VARCHAR(128) NOT NULL, `transaction_id` BIGINT, `status` TINYINT NOT NULL, `application_id` VARCHAR(32), `transaction_service_group` VARCHAR(32), `transaction_name` VARCHAR(128), `timeout` INT, `begin_time` BIGINT, `application_data` VARCHAR(2000), `gmt_create` DATETIME, `gmt_modified` DATETIME, PRIMARY KEY (`xid`), KEY `idx_gmt_modified_status` (`gmt_modified`, `status`), KEY `idx_transaction_id` (`transaction_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; -- the table to store BranchSession data CREATE TABLE IF NOT EXISTS `branch_table` ( `branch_id` BIGINT NOT NULL, `xid` VARCHAR(128) NOT NULL, `transaction_id` BIGINT, `resource_group_id` VARCHAR(32), `resource_id` VARCHAR(256), `branch_type` VARCHAR(8), `status` TINYINT, `client_id` VARCHAR(64), `application_data` VARCHAR(2000), `gmt_create` DATETIME(6), `gmt_modified` DATETIME(6), PRIMARY KEY (`branch_id`), KEY `idx_xid` (`xid`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; -- the table to store lock data CREATE TABLE IF NOT EXISTS `lock_table` ( `row_key` VARCHAR(128) NOT NULL, `xid` VARCHAR(128), `transaction_id` BIGINT, `branch_id` BIGINT NOT NULL, `resource_id` VARCHAR(256), `table_name` VARCHAR(32), `pk` VARCHAR(36), `gmt_create` DATETIME, `gmt_modified` DATETIME, PRIMARY KEY (`row_key`), KEY `idx_branch_id` (`branch_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8; Exception handling1. The client reports an error: Data too long for column 'application_id'
The default length of the global_table.application_id field in the seata database is varchar(32). If the client application ID is too long, this error will be reported. You can manually modify the field type to increase the length. This is the end of this article about seata docker high availability deployment. For more relevant seata docker deployment content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to change fixed positioning of child elements to absolute positioning by CSS3 transform
>>: Basic knowledge: What does http mean before a website address?
Preface: The installation process will not be des...
Table of contents Preface Introduction to Dockerf...
Preface: For the implementation of digital additi...
I have written an example before, a simple UDP se...
In the development process of Vue project, for th...
Introduction to sudo authority delegation su swit...
For security reasons, Alibaba Cloud Server ECS co...
Table of contents 1. Array deduplication 2. Dedup...
When making forms, we often encounter the situati...
"Development is more than just writing code&q...
Simple XHTML web form in web design 5. Technique ...
Linux File System Common hard disks are shown in ...
1. Download Dependency npm install @antv/data-set...
Table of contents 1. Pull the image 2. Create a l...
Table of contents 1. Optional Chaining 2. Null va...