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

MISP Server Error while using PyMISP API Script #905

Open
SurajPatel06 opened this issue Jan 20, 2023 · 3 comments
Open

MISP Server Error while using PyMISP API Script #905

SurajPatel06 opened this issue Jan 20, 2023 · 3 comments

Comments

@SurajPatel06
Copy link

SurajPatel06 commented Jan 20, 2023

Unable to connect to the MISP Software using the Py MISP API along with the Authorization Key and username, Facing Errors as mentioned below while trying to do the same activity:

MISPServerError: Error code 500:
{"name":"An Internal Error Has Occurred.","message":"An Internal Error Has Occurred.","url":"/servers/getVersion"}

PyMISPError: Unable to connect to MISP (https://1**.*0*.**.**0/). Please make sure the API key and the URL are correct (http/https is required): Error code 500:
{"name":"An Internal Error Has Occurred.","message":"An Internal Error Has Occurred.","url":"/servers/getVersion"}

Unable to access the software setup as well:
Error: An Internal Error Has Occurred. Please try your action again. If the problem persists, please contact administrator.

@aliekberkara
Copy link

I'm having the same problem.

@Rafiot
Copy link
Member

Rafiot commented May 22, 2024

That's not enough details for me to help you in any way.

When you get a 500 error, it means the instance is not working at all. Is the web interface working for you? And if yes, please go look at the logs to see why you're getting a 500.

@aliekberkara
Copy link

Misp and OpenCTI work smoothly on my 1...13 and 1...10 servers. I want to integrate Misp into OpenCTI. I do this via portainer. I made the settings of the Misp Connector in the docker-compose.yml file via Portainer. However, although the Misp Connector appears to be working, there is no data flow. When I examine the logs, I encounter the following error. That's my problem.

{"timestamp": "2024-05-22T12:46:47.153598Z", "level": "ERROR", "name": "MISP", "message": "Error fetching misp event again: Error code 500:\n{\"name\":\"An Internal Error Has Occurred.\",\"message\":\"An Internal Error Has Occurred.\",\"url\":\"\\/events\\/restSearch\"}", "exc_info": "Traceback (most recent call last):\n File \"/opt/opencti-connector-misp/misp.py\", line 393, in run\n events = self.misp.search(\"events\", **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/pymisp/api.py\", line 2755, in search\n normalized_response = self._check_json_response(response)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/pymisp/api.py\", line 3706, in _check_json_response\n r = self._check_response(response, expect_json=True)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/pymisp/api.py\", line 3725, in _check_response\n raise MISPServerError(f'Error code 500:\\n{response.text}')\npymisp.exceptions.MISPServerError: Error code 500:\n{\"name\":\"An Internal Error Has Occurred.\",\"message\":\"An Internal Error Has Occurred.\",\"url\":\"\\/events\\/restSearch\"}\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/opt/opencti-connector-misp/misp.py\", line 401, in run\n events = self.misp.search(\"events\", **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/pymisp/api.py\", line 2755, in search\n normalized_response = self._check_json_response(response)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/pymisp/api.py\", line 3706, in _check_json_response\n r = self._check_response(response, expect_json=True)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/local/lib/python3.11/site-packages/pymisp/api.py\", line 3725, in _check_response\n raise MISPServerError(f'Error code 500:\\n{response.text}')\npymisp.exceptions.MISPServerError: Error code 500:\n{\"name\":\"An Internal Error Has Occurred.\",\"message\":\"An Internal Error Has Occurred.\",\"url\":\"\\/events\\/restSearch\"}"}

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

3 participants