Closed wmelder closed 1 year ago
so, the lod_view is using the triple store. Apparently, the resource is not yet imported and therefor an http error was raised. So, this is intended behaviour for a resource that is not in the triple store.
The curl request returns a forbidden 403 rsponse, because the lod-server requires authentication... This way, resources that are not allowed to be published aren't. Given valid credentials this should work:
curl -v -L -H "Accept: application/ld+json" -u "user:password" http://data.beeldengeluid.nl/id/season/2101810140249631831
But, in fact, using proper credentials, it doesn't work. => Asked Martijn if the config is right for the current lod server. => Confimred that the credentials are loaded. Apparently, the error is 500, not 403. But not clear why and how this occurs.
er moet meer logging in de lod-server, anders kunnen we niet zien waarom dingen fout gaan.
nieuwe logging ingebouwd en draait op localhost... dit is het request:
curl -L -H "Accept: application/ld+json" --user user:passwd http://127.0.0.1:5000/id/season/2101812250251768531
En dan krijg je onderstaande logs:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='flexstore.beng.nl', port=1234): Max retries exceeded with url: /storage/season/2101812250251768531 (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fe8c349bb20>: Failed to establish a new connection: [Errno 110] Connection timed out'))
2022-11-15 13:45:19,744|ERROR|5966|StorageLODHandler|get_storage_record|56|Exception
Traceback (most recent call last):
File "/home/wmelder/git/beng-lod-server/src/apis/resource/StorageLODHandler.py", line 42, in get_storage_record
data = self._storage_2_lod(url, return_format, use_file_logger)
File "/home/wmelder/git/beng-lod-server/src/apis/resource/StorageLODHandler.py", line 115, in _storage_2_lod
assert isinstance(json_data, dict), "No valid results from the flex store."
AssertionError: No valid results from the flex store.
2022-11-15 13:45:19,745|DEBUG|5966|resource_api|_get_lod_resource|161|Something wrong with response from the flex data store: 500
127.0.0.1 - - [15/Nov/2022 13:45:19] "GET /id/season/2101812250251768531 HTTP/1.1" 500 -
2022-11-15 13:45:19,748|INFO|5966|_internal|_log|224|127.0.0.1 - - [15/Nov/2022 13:45:19] "GET /id/season/2101812250251768531 HTTP/1.1" 500 -
lod-importer log shows:
curl shows resource is forbidden:
the flex data store /storage api does provide an item:
Via de OAI-PMH provider is het record op te halen:
But, first time I needed to log in with studio credentials.