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

IBM SOAR application with MISP error #1164

Open
nameh99 opened this issue Feb 29, 2024 · 4 comments
Open

IBM SOAR application with MISP error #1164

nameh99 opened this issue Feb 29, 2024 · 4 comments

Comments

@nameh99
Copy link

nameh99 commented Feb 29, 2024

Hi,

Appreciate your help to check the below misp error after it was working fine,

Traceback (most recent call last): File "/opt/app-root/lib64/python3.9/site-packages/urllib3/connectionpool.py", line 700, in urlopen self._prepare_proxy(conn) File "/opt/app-root/lib64/python3.9/site-packages/urllib3/connectionpool.py", line 996, in prepare_proxy conn.connect() File "/opt/app-root/lib64/python3.9/site-packages/urllib3/connection.py", line 414, in connect self.sock = ssl_wrap_socket( File "/opt/app-root/lib64/python3.9/site-packages/urllib3/util/ssl.py", line 453, in ssl_wrap_socket ssl_sock = ssl_wrap_socket_impl(sock, context, tls_in_tls) File "/opt/app-root/lib64/python3.9/site-packages/urllib3/util/ssl.py", line 495, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock) File "/usr/lib64/python3.9/ssl.py", line 501, in wrap_socket return self.sslsocket_class._create( File "/usr/lib64/python3.9/ssl.py", line 1041, in _create self.do_handshake() File "/usr/lib64/python3.9/ssl.py", line 1310, in do_handshake self._sslobj.do_handshake() ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/app-root/lib64/python3.9/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/opt/app-root/lib64/python3.9/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/opt/app-root/lib64/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='MISPURL', port=443): Max retries exceeded with url: /servers/getPyMISPVersion.json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/app-root/lib64/python3.9/site-packages/pymisp/api.py", line 160, in init response = self.recommended_pymisp_version File "/opt/app-root/lib64/python3.9/site-packages/pymisp/api.py", line 216, in recommended_pymisp_version response = self._prepare_request('GET', 'servers/getPyMISPVersion.json') File "/opt/app-root/lib64/python3.9/site-packages/pymisp/api.py", line 3427, in _prepare_request return self.__session.send(prepped, timeout=self.timeout, **settings) File "/opt/app-root/lib64/python3.9/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/opt/app-root/lib64/python3.9/site-packages/requests/adapters.py", line 563, in send raise SSLError(e, request=request) requests.exceptions.SSLError: HTTPSConnectionPool(host='MISPURL', port=443): Max retries exceeded with url: /servers/getPyMISPVersion.json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)'))) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/app-root/lib64/python3.9/site-packages/fn_misp/components/misp_create_event.py", line 55, in _misp_create_event_function misp_client = misp_helper.get_misp_client(URL, API_KEY, VERIFY_CERT, proxies=proxies) File "/opt/app-root/lib64/python3.9/site-packages/fn_misp/lib/misp_3_helper.py", line 11, in get_misp_client misp_client = ExpandedPyMISP(URL, API_KEY, ssl=VERIFY_CERT, proxies=proxies) File "/opt/app-root/lib64/python3.9/site-packages/pymisp/api.py", line 181, in init raise PyMISPError(f'Unable to connect to MISP ({self.root_url}). Please make sure the API key and the URL are correct (http/https is required): {e}') pymisp.exceptions.PyMISPError: Unable to connect to MISP (https://MISPURL:443). Please make sure the API key and the URL are correct (http/https is required): HTTPSConnectionPool(host='MISPURL', port=443): Max retries exceeded with url: /servers/getPyMISPVersion.json (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))Setting up connection to MISP

@nameh99
Copy link
Author

nameh99 commented Feb 29, 2024

MISP version: v2.4.184
PyMISP version: 2.4.173
Python version: 3.10.12

@Rafiot
Copy link
Member

Rafiot commented Feb 29, 2024

Would be easier if you pasted the stacktrace with a more readable formatting, but this line is pretty clear:
PyMISPError: Unable to connect to MISP (https://MISPURL:443).

The URL is incorrect.

@nameh99
Copy link
Author

nameh99 commented Feb 29, 2024

@Rafiot nope the url was actually misp ip, in addition it was working normally before but once we did a restart to the app host we start seeing this error

@Rafiot
Copy link
Member

Rafiot commented Feb 29, 2024

I very much doubt MISPURL is the URL of the instance. What do you put in your browser to reach MISP?

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