Skip to content

Gatweay Port Hangs - How to health check #124

Answered by gnzsnz
Al4ise asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

not shure what's your expectation, why would "curl -X GET "localhost:$port/v1/api/one/user" work, this is not a RESTfull API.

I just did a quick test on my running TWS instance and ports are working.

if you need a healthcheck(which just is telling you that the port is open, but not that is actually working) you can use that

this is how it would look like on ib-gateway with the port down (ibgateway is not running)

something like this to have it working as a docker healthcheck

HEALTHCHECK --interval=30m --timeout=15s --start-period=10s \
  CMD timeout 1 bash -c '</dev/tcp/0.0.0.0/4001 && echo "TWS API up" || echo "TWS API down"' || echo "Connection timeout"

take into account that any …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by gnzsnz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation
2 participants
Converted from issue

This discussion was converted from issue #123 on June 18, 2024 07:47.