SynBioDex / SBOLExplorer

MIT License
4 stars 2 forks source link

Returning error Elasticsearch connection failed #122

Closed cl117 closed 2 weeks ago

cl117 commented 1 month ago

[2024-07-18 14:52:47.672620] [ERROR] Returning error Elasticsearch connection failed Traceback: Traceback (most recent call last): File "/home/sophia/.local/lib/python3.10/site-packages/flask/app.py", line 1813, in full_dispatch_request rv = self.dispatch_request() File "/home/sophia/.local/lib/python3.10/site-packages/flask/app.py", line 1799, in dispatch_request return self.view_functionsrule.endpoint File "/home/sophia/git_repo/SBOLExplorer/flask/explorer.py", line 169, in sparql_search_endpoint if utils.get_es().indices.exists(index=utils.get_config()['elasticsearch_index_name']) is False or utils.get_es().cat.indices(format='json')[0]['health'] is 'red': File "/home/sophia/git_repo/SBOLExplorer/flask/utils.py", line 109, in get_es raise ValueError('Elasticsearch connection failed') ValueError: Elasticsearch connection failed

GET http://localhost:9200/part/_search [status:N/A request:10.017s] Traceback (most recent call last): File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 384, in _make_request six.raise_from(e, None) File "", line 2, in raise_from File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/lib/python3.10/http/client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.10/socket.py", line 705, in readinto return self._sock.recv_into(b) TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/sophia/.local/lib/python3.10/site-packages/elasticsearch/connection/http_urllib3.py", line 171, in perform_request response = self.pool.urlopen(method, url, body, retries=False, headers=request_headers, **kw) File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 637, in urlopen retries = retries.increment(method, url, error=e, _pool=self, File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 343, in increment raise six.reraise(type(error), error, _stacktrace) File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/packages/six.py", line 686, in reraise raise value File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 597, in urlopen httplib_response = self._make_request(conn, method, url, File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._raise_timeout(err=e, url=url, timeout_value=read_timeout) File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 306, in _raise_timeout raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value) urllib3.exceptions.ReadTimeoutError: HTTPConnectionPool(host='localhost', port=9200): Read timed out. (read timeout=10) GET http://localhost:9200/part/_search [status:N/A request:10.017s] Traceback (most recent call last): File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 384, in _make_request six.raise_from(e, None) File "", line 2, in raise_from File "/home/sophia/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/usr/lib/python3.10/http/client.py", line 1375, in getresponse response.begin() File "/usr/lib/python3.10/http/client.py", line 318, in begin version, status, reason = self._read_status() File "/usr/lib/python3.10/http/client.py", line 279, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.10/socket.py", line 705, in readinto return self._sock.recv_into(b) TimeoutError: timed out

cl117 commented 1 month ago

Search "tetR promoter rbs laci cds with gfp" sophia@sophia:~/git_repo/SBOLExplorer$ pidstat -p 2558561 30 Linux 5.15.153.1-microsoft-standard-WSL2 (sophia) 07/18/24 _x8664 (8 CPU)

14:49:10 UID PID %usr %system %guest %wait %CPU CPU Command 14:49:40 1000 2558561 8.87 3.20 0.00 0.00 12.07 3 python3 14:50:10 1000 2558561 36.23 6.43 0.00 1.07 42.67 7 python3 14:50:40 1000 2558561 50.32 13.16 0.00 2.03 63.48 1 python3 14:51:10 1000 2558561 63.90 12.83 0.00 1.40 76.73 0 python3 14:51:40 1000 2558561 27.33 7.40 0.00 0.67 34.73 3 python3 14:52:11 1000 2558561 68.27 12.77 0.00 1.90 81.03 0 python3

cl117 commented 1 month ago

sysctl vm.max_map_count sophia@sophia:\~/git_repo/SBOLExplorer$ sysctl vm.max_map_count vm.max_map_count = 262144 sophia@sophia:\~/git_repo/SBOLExplorer$ docker exec es01 sysctl vm.max_map_count vm.max_map_count = 262144