容器中的seata停止时,无法响应kill 15信号,导致无法走优雅停机逻辑

yrefmtwq  于 22天前  发布在  其他
关注(0)|答案(1)|浏览(20)
  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

查看了一下容器中发现seata进程并不是PID 1导致的

目前做法:

  1. 让seata进程成为PID 1
    exec方式,但是目前这种方式我试了一下,可以,但是在启动报错时,错误日志无法输出,直接就关闭了容器
  2. 让信号传播到seata进程
    2.1 让shell脚本处理信号
    2.2 使用具有传播信号的工具,tini(es是这样弄的)
  3. 走k8s preStop方式(这种方案不推荐,感觉太依赖k8s的东西了,在docker里面一样失效)

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

Just paste your stack trace here!

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version(e.g. java -version ):
  • Seata client/server version:
  • Database version:
  • OS(e.g. uname -a ):
  • Others:

相关问题