Skip to content

Problem installing or searching pack, temporary failure in name resolution #216

@JustDevZero

Description

@JustDevZero

Describe the problem
A clear and concise description of what the problem is.

Versions

  • Host OS: Fedora 33 And Ubuntu 18.04
  • docker: Docker version 20.10.3, build 48d30b5
  • docker-compose: docker-compose version 1.28.2, build 67630359
  • stackstorm version: v3.3.0

To Reproduce
If necessary, please specify steps to reproduce the behavior.

Login to st2client with:

docker-compose exec st2client bash

And then try to search or install.

It will fail with:


st2 pack search datadog

root@554d99419ce3:/opt/stackstorm# st2 pack search docker
ERROR: 400 Client Error: Bad Request
MESSAGE: No results from the index: tried https://index.stackstorm.org/v1/index.json.
Status: [
    {
        "url": "https://index.stackstorm.org/v1/index.json",
        "packs": 0,
        "message": "ConnectionError(MaxRetryError(\"HTTPSConnectionPool(host='index.stackstorm.org', port=443): Max retries exceeded with url: /v1/index.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f448e565710>: Failed to establish a new connection: [Errno -3] Lookup timed out',))\",),)",
        "error": "unresponsive"
    }
] for url: http://st2api:9101/packs/index/search



root@554d99419ce3:/opt/stackstorm# st2 pack install datadog

	[ succeeded ] init_task
	[  failed   ] download_pack

id: 6038397af6cde4fdb05d5c08
action.ref: packs.install
parameters: 
  packs:
  - datadog
  python3: false
status: failed
start_timestamp: Thu, 25 Feb 2021 23:57:46 UTC
end_timestamp: Thu, 25 Feb 2021 23:57:59 UTC
result: 
  errors:
  - message: Execution failed. See result for details.
    result:
      exit_code: 1
      result: None
      stderr: "Index parsing error: {
    "url": "https://index.stackstorm.org/v1/index.json",
    "packs": 0,
    "message": "ConnectionError(MaxRetryError(\\"HTTPSConnectionPool(host='index.stackstorm.org', port=443): Max retries exceeded with url: /v1/index.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8ff5cdc18>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))\\",),)",
    "error": "unresponsive"
}
Traceback (most recent call last):
  File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 334, in <module>
    obj.run()
  File "/opt/stackstorm/st2/lib/python3.6/site-packages/python_runner/python_action_wrapper.py", line 193, in run
    output = action.run(**self._parameters)
  File "/opt/stackstorm/packs/packs/actions/pack_mgmt/download.py", line 90, in run
    return self._validate_result(result=result, repo_url=pack_url)
  File "/opt/stackstorm/packs/packs/actions/pack_mgmt/download.py", line 111, in _validate_result
    raise Exception(message)
Exception: The pack has not been downloaded from "None".

Errors:
No results from the index: tried https://index.stackstorm.org/v1/index.json.
Status: [
    {
        "url": "https://index.stackstorm.org/v1/index.json",
        "packs": 0,
        "message": "ConnectionError(MaxRetryError(\\"HTTPSConnectionPool(host='index.stackstorm.org', port=443): Max retries exceeded with url: /v1/index.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff8ff5cdc18>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))\\",),)",
        "error": "unresponsive"
    }
]
"
      stdout: ''
    task_id: download_pack
    type: error
  output:
    conflict_list: null
    message: ''
    packs_list: null
    warning_list: null
+--------------------------+------------------------+---------------+----------------+-------------------------------+
| id                       | status                 | task          | action         | start_timestamp               |
+--------------------------+------------------------+---------------+----------------+-------------------------------+
| 6038397b1ac1577e7e12dae3 | succeeded (0s elapsed) | init_task     | core.noop      | Thu, 25 Feb 2021 23:57:47 UTC |
| 6038397c1ac1577e7e12daf3 | failed (11s elapsed)   | download_pack | packs.download | Thu, 25 Feb 2021 23:57:48 UTC |







If try to do some curl... from st2api container:


root@2bc662f52cab:/opt/stackstorm# curl https://index.stackstorm.org/v1/index.json|wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:09 --:--:--     0curl: (6) Could not resolve host: index.stackstorm.org
0

Modifying resolve.conf for adding 1.1.1.1 after docker resolution improves the thing but still.


curl https://index.stackstorm.org/v1/index.json|wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  678k    0  678k    0     0   406k      0 --:--:--  0:00:02 --:--:--  406k
16298

From s2client container on the other hand it's inmediate.

curl https://index.stackstorm.org/v1/index.json|wc -l
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  678k    0  678k    0     0  3879k      0 --:--:-- --:--:-- --:--:-- 3857k
16298

For some reason, s2api container it's taking more time to resolv... But even with that it's no reason for getting a Temporary failure in name resolution.

Am i installing them wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions