Getting 404 response code, while polling the data or discovery
Don't know what really went wrong, I am trying to poll the data from my taxii server [or] discovery services. I am getting every response with 404, I also check with logs and configuration and every thing really looks fine.
Server Logs:
{"event": "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'domain'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n", "logger": "py.warnings", "level": "warning", "timestamp": "2020-12-28T12:40:18.878144Z"}
{"event": "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'domain'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n", "logger": "py.warnings", "level": "warning", "timestamp": "2020-12-28T12:40:18.904930Z"}
{"event": "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'domain'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n", "logger": "py.warnings", "level": "warning", "timestamp": "2020-12-28T12:40:18.940006Z"}
{"hooks": "misp_taxii_hooks.hooks", "event": "signal_hooks.imported", "logger": "opentaxii.server", "level": "info", "timestamp": "2020-12-28T12:40:18.957316Z"}
{"event": "opentaxii.server_configured", "logger": "opentaxii.server", "level": "info", "timestamp": "2020-12-28T12:40:18.957730Z"}
{"event": "Starting gunicorn 20.0.4", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:18.972698Z"}
{"event": "Listening at: http://127.0.0.1:9000 (114581)", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:18.973358Z"}
{"event": "Using worker: sync", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:18.973467Z"}
{"event": "Booting worker with pid: 114586", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:18.981931Z"}
{"event": "Booting worker with pid: 114587", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:19.010105Z"}
FULL
### Collection Management status
Cabby response for collections will be
2020-12-28 18:10:51,146 urllib3.connectionpool DEBUG: Starting new HTTP connection (1): localhost:9000
2020-12-28 18:10:51,273 urllib3.connectionpool DEBUG: http://localhost:9000 "POST /services/poll HTTP/1.1" 404 232
2020-12-28 18:10:51,274 cabby.dispatcher DEBUG: Response:
404 Not Found
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2020-12-28 18:10:51,274 cabby.cli.commons ERROR: HTTP Error: status code 404
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/cabby/cli/commons.py", line 171, in run_client
run_func(client, args.uri, args)
File "/usr/local/lib/python3.6/dist-packages/cabby/cli/poll.py", line 139, in _runner
for counter, block in enumerate(blocks, 1):
File "/usr/local/lib/python3.6/dist-packages/cabby/client11.py", line 485, in poll
service_type=const.SVC_POLL)
File "/usr/local/lib/python3.6/dist-packages/cabby/abstract.py", line 190, in _execute_request
timeout=self.timeout)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 54, in send_taxii_request
stream, headers = request_stream(session, url, request_body, timeout)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 91, in request_stream
raise_http_error(response.status_code, response.raw)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 34, in raise_http_error
raise HTTPError(status_code)
cabby.exceptions.HTTPError: HTTP Error: status code 404
### Discovery status also
Cabby response will be
2020-12-28 18:10:51,146 urllib3.connectionpool DEBUG: Starting new HTTP connection (1): localhost:9000
2020-12-28 18:10:51,273 urllib3.connectionpool DEBUG: http://localhost:9000 "POST /services/poll HTTP/1.1" 404 232
2020-12-28 18:10:51,274 cabby.dispatcher DEBUG: Response:
404 Not Found
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2020-12-28 18:10:51,274 cabby.cli.commons ERROR: HTTP Error: status code 404
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/cabby/cli/commons.py", line 171, in run_client
run_func(client, args.uri, args)
File "/usr/local/lib/python3.6/dist-packages/cabby/cli/poll.py", line 139, in _runner
for counter, block in enumerate(blocks, 1):
File "/usr/local/lib/python3.6/dist-packages/cabby/client11.py", line 485, in poll
service_type=const.SVC_POLL)
File "/usr/local/lib/python3.6/dist-packages/cabby/abstract.py", line 190, in _execute_request
timeout=self.timeout)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 54, in send_taxii_request
stream, headers = request_stream(session, url, request_body, timeout)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 91, in request_stream
raise_http_error(response.status_code, response.raw)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 34, in raise_http_error
raise HTTPError(status_code)
cabby.exceptions.HTTPError: HTTP Error: status code 404
### Poll status also
Cabby response will be
2020-12-28 18:10:51,146 urllib3.connectionpool DEBUG: Starting new HTTP connection (1): localhost:9000
2020-12-28 18:10:51,273 urllib3.connectionpool DEBUG: http://localhost:9000 "POST /services/poll HTTP/1.1" 404 232
2020-12-28 18:10:51,274 cabby.dispatcher DEBUG: Response:
404 Not Found
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2020-12-28 18:10:51,274 cabby.cli.commons ERROR: HTTP Error: status code 404
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/cabby/cli/commons.py", line 171, in run_client
run_func(client, args.uri, args)
File "/usr/local/lib/python3.6/dist-packages/cabby/cli/poll.py", line 139, in _runner
for counter, block in enumerate(blocks, 1):
File "/usr/local/lib/python3.6/dist-packages/cabby/client11.py", line 485, in poll
service_type=const.SVC_POLL)
File "/usr/local/lib/python3.6/dist-packages/cabby/abstract.py", line 190, in _execute_request
timeout=self.timeout)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 54, in send_taxii_request
stream, headers = request_stream(session, url, request_body, timeout)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 91, in request_stream
raise_http_error(response.status_code, response.raw)
File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 34, in raise_http_error
raise HTTPError(status_code)
cabby.exceptions.HTTPError: HTTP Error: status code 404
## Server is running using supervisorctl
I am adding the server status also
opentaxii RUNNING pid 114581, uptime 0:07:53
Kindly anyone help me to resolve the issue.
Getting 404 response code, while polling the data or discovery
Don't know what really went wrong, I am trying to poll the data from my taxii server [or] discovery services. I am getting every response with 404, I also check with logs and configuration and every thing really looks fine.
Server Logs: {"event": "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'domain'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n", "logger": "py.warnings", "level": "warning", "timestamp": "2020-12-28T12:40:18.878144Z"} {"event": "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'domain'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n", "logger": "py.warnings", "level": "warning", "timestamp": "2020-12-28T12:40:18.904930Z"} {"event": "/usr/local/lib/python3.6/dist-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'domain'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings\n InsecureRequestWarning,\n", "logger": "py.warnings", "level": "warning", "timestamp": "2020-12-28T12:40:18.940006Z"} {"hooks": "misp_taxii_hooks.hooks", "event": "signal_hooks.imported", "logger": "opentaxii.server", "level": "info", "timestamp": "2020-12-28T12:40:18.957316Z"} {"event": "opentaxii.server_configured", "logger": "opentaxii.server", "level": "info", "timestamp": "2020-12-28T12:40:18.957730Z"} {"event": "Starting gunicorn 20.0.4", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:18.972698Z"} {"event": "Listening at: http://127.0.0.1:9000 (114581)", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:18.973358Z"} {"event": "Using worker: sync", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:18.973467Z"} {"event": "Booting worker with pid: 114586", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:18.981931Z"} {"event": "Booting worker with pid: 114587", "logger": "gunicorn.error", "level": "info", "timestamp": "2020-12-28T12:40:19.010105Z"}
TAXII CLIENT in Verbose mode: taxii-poll --path http://localhost:9000/services/poll --username admin --password admin --verify no -v -c my_collection Response will be <taxii_11:Poll_Request xmlns:taxii="http://taxii.mitre.org/messages/taxii_xml_binding-1" xmlns:taxii_11="http://taxii.mitre.org/messages/taxii_xml_binding-1.1" xmlns:td q="http://taxii.mitre.org/query/taxii_default_query-1" message_id="98f09de1-6524-49cd-85c0-673ffdf8fbdb" collection_name="my_collection">
Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2020-12-28 18:10:51,274 cabby.cli.commons ERROR: HTTP Error: status code 404 Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/cabby/cli/commons.py", line 171, in run_client run_func(client, args.uri, args) File "/usr/local/lib/python3.6/dist-packages/cabby/cli/poll.py", line 139, in _runner for counter, block in enumerate(blocks, 1): File "/usr/local/lib/python3.6/dist-packages/cabby/client11.py", line 485, in poll service_type=const.SVC_POLL) File "/usr/local/lib/python3.6/dist-packages/cabby/abstract.py", line 190, in _execute_request timeout=self.timeout) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 54, in send_taxii_request stream, headers = request_stream(session, url, request_body, timeout) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 91, in request_stream raise_http_error(response.status_code, response.raw) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 34, in raise_http_error raise HTTPError(status_code) cabby.exceptions.HTTPError: HTTP Error: status code 404 ### Discovery status also Cabby response will be 2020-12-28 18:10:51,146 urllib3.connectionpool DEBUG: Starting new HTTP connection (1): localhost:9000 2020-12-28 18:10:51,273 urllib3.connectionpool DEBUG: http://localhost:9000 "POST /services/poll HTTP/1.1" 404 232 2020-12-28 18:10:51,274 cabby.dispatcher DEBUG: Response:Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2020-12-28 18:10:51,274 cabby.cli.commons ERROR: HTTP Error: status code 404 Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/cabby/cli/commons.py", line 171, in run_client run_func(client, args.uri, args) File "/usr/local/lib/python3.6/dist-packages/cabby/cli/poll.py", line 139, in _runner for counter, block in enumerate(blocks, 1): File "/usr/local/lib/python3.6/dist-packages/cabby/client11.py", line 485, in poll service_type=const.SVC_POLL) File "/usr/local/lib/python3.6/dist-packages/cabby/abstract.py", line 190, in _execute_request timeout=self.timeout) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 54, in send_taxii_request stream, headers = request_stream(session, url, request_body, timeout) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 91, in request_stream raise_http_error(response.status_code, response.raw) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 34, in raise_http_error raise HTTPError(status_code) cabby.exceptions.HTTPError: HTTP Error: status code 404 ### Poll status also Cabby response will be 2020-12-28 18:10:51,146 urllib3.connectionpool DEBUG: Starting new HTTP connection (1): localhost:9000 2020-12-28 18:10:51,273 urllib3.connectionpool DEBUG: http://localhost:9000 "POST /services/poll HTTP/1.1" 404 232 2020-12-28 18:10:51,274 cabby.dispatcher DEBUG: Response:Not Found
The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
2020-12-28 18:10:51,274 cabby.cli.commons ERROR: HTTP Error: status code 404 Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/cabby/cli/commons.py", line 171, in run_client run_func(client, args.uri, args) File "/usr/local/lib/python3.6/dist-packages/cabby/cli/poll.py", line 139, in _runner for counter, block in enumerate(blocks, 1): File "/usr/local/lib/python3.6/dist-packages/cabby/client11.py", line 485, in poll service_type=const.SVC_POLL) File "/usr/local/lib/python3.6/dist-packages/cabby/abstract.py", line 190, in _execute_request timeout=self.timeout) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 54, in send_taxii_request stream, headers = request_stream(session, url, request_body, timeout) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 91, in request_stream raise_http_error(response.status_code, response.raw) File "/usr/local/lib/python3.6/dist-packages/cabby/dispatcher.py", line 34, in raise_http_error raise HTTPError(status_code) cabby.exceptions.HTTPError: HTTP Error: status code 404 ## Server is running using supervisorctl I am adding the server status also opentaxii RUNNING pid 114581, uptime 0:07:53 Kindly anyone help me to resolve the issue.