This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

Not able to make http get requests to API using core.http action

I am using st2-docker, trying some basic actions. API is hosted on my local machine, I have also tried after using ngrok but the problem persists

error: 'HTTPConnectionPool(host=''5c35a9d6.ngrok.io'', port=80): Max retries exceeded with url: /app/patient/ (Caused by NewConnectionError(''<urllib3.connection.HTTPConnection object at 0x7f412f794810>: Failed to establish a new connection: [Errno -3] Lookup timed out'',))'
  traceback: "  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/st2actions/container/base.py", line 127, in _do_run
(status, result, context) = runner.run(action_params)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/http_runner/http_runner.py", line 101, in run
result = client.run()
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/http_runner/http_runner.py", line 229, in run
verify=self.verify
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
  File "/opt/stackstorm/st2/local/lib/python2.7/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
"

I have checked that port 80 is not Listening and the API is accessible.

The error message from urllib seems to indicate the DNS lookup did not work. I know that Docker likes to run its own internal network, including DNS services, so that might be the root cause of this issue. But I will need more context to help more than that.

Yeah, it was the same problem. Got it resolved. Thank you.