Closed Tyrell20 closed 3 years ago
I had the same issue. On the MISP side it was complaining
Error: [InvalidArgumentException] Restsearch queries using GET and no parameters are not allowed. If you have passed parameters via a JSON body, make sure you use POST requests.
Request URL: /events/restsearch
This reference might help.
Hello smclinden,
On MISP side (on var/www/MISP/app/tmp/logs/error.log) it seems that I have no errors related to the OpenCTI query.
The DB schema seems OK and the MISP workers are all running.
What else can I check?
Thanks a lot for your support.
I'm working on revising the connector, now. I'll probably create a PR when I have it working.
Ok, one thing that can cause this is described in the following link (a POST being rewritten as a GET by mod_rewrite):
AFAIK, if you are using RewriteRule you could either use the flag [R=307] which would cause the Request to be repeated using the same method (e.g. POST) and data or you could combine mod_rewrite and mod_proxy and use the flag [P] which would stop rewriting and cause the Request to be proxied without changes.
This, of course, assumes that you are using a proxy.
Hello,
I don't use a proxy/reverse proxy on MISP server. I use only a "Redirect permanent" option to redirect from http to https with Apache.
In addition, my MISP instance is integrated with other platforms without problems.
Thank you
I should modify what I posted, above, to state that the changes that I suggested would apply to browsers but not, likely, APIs.
Assuming that your MISP_URL is not subject to a Redirect but is, in fact, the actual URL, what I wrote would not be applicable.
I'm working on revising the connector, now. I'll probably create a PR when I have it working.
Hello smclinden,
are you still working on the connector? We are available in case of is needed to do some tests.
Thanks a lot
Yeah, I got side-tracked by some incident response. I should get back to it by the weekend.
Hello @smclinden, @Tyrell20,
The problem may be solved in the next release (tomorrow, 4.3.2). Please let me know if it's fixed so we can close this issue.
Kind regards, Samuel
Seems to be confirmed, closing it, feel free to re-open if the problem persists.
I am getting same error with latest version of OCTI 5.8.6. @SamuelHassine
{"timestamp": "2023-06-29T00:09:18.238582Z", "level": "INFO", "name": "pycti.entities", "message": "Listing Threat-Actors with filters null."}
{"timestamp": "2023-06-29T00:09:18.242494Z", "level": "DEBUG", "name": "urllib3.connectionpool", "message": "Starting new HTTP connection (1): 192.168.153.131:8080"}
{"timestamp": "2023-06-29T00:09:18.366662Z", "level": "DEBUG", "name": "urllib3.connectionpool", "message": "http://192.168.153.131:8080 \"POST /graphql HTTP/1.1\" 200 144"}
{"timestamp": "2023-06-29T00:09:18.368246Z", "level": "INFO", "name": "pycti.entities", "message": "Listing Threat-Actors with filters null."}
{"timestamp": "2023-06-29T00:09:18.369682Z", "level": "DEBUG", "name": "urllib3.connectionpool", "message": "Starting new HTTP connection (1): 192.168.153.131:8080"}
{"timestamp": "2023-06-29T00:09:18.491425Z", "level": "DEBUG", "name": "urllib3.connectionpool", "message": "http://192.168.153.131:8080 \"POST /graphql HTTP/1.1\" 200 144"}
{"timestamp": "2023-06-29T00:09:18.685607Z", "level": "DEBUG", "name": "urllib3.connectionpool", "message": "http://192.168.153.131:8080 \"POST /graphql HTTP/1.1\" 200 768"}
{"timestamp": "2023-06-29T00:09:18.686441Z", "level": "INFO", "name": "pycti.connector", "message": "Connector registered with ID: 1ce97355-5ced-4163-a6a6-74bb24bf710f"}
{"timestamp": "2023-06-29T00:09:18.686977Z", "level": "INFO", "name": "pycti.connector", "message": "Starting ping alive thread"}
{"timestamp": "2023-06-29T00:09:18.689688Z", "level": "DEBUG", "name": "pymisp", "message": "GET - https://localhost/servers/getVersion"}
{"timestamp": "2023-06-29T00:09:18.690130Z", "level": "DEBUG", "name": "pymisp", "message": ""}
{"timestamp": "2023-06-29T00:09:18.690696Z", "level": "DEBUG", "name": "pymisp", "message": "{'User-Agent': 'PyMISP 2.4.167 - Python 3.10', 'Accept-Encoding': 'gzip, deflate', 'Accept': 'application/json', 'Connection': 'keep-alive', 'Authorization': '
Description
MISP connector (version 4.2.4) sometimes fails to recover events. From the docker logs I see the following error: "Unknown error: the response is not in JSON". On we
Environment
OS (where OpenCTI server runs): { Red Hat Enterprise Linux Server release 7.9 (Maipo) with Docker Compose } OpenCTI version: { OpenCTI 4.2.4 } OpenCTI client: { Frontend } Other environment details: Elasticsearch 7.11.0 RabbitMQ 3.8.12 Redis 6.0.10 MinIO Latest
Expected Output
Connector always working, as in this case:
Actual Output
Additional information
Connector configuration on docker-compose.yml:
connector-misp: image: opencti/connector-misp:latest environment: