These are the last entries of the cern-search-api logs. The first one is the successful entry using CURL and the next are the python ones that return the 502 error:
cern-search-rest-api | [pid: 25|app: 0|req: 34/41] 172.25.0.1 () {40 vars in 571 bytes} [Thu Jun 25 13:35:03 2020] POST /api/records/ => generated 738 bytes in 110 msecs (HTTP/1.1 201) 17 headers in 776 bytes (1 switches on core 0)
cern-search-rest-api | Traceback (most recent call last):
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 774, in resolve_from_url
cern-search-rest-api | document = self.store[url]
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/_utils.py", line 22, in __getitem__
cern-search-rest-api | return self.store[self.normalize(uri)]
cern-search-rest-api | KeyError: 'https://indico-sup-dev.fnal.gov:8080/schemas/indico/events_v1.0.0.json'
cern-search-rest-api | During handling of the above exception, another exception occurred:
cern-search-rest-api | Traceback (most recent call last):
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonresolver/contrib/jsonschema.py", line 46, in resolve_remote
cern-search-rest-api | result = resolver.resolve(uri)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonresolver/core.py", line 48, in resolve
cern-search-rest-api | loader, args = self.url_map.bind(parts.netloc).match(parts.path)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/werkzeug/routing.py", line 1799, in match
cern-search-rest-api | raise NotFound()
cern-search-rest-api | werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
cern-search-rest-api | During handling of the above exception, another exception occurred:
cern-search-rest-api | Traceback (most recent call last):
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/connection.py", line 160, in _new_conn
cern-search-rest-api | (self._dns_host, self.port), self.timeout, **extra_kw
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/util/connection.py", line 61, in create_connection
cern-search-rest-api | for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib64/python3.6/socket.py", line 745, in getaddrinfo
cern-search-rest-api | for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
cern-search-rest-api | socket.gaierror: [Errno -2] Name or service not known
cern-search-rest-api | During handling of the above exception, another exception occurred:
cern-search-rest-api | Traceback (most recent call last):
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 677, in urlopen
cern-search-rest-api | chunked=chunked,
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 381, in _make_request
cern-search-rest-api | self._validate_conn(conn)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
cern-search-rest-api | conn.connect()
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/connection.py", line 308, in connect
cern-search-rest-api | conn = self._new_conn()
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/connection.py", line 172, in _new_conn
cern-search-rest-api | self, "Failed to establish a new connection: %s" % e
cern-search-rest-api | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7ff301199588>: Failed to establish a new connection: [Errno -2] Name or service not known
cern-search-rest-api | During handling of the above exception, another exception occurred:
cern-search-rest-api | Traceback (most recent call last):
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
cern-search-rest-api | timeout=timeout
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/connectionpool.py", line 725, in urlopen
cern-search-rest-api | method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/urllib3/util/retry.py", line 439, in increment
cern-search-rest-api | raise MaxRetryError(_pool, url, error or ResponseError(cause))
cern-search-rest-api | urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='indico-sup-dev.fnal.gov', port=8080): Max retries exceeded with url: /schemas/indico/events_v1.0.0.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff301199588>: Failed to establish a new connection: [Errno -2] Name or service not known',))
cern-search-rest-api | During handling of the above exception, another exception occurred:
cern-search-rest-api | Traceback (most recent call last):
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 777, in resolve_from_url
cern-search-rest-api | document = self.resolve_remote(url)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonresolver/contrib/jsonschema.py", line 51, in resolve_remote
cern-search-rest-api | return super(RefResolver, self).resolve_remote(uri)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 860, in resolve_remote
cern-search-rest-api | result = requests.get(uri).json()
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/requests/api.py", line 76, in get
cern-search-rest-api | return request('get', url, params=params, **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/requests/api.py", line 61, in request
cern-search-rest-api | return session.request(method=method, url=url, **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/requests/sessions.py", line 530, in request
cern-search-rest-api | resp = self.send(prep, **send_kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/requests/sessions.py", line 643, in send
cern-search-rest-api | r = adapter.send(request, **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/requests/adapters.py", line 516, in send
cern-search-rest-api | raise ConnectionError(e, request=request)
cern-search-rest-api | requests.exceptions.ConnectionError: HTTPSConnectionPool(host='indico-sup-dev.fnal.gov', port=8080): Max retries exceeded with url: /schemas/indico/events_v1.0.0.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff301199588>: Failed to establish a new connection: [Errno -2] Name or service not known',))
cern-search-rest-api | During handling of the above exception, another exception occurred:
cern-search-rest-api | Traceback (most recent call last):
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 2464, in __call__
cern-search-rest-api | return self.wsgi_app(environ, start_response)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/werkzeug/middleware/dispatcher.py", line 66, in __call__
cern-search-rest-api | return app(environ, start_response)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 2464, in __call__
cern-search-rest-api | return self.wsgi_app(environ, start_response)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 2450, in wsgi_app
cern-search-rest-api | response = self.handle_exception(e)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask_cors/extension.py", line 161, in wrapped_function
cern-search-rest-api | return cors_after_request(app.make_response(f(*args, **kwargs)))
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 1867, in handle_exception
cern-search-rest-api | reraise(exc_type, exc_value, tb)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
cern-search-rest-api | raise value
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 2447, in wsgi_app
cern-search-rest-api | response = self.full_dispatch_request()
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 1952, in full_dispatch_request
cern-search-rest-api | rv = self.handle_user_exception(e)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask_cors/extension.py", line 161, in wrapped_function
cern-search-rest-api | return cors_after_request(app.make_response(f(*args, **kwargs)))
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 1821, in handle_user_exception
cern-search-rest-api | reraise(exc_type, exc_value, tb)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
cern-search-rest-api | raise value
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 1950, in full_dispatch_request
cern-search-rest-api | rv = self.dispatch_request()
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/app.py", line 1936, in dispatch_request
cern-search-rest-api | return self.view_functions[rule.endpoint](**req.view_args)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/views.py", line 89, in view
cern-search-rest-api | return self.dispatch_request(*args, **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_rest/views.py", line 240, in dispatch_request
cern-search-rest-api | *args, **kwargs
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/flask/views.py", line 163, in dispatch_request
cern-search-rest-api | return meth(*args, **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_records_rest/views.py", line 429, in need_record_permission_decorator
cern-search-rest-api | return f(self, record=record, *args, **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_records_rest/views.py", line 696, in post
cern-search-rest-api | record = self.record_class.create(data, id_=record_uuid)
cern-search-rest-api | File "./cern_search_rest_api/modules/cernsearch/api.py", line 119, in create
cern-search-rest-api | record = super(CernSearchRecord, cls).create(data, id_=id_, with_bucket=bucket_allowed, **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_records_files/api.py", line 322, in create
cern-search-rest-api | record = super(Record, cls).create(data, id_=id_, **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_records/api.py", line 180, in create
cern-search-rest-api | record.validate(**kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_records/api.py", line 126, in validate
cern-search-rest-api | _records_state.validate(self, self['$schema'], **kwargs)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/invenio_records/ext.py", line 41, in validate
cern-search-rest-api | **kwargs
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 932, in validate
cern-search-rest-api | error = exceptions.best_match(validator.iter_errors(instance))
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/exceptions.py", line 367, in best_match
cern-search-rest-api | best = next(errors, None)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 328, in iter_errors
cern-search-rest-api | for error in errors:
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/_validators.py", line 259, in ref
cern-search-rest-api | scope, resolved = validator.resolver.resolve(ref)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 766, in resolve
cern-search-rest-api | return url, self._remote_cache(url)
cern-search-rest-api | File "/opt/rh/rh-python36/root/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 779, in resolve_from_url
cern-search-rest-api | raise exceptions.RefResolutionError(exc)
cern-search-rest-api | jsonschema.exceptions.RefResolutionError: HTTPSConnectionPool(host='indico-sup-dev.fnal.gov', port=8080): Max retries exceeded with url: /schemas/indico/events_v1.0.0.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff301199588>: Failed to establish a new connection: [Errno -2] Name or service not known',))
cern-search-rest-api | [pid: 25|app: 0|req: 35/42] 172.25.0.1 () {44 vars in 648 bytes} [Thu Jun 25 13:36:02 2020] POST /api/records/ => generated 0 bytes in 20128 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 1)
[root@indico-sup-dev cern-search-rest-api]#