Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS Resolution Issue with Datumaro 1.0 exported from CVAT #30

Closed
Loc-Vo opened this issue Sep 28, 2020 · 4 comments · Fixed by cvat-ai/cvat#2240
Closed

DNS Resolution Issue with Datumaro 1.0 exported from CVAT #30

Loc-Vo opened this issue Sep 28, 2020 · 4 comments · Fixed by cvat-ai/cvat#2240

Comments

@Loc-Vo
Copy link

Loc-Vo commented Sep 28, 2020

I tried to view the CVAT project state exported using "datumaro 1.0" and got the following issue.
Below are steps I took to view the project stats:

cd "../task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0"
datumaro project stats

OS: Ubuntu 18.04
Installation: pip install 'git+https://github.com/openvinotoolkit/datumaro'
Datumaro version (datumaru --version) : 0.1.0

Any advice would be appreciated !

2020-09-28 14:31:35,279 ERROR: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.1.43:8080/api/v1/auth/login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7effe13189a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 156, in _new_conn
    conn = connection.create_connection(
  File "/usr/lib/python3/dist-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
    httplib_response = self._make_request(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.8/http/client.py", line 1240, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1286, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1235, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.8/http/client.py", line 1006, in _send_output
    self.send(msg)
  File "/usr/lib/python3.8/http/client.py", line 946, in send
    self.connect()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 184, in connect
    conn = self._new_conn()
  File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 168, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7effe13189a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
    resp = conn.urlopen(
  File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
    retries = retries.increment(
  File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.1.43:8080/api/v1/auth/login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7effe13189a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/dist-packages/datumaro/__main__.py", line 12, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/datumaro/cli/__main__.py", line 115, in main
    return args.command(args)
  File "/usr/local/lib/python3.8/dist-packages/datumaro/cli/contexts/project/__init__.py", line 725, in stats_command
    stats.update(compute_image_statistics(dataset))
  File "/usr/local/lib/python3.8/dist-packages/datumaro/components/operations.py", line 1051, in compute_image_statistics
    stats['dataset'].update(_extractor_stats(dataset))
  File "/usr/local/lib/python3.8/dist-packages/datumaro/components/operations.py", line 1039, in _extractor_stats
    mean, std = mean_std(extractor)
  File "/usr/local/lib/python3.8/dist-packages/datumaro/components/operations.py", line 962, in mean_std
    image = item.image.data
  File "/usr/local/lib/python3.8/dist-packages/datumaro/util/image.py", line 225, in data
    return self._data()
  File "/usr/local/lib/python3.8/dist-packages/datumaro/util/image.py", line 180, in __call__
    image = self.loader(self.path)
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/.datumaro/plugins/cvat_rest_api_task_images.py", line 33, in <lambda>
    lambda item_id: self._image_loader(item_id, self))
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/.datumaro/plugins/cvat_rest_api_task_images.py", line 62, in _image_loader
    extractor._download_image(item_id)
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/.datumaro/plugins/cvat_rest_api_task_images.py", line 39, in _download_image
    self._connect()
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/.datumaro/plugins/cvat_rest_api_task_images.py", line 56, in _connect
    cli = CVAT_CLI(session, api, credentials=(username, password))
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/cvat/utils/cli/core/core.py", line 24, in __init__
    self.login(credentials)
  File "/home/canoo/Downloads/task_test-sever-20200929-2020_09_28_05_00_34-datumaro 1.0/cvat/utils/cli/core/core.py", line 175, in login
    response = self.session.post(url, auth)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3/dist-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='http', port=80): Max retries exceeded with url: //192.168.1.43:8080/api/v1/auth/login (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7effe13189a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
@Loc-Vo Loc-Vo changed the title DNS Resolution Issue with Datumaro 1.0 exported from CVAT DNS Resolution Issue with Datumaro 1.0 exported from CVAT Sep 28, 2020
@zhiltsov-max
Copy link
Contributor

zhiltsov-max commented Sep 28, 2020

Hi, looking at host='http' in the error messages, I feel like you should check ./sources/<task_..._images>/config.json and adjust the hostname.

@Loc-Vo
Copy link
Author

Loc-Vo commented Sep 29, 2020

The config.json file has only a single line :

{"server_url": "http://192.168.1.43:8080", "task_id": 38}

which is the correct IP pointing to the CVAT server.

@zhiltsov-max
Copy link
Contributor

Try to remove http://.

@Loc-Vo
Copy link
Author

Loc-Vo commented Sep 29, 2020

Thanks @zhiltsov-max
it passed the authentication but I got another error

2020-09-29 16:12:56,234 ERROR: division by zero
Traceback (most recent call last):
  File "/usr/local/bin/datum", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/datumaro/cli/__main__.py", line 115, in main
    return args.command(args)
  File "/usr/local/lib/python3.8/dist-packages/datumaro/cli/contexts/project/__init__.py", line 726, in stats_command
    stats.update(compute_ann_statistics(dataset))
  File "/usr/local/lib/python3.8/dist-packages/datumaro/components/operations.py", line 1141, in compute_ann_statistics
    label_info[1] = label_info[0] / label_stat['count']
ZeroDivisionError: division by zero

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants