You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@seata.apache.org by "98549844 (via GitHub)" <gi...@apache.org> on 2024/03/26 03:53:01 UTC

[I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

98549844 opened a new issue, #6444:
URL: https://github.com/apache/incubator-seata/issues/6444

   ![image](https://github.com/apache/incubator-seata/assets/26402108/15d9dde1-90e0-49cd-bac8-6162ec02c8f1)
   
   seata v2.0 application.yml配置文件内容, 请问哪里配置出错了 ?
   ![image](https://github.com/apache/incubator-seata/assets/26402108/f086faa5-77d6-4d1a-a3b3-2fc5f354734a)
   
   docker consul cluster 已经运行成功并可以服务发现
   ![image](https://github.com/apache/incubator-seata/assets/26402108/68c97d6f-a4b7-4c3f-b287-d3310dbbe252)
   ![image](https://github.com/apache/incubator-seata/assets/26402108/0da4f008-cac9-41e7-8042-d92bcbd56a9c)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "liuqiufeng (via GitHub)" <gi...@apache.org>.
liuqiufeng commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2020182972

   这个格式应该是JSON吧,我对consul不是很了解,选择配置对应的格式即可。
   
   consul作为注册中心,受application.yml中的registry配置控制。
   作为配置中心,则受config配置控制。
   
   This format should be JSON, I don't know much about consul, just choose to configure the corresponding format.
   
   As a registry, consul is controlled by the registry configuration in application.yml. As a configuration center, it is controlled by the config configuration.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "98549844 (via GitHub)" <gi...@apache.org>.
98549844 commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2020110694

   > > > If the configuration center is specified as consul, has a configuration named seata.properties been added on consul?
   > > > https://seata.apache.org/zh-cn/docs/user/configuration/consul#%E6%8F%90%E4%BA%A4-key-value-%E9%85%8D%E7%BD%AE%E8%87%B3-consul
   > > > https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt
   > > 
   > > 
   > > 好像我没有配置, 有没有更多资料参考??? 没太看得明白那两个link的要求
   > 
   > Use this script: https://github.com/apache/incubator-seata/blob/2.x/script/config-center/consul/consul-config.sh to upload the https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt and upload the contents of the configuration file (which can be adjusted as needed) to the console.
   
   seata是在docker里运行的一个container, 要把这段.sh copy到container里执行吗,  
   ![image](https://github.com/apache/incubator-seata/assets/26402108/c2c13837-9681-40f0-9c86-49ab720e1bbb)
   
   
   然后.txt upload去consul 容器内? 是在localhost:8500页面上传? 怎样上传, 如果通过docker cp 上传, 放在容器哪里 ?
   ![image](https://github.com/apache/incubator-seata/assets/26402108/f3d8fb1b-3311-426e-be77-44f1367db1c4)
   
   docker 运行的consul是一个集群, 每个consul容器, 都要上传一份?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "98549844 (via GitHub)" <gi...@apache.org>.
98549844 commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2019495979

   > ```yaml
   > config: 
   >   type: consul
   >   consul:
   >     server-addr: 172.21.0.2:8500
   >     acl-token:
   >     key: seata.properties
   > ```
   
   谢谢, 根据你的代码, 修改了application, 好像读到ip和端口了
   但它弹出
   java.lang.ExceptionInInitializerError: null
   Caused by: java.lang.NullPointerException: null
   ![image](https://github.com/apache/incubator-seata/assets/26402108/668ad930-d40c-4b6f-b6be-c715f96fe1bf)
   
   
   
   会不会是application.yml的宿进问题引起 ???
   [application.txt](https://github.com/apache/incubator-seata/files/14753588/application.txt)
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "98549844 (via GitHub)" <gi...@apache.org>.
98549844 commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2019399378

   > I've done some testing locally and was unable to reproduce the problem described in your issue. One possible reason is that your configuration file might not have been correctly mounted into the container.
   
   i think midified application.yml are copy into docker seata server, because i using orignal application.yml to config. when i modified and copy into seata container and re-run container. the seata container fail to start
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "liuqiufeng (via GitHub)" <gi...@apache.org>.
liuqiufeng commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2019467235

   `
   config: #配置
     # support: nacos, consul, apollo, zk, etcd3
     type: consul
     consul:
       server-addr: 127.0.0.1:8500
       acl-token:
       key: seata.properties
   `


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "liuqiufeng (via GitHub)" <gi...@apache.org>.
liuqiufeng commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2019514097

   If the configuration center is specified as consul, has a configuration named seata.properties been added on consul?
   
   https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "98549844 (via GitHub)" <gi...@apache.org>.
98549844 commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2020129859

   > > > If the configuration center is specified as consul, has a configuration named seata.properties been added on consul?
   > > > https://seata.apache.org/zh-cn/docs/user/configuration/consul#%E6%8F%90%E4%BA%A4-key-value-%E9%85%8D%E7%BD%AE%E8%87%B3-consul
   > > > https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt
   > > 
   > > 
   > > 好像我没有配置, 有没有更多资料参考??? 没太看得明白那两个link的要求
   > 
   > 意思就是需要将config.txt文件中的内容配置到consul上名为 seata.properties 的key下。官网提供的几种方式任选一种都可以。
   > 
   > It means that you need to configure the contents of the config.txt file under the key named seata.properties on the consul. You can do this in any of the ways provided on the official website.
   
   like this ? 选YMAL correct ?
   ![image](https://github.com/apache/incubator-seata/assets/26402108/79927f34-518a-49e7-a1d7-5aaa92725596)
   
   ![image](https://github.com/apache/incubator-seata/assets/26402108/cf20ce9a-e484-4914-b893-ca36c89bd55a)
   
   
   
   最后, 我在consul配了seata.properties, 然后保存, 
   删除seata容器, 再docker run一个新seata容器, 
   consul已经服务发现到seata容器了, 
   意思是, application.yml根本不用动它 ? 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "liuqiufeng (via GitHub)" <gi...@apache.org>.
liuqiufeng commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2020090638

   > > If the configuration center is specified as consul, has a configuration named seata.properties been added on consul?
   > > https://seata.apache.org/zh-cn/docs/user/configuration/consul#%E6%8F%90%E4%BA%A4-key-value-%E9%85%8D%E7%BD%AE%E8%87%B3-consul
   > > https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt
   > 
   > 好像我没有配置, 有没有更多资料参考??? 没太看得明白那两个link的要求
   
   使用此脚本https://github.com/apache/incubator-seata/blob/2.x/script/config-center/consul/consul-config.sh


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "98549844 (via GitHub)" <gi...@apache.org>.
98549844 commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2020061319

   > If the configuration center is specified as consul, has a configuration named seata.properties been added on consul?
   > 
   > https://seata.apache.org/zh-cn/docs/user/configuration/consul#%E6%8F%90%E4%BA%A4-key-value-%E9%85%8D%E7%BD%AE%E8%87%B3-consul
   > 
   > https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt
   
   好像我没有配置, 有没有更多资料参考??? 没太看得明白那两个link的要求


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2019390983

   I've done some testing locally and was unable to reproduce the problem described in your issue. One possible reason is that your configuration file might not have been correctly mounted into the container.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "liuqiufeng (via GitHub)" <gi...@apache.org>.
liuqiufeng commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2020119018

   > > > > If the configuration center is specified as consul, has a configuration named seata.properties been added on consul?
   > > > > https://seata.apache.org/zh-cn/docs/user/configuration/consul#%E6%8F%90%E4%BA%A4-key-value-%E9%85%8D%E7%BD%AE%E8%87%B3-consul
   > > > > https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt
   > > > 
   > > > 
   > > > 好像我没有配置, 有没有更多资料参考??? 没太看得明白那两个link的要求
   > > 
   > > 
   > > Use this script: https://github.com/apache/incubator-seata/blob/2.x/script/config-center/consul/consul-config.sh to upload the https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt and upload the contents of the configuration file (which can be adjusted as needed) to the console.
   > 
   > seata是在docker里运行的一个container, 要把这段.sh copy到container里执行吗, ![image](https://private-user-images.githubusercontent.com/26402108/316831271-c2c13837-9681-40f0-9c86-49ab720e1bbb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTE0NTA2NzcsIm5iZiI6MTcxMTQ1MDM3NywicGF0aCI6Ii8yNjQwMjEwOC8zMTY4MzEyNzEtYzJjMTM4MzctOTY4MS00MGYwLTljODYtNDlhYjcyMGUxYmJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI2VDEwNTI1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRlZjNmNWFlNjViNTVlZTgwNWVhODk3ZmZiOTU1YjdkODVmMTdmMzM1Yzc2OTk5YTk0OTU0MmRhY2JlZjhjZTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.tBw-W2oiAuYh3iLM98cNpXj0_bD5MNO5lYJHVSVSvJM)
   > 
   > 然后.txt upload去consul 容器内? 是在localhost:8500页面上传? 怎样上传, 如果通过docker cp 上传, 放在容器哪里 ? ![image](https://private-user-images.githubusercontent.com/26402108/316831589-f3d8fb1b-3311-426e-be77-44f1367db1c4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTE0NTA2NzcsIm5iZiI6MTcxMTQ1MDM3NywicGF0aCI6Ii8yNjQwMjEwOC8zMTY4MzE1ODktZjNkOGZiMWItMzMxMS00MjZlLWJlNzctNDRmMTM2N2RiMWM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI2VDEwNTI1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzMWViMzZjOGU5NWU5MzU3NDE2NzIxOTUzZWIwZDJlNDUxNjljNDM3MTVhMDE1OWQ1ZjA1YTUxNjEwNjFiYWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.E9XBO4defXwDMbDMj0exgyr2t5Np2LtUnVFUF8wXKXo)
   > 
   > docker 运行的consul是一个集群, 每个consul容器, 都要上传一份?
   
   不要求在seata容器里执行,在任何能连上consul的机器上都可以执行此脚本。或者从consul控制台添加也可以。
   如果consul是一个集群,那他们的配置不应该是共享的吗?
   
   It is not required to be executed in the seata container, this script can be executed on any machine that can connect to consul. Or adding it from the consul console is fine. If consul is a cluster, shouldn't their configuration be shared?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "slievrly (via GitHub)" <gi...@apache.org>.
slievrly commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2022133623

   The application.yml is a metadata configuration, and config.$type.key refers to the transaction rule configuration.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "liuqiufeng (via GitHub)" <gi...@apache.org>.
liuqiufeng commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2020112135

   > > If the configuration center is specified as consul, has a configuration named seata.properties been added on consul?
   > > https://seata.apache.org/zh-cn/docs/user/configuration/consul#%E6%8F%90%E4%BA%A4-key-value-%E9%85%8D%E7%BD%AE%E8%87%B3-consul
   > > https://github.com/apache/incubator-seata/blob/2.x/script/config-center/config.txt
   > 
   > 好像我没有配置, 有没有更多资料参考??? 没太看得明白那两个link的要求
   
   意思就是需要将config.txt文件中的内容配置到consul上名为 seata.properties 的key下。官网提供的几种方式任选一种都可以。
   
   It means that you need to configure the contents of the config.txt file under the key named seata.properties on the consul. You can do this in any of the ways provided on the official website.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "98549844 (via GitHub)" <gi...@apache.org>.
98549844 commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2019407322

   贴上我的docker-compose
   
   version: '3.8'
   networks:
     ace-network: # 网络名
       name: ace-network
       driver: bridge
       ipam:
         config:
           - subnet: 172.20.0.0/16
   
   services:
     consul-1:
       image: consul:1.15.4 #应该是consul 最新的docker版本
       container_name: consul-1
       hostname: consul-1
       restart: always
       ports:
         - 8500:8500
       environment:
         CONSUL_BIND_INTERFACE: eth0
       command: >
         agent
         --server=true
         --bootstrap-expect=3
         --client=0.0.0.0
         --ui
         --node=consul-1
       networks:
         ace-network:
           ipv4_address: 172.20.0.2
   
     consul-2:
       image: consul:1.15.4
       container_name: consul-2
       hostname: consul-2
       restart: always
       ports:
         - 8501:8500
       environment:
         CONSUL_BIND_INTERFACE: eth0
       command: >
         agent
         --server=true
         --bootstrap-expect=3
         --client=0.0.0.0
         --join consul-1
         --ui
         --node=consul-2
       depends_on:
         - consul-1
       networks:
         ace-network:
           ipv4_address: 172.20.0.3
   
     consul-3:
       image: consul:1.15.4
       container_name: consul-3
       hostname: consul-3
       restart: always
       ports:
         - 8502:8500
       environment:
         CONSUL_BIND_INTERFACE: eth0
       command: >
         agent
         --server=true
         --bootstrap-expect=3
         --client=0.0.0.0
         --join consul-1
         --ui
         --node=consul-3
       depends_on:
         - consul-2
       networks:
         ace-network:
           ipv4_address: 172.20.0.4
   
   
     seata2:
       image: seataio/seata-server:latest
       container_name: seata2
       hostname: seata2
       ports:
         - "7091:7091"
         - "8091:8091"
       environment:
         - SEATA_PORT=8091
         - STORE_MODE=file # 事后需要到seata2: application.yml修改
       depends_on:
         - consul-1
         - consul-2
         - consul-3
         - mysql8
       networks:
         ace-network:
           ipv4_address: 172.20.0.6
   
     mysql8:
       image: mysql:latest
       container_name: mysql8
       hostname: mysql8
       restart: always
       environment:
         MYSQL_DATABASE: ace
         MYSQL_USER: garlam
         MYSQL_PASSWORD: root
         MYSQL_ROOT_PASSWORD: root
       ports:
         - 3306:3306
       depends_on:
         - consul-1
         - consul-2
         - consul-3
       networks:
         - ace-network
   
   # 1. copy from container to host
   # docker cp \
   # seata2:/seata-server/resources/ \
   # /host-path
   
   # 2. modify application.yml
   # 原文在下一个贴
   
   
   # 3. copy updated application.yml from host to container
   # docker cp \
   # /host-path \
   # seata2:/seata-server/resources/
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org


Re: [I] docker同时运行consul和seata, 配置seata application.yml的consul注册中心时, 总是报找不到ip和端口 [incubator-seata]

Posted by "98549844 (via GitHub)" <gi...@apache.org>.
98549844 commented on issue #6444:
URL: https://github.com/apache/incubator-seata/issues/6444#issuecomment-2019410196

   #seata container's application.yml
   
   
   server:
     port: 7091
   
   spring:
     application:
       name: seata2
   
   logging:
     config: classpath:logback-spring.xml
     file:
       path: ${log.home:${user.home}/logs/seata}
     extend:
       logstash-appender:
         destination: 127.0.0.1:4560
       kafka-appender:
         bootstrap-servers: 127.0.0.1:9092
         topic: logback_to_logstash
   
   console:
     user:
       username: seata
       password: seata
   seata:
     config: #配置
       # support: nacos, consul, apollo, zk, etcd3
       type: consul
       server-addr: 172.21.0.2:8500
       acl-token:
       key: seata.properties
     registry: #注册
       # support: nacos, eureka, redis, zk, consul, etcd3, sofa
       type: consul
       cluster: seata2
       server-addr: 172.21.0.2:8500
       acl-token:
     #172.21.0.2
   
     #172.21.0.6
   
     store:
       mode: db
       db:
         datasource: druid
         db-type: mysql
         driver-class-name: com.mysql.cj.jdbc.Driver
         url: jdbc:mysql://172.21.0.6:3306/seata?characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
         user: root
         password: root
         min-conn: 10
         max-conn: 100
         global-table: global_table
         branch-table: branch_table
         lock-table: lock_table
         distributed-lock-table: distributed_lock
         query-limit: 1000
         max-wait: 5000
   
   
   
     #  server:
     #    service-port: 8091 #If not configured, the default is '${server.port} + 1000'
     security:
       secretKey: SeataSecretKey0c382ef121d778043159209298fd40bf3850a017
       tokenValidityInMilliseconds: 1800000
       ignore:
         urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login,/version.json
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@seata.apache.org
For additional commands, e-mail: notifications-help@seata.apache.org