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

URLError: <urlopen error timed out> #1031

Closed
maxd opened this issue Jul 14, 2014 · 4 comments
Closed

URLError: <urlopen error timed out> #1031

maxd opened this issue Jul 14, 2014 · 4 comments
Assignees
Labels
Milestone

Comments

@maxd
Copy link

maxd commented Jul 14, 2014

Hi All,

This is issue depends to #963.

Traceback (most recent call last):
  File "/usr/share/datadog/agent/checks/__init__.py", line 498, in run
    self.check(copy.deepcopy(instance))
  File "/usr/share/datadog/agent/checks.d/docker.py", line 151, in check
    containers = self._get_containers(instance, with_size=True)
  File "/usr/share/datadog/agent/checks.d/docker.py", line 243, in _get_containers
    return self._get_json("%(url)s/containers/json" % instance, params={'size': with_size})
  File "/usr/share/datadog/agent/checks.d/docker.py", line 264, in _get_json
    request = self.url_opener.open(req)
  File "/usr/lib64/python2.6/urllib2.py", line 391, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
    '_open', req)
  File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
    result = func(*args)
  File "/usr/share/datadog/agent/checks.d/docker.py", line 107, in unix_open
    return self.do_open(UnixHTTPConnection(unix_socket), new_req)
  File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
    raise URLError(err)
URLError: <urlopen error timed out>

As you can see try-except doesn't catch URLError exception. Maybe this is platform specific problem. DataDog agent is running on CentOS 6.5.

Can you fix it in next release?

Thanks

@remh
Copy link
Contributor

remh commented Jul 14, 2014

Thanks for your feedback @maxd !
@LotharSee Can you add that in your Docker work please ?

@LotharSee
Copy link
Contributor

Sure!

The error happens at the urllib2 level instead of the socket level, that's interesting. If the source is the same, then catching it will be enough.
To be sure, @maxd can you tell me how many containers were running? Do they modify their own file system? Some system info (such as Kernel/Docker/Agent version) may also help me.
Thanks!

@maxd
Copy link
Author

maxd commented Jul 15, 2014

can you tell me how many containers were running?

At present each docker node has about 10 containers.

Do they modify their own file system?

I can't say exactly. But I think most of them don't write to own file system (except logging).

Some system info (such as Kernel/Docker/Agent version) may also help me.

https://gist.github.com/maxd/3ebe878b54d3be78cc18

@remh
Copy link
Contributor

remh commented Aug 22, 2014

Fixed with Agent 5.0.0

@remh remh closed this as completed Aug 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants