Connection timeout errors
See original GitHub issueEnvironment Home-Assistant version: 0.112.3 Elasticsearch version: 7.8.0
Relevant configuration.yml
settings:
elastic:
url: http://10.X.X.X:9200
only_publish_changed: true
ilm_max_size: 1gb
ilm_delete_after: 90d
Describe the bug I receive connection timeout messages most of the time, but occasionally, the integration works and logs data into elasticsearch properly.
Expected behavior No connection timeouts
I started seeing this issue when https://github.com/legrego/homeassistant-elasticsearch/issues/97 was implemented/resolved.
Additional context I am able to curl the url endpoint from within the homeassistant container:
# docker exec -it homeassistant curl http://10.X.X.X:9200
{
"name" : "elasticsearch",
"cluster_name" : "synology",
"cluster_uuid" : "h4bS4pFUSfePLhUCySAaOw",
"version" : {
"number" : "7.8.0",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "757314695644ea9a1dc2fecd26d1a43856725e65",
"build_date" : "2020-06-14T19:35:50.234439Z",
"build_snapshot" : false,
"lucene_version" : "8.5.1",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Log messages:
2020-07-07 15:12:34 ERROR (MainThread) [homeassistant.setup] Error during setup of component elastic
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
req, traces, timeout)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
req=req, client_error=client_error)
File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 989, in create_connection
ssl_handshake_timeout=ssl_handshake_timeout)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1017, in _create_connection_transport
await waiter
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
timeout=real_timeout
File "/usr/local/lib/python3.7/site-packages/async_timeout/__init__.py", line 45, in __exit__
self._do_exit(exc_type)
File "/usr/local/lib/python3.7/site-packages/async_timeout/__init__.py", line 92, in _do_exit
raise asyncio.TimeoutError
concurrent.futures._base.TimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/elasticsearch_async/connection.py", line 98, in perform_request
response = yield from self.session.request(method, url, data=body, headers=headers)
File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 488, in _request
'to host {0}'.format(url)) from exc
aiohttp.client_exceptions.ServerTimeoutError: Connection timeout to host http://10.X.X.X:9200/
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 193, in _async_setup_component
result = await asyncio.wait_for(task, SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/config/custom_components/elastic/__init__.py", line 74, in async_setup
await gateway.async_init()
File "/config/custom_components/elastic/es_gateway.py", line 36, in async_init
await self.es_version.async_init()
File "/config/custom_components/elastic/es_version.py", line 15, in async_init
version = (await self._client.info())["version"]
File "/usr/local/lib/python3.7/site-packages/elasticsearch_async/transport.py", line 150, in main_loop
method, url, params, body, headers=headers, ignore=ignore, timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/elasticsearch_async/connection.py", line 110, in perform_request
raise ConnectionTimeout('TIMEOUT', str(e), e)
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (3 by maintainers)
Top Results From Across the Web
What Does a Server Connection Timeout Mean?
Server timeout errors can be caused when a program tries to connect to a server that doesn't exist. The server could be offline...
Read more >[SOLVED] How to Fix the ERR_CONNECTION_TIMED_OUT ...
Ways to Fix Err_Connection_Timed_Out Error · Method 1: Try VPN · Method 2: Flush DNS Cache · Method 3: Check Your Connection ·...
Read more >How to Fix the ERR_CONNECTION_TIMED_OUT Error - Kinsta
According to the WordPress support documentation, a connection timed out error appears when your website is trying to do more than your ...
Read more >11 Ways to Fix the ERR_CONNECTION_TIMED_OUT Error
The connection timed out error isn't a dangerous error, nor is it an infected file that can harm your computer.
Read more >Server Connection Timeout Error Explained - Crazy Domains
Server Connection Timeout Error Explained · 1. Clear Browser Cache · 2. Restart Internet Router · 3. Check and Update Browser · 4....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@legrego very cool…it really only seemed to timeout upon startup, so even bumping that from 10 -> 30 makes a lot of sense. home assistant is trying to start a bunch of other things in parallel and that may have been causing the original timeout. Feel free to close this bug report and I’ll re-open it if the new timeout mechanism doesn’t satisfy my need.
No problem at all…having the elastic integration is a ‘nice to have’ and really doesn’t impact my home automation in any way. Let me know how I can help and what other information you might require. Thanks for responding!