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

Error Too many open files #1

Open
jedai47 opened this issue Apr 15, 2024 · 1 comment
Open

Error Too many open files #1

jedai47 opened this issue Apr 15, 2024 · 1 comment

Comments

@jedai47
Copy link

jedai47 commented Apr 15, 2024

i couldnt run your project: docker run --rm droope/droopescan scan drupal -e a -u https://www.epsm-aube.fr/ -o json | python3 guesser.py
Droopescan plugin guesser by dotpy
Assume the latest version installed but check all!! The guesses depend on how well the project is maintained

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl_.py", line 402, in ssl_wrap_socket
context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
OSError: [Errno 24] Too many open files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 404, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 1058, in validate_conn
conn.connect()
File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 419, in connect
self.sock = ssl_wrap_socket(
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/ssl
.py", line 404, in ssl_wrap_socket
raise SSLError(e)
urllib3.exceptions.SSLError: [Errno 24] Too many open files

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 799, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='git.drupalcode.org', port=443): Max retries exceeded with url: /api/v4/projects/project%2Fmetatag/repository/files/README.txt/raw?ref=8.x-1.23 (Caused by SSLError(OSError(24, 'Too many open files')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/walid/droopescan-guesser/guesser.py", line 162, in
guess_version_from_droopescan_stdout()
File "/Users/walid/droopescan-guesser/guesser.py", line 153, in guess_version_from_droopescan_stdout
plugins = Plugins(droopescan_input)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/walid/droopescan-guesser/guesser.py", line 20, in init
self.get_all_files()
File "/Users/walid/droopescan-guesser/guesser.py", line 46, in get_all_files
future.result()
File "/usr/local/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/Cellar/python@3.12/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/walid/droopescan-guesser/guesser.py", line 119, in request_file
self.files[target_file_url] = requests.get(url, params={"ref": self.tag}).text.strip()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 655, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='git.drupalcode.org', port=443): Max retries exceeded with url: /api/v4/projects/project%2Fmetatag/repository/files/README.txt/raw?ref=8.x-1.23 (Caused by SSLError(OSError(24, 'Too many open files')))

@dotPY-hax
Copy link
Owner

dotPY-hax commented Apr 17, 2024

Unfortunately I was not able to reproduce your error. Nevertheless I have reduced the amount of workers in the ThreadPoolExecutor to a sane level. I hope this fixes your problem. If it doesnt please check the amount of concurrent open files supported by your system and increase the amount. If the problem persists stay in touch via this thread.

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

No branches or pull requests

2 participants