Hello: I'd like to invoke a SOAP operation for the ECS task healthCheck.
Does anybody know how it can be achieved?
a) cURL with SOAP request makes the task Unhealthy (from task definition)
"healthCheck": {
"command": [
"CMD-SHELL",
"curl -s --fail --request POST --header \"Content-Type: text/xml;charset=UTF-8\" --data \"<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' xmlns:ser='http://service.cou.edu'><soapenv:Header/><soapenv:Body><ser:healthCheckTask/></soapenv:Body></soapenv:Envelope>\" http://localhost:8080/myctx/MyService || exit 1"
],
"interval": 30,
"timeout": 5,
"retries": 3,
"startPeriod": 2
},
Note: When this cURL command is placed in the Dockerfile HEALTHCHECK, it always succeeds. So, I'm sure the command is correct. I expected the task to become Healthy when configuring this healthCheck in the task definition.
b) cURL just loading the WSDL of the SOAP service makes task Healthy (from task definition)
"healthCheck": {
"command": [
"CMD-SHELL",
"curl -s --fail http://localhost:8080/myctx/MyService?WSDL || exit 1"
],
"interval": 30,
"timeout": 5,
"retries": 3,
"startPeriod": 2
},
Note: It also works fine when placed in the HEALTHCHECK of the Dockerfile