Closed miledrousset closed 3 years ago
I cannot reproduce the error. PACTOLS works for me. What exact steps did you take to encounter the error?
Here are the steps: I installed OmekaS version 3.0.2, and the valueSuggest module version 1.8.0 I created a template with a field (subject), I chose the data type (pactols subject). I added a new Item, then selected the prepared template. By entering values in the (Subject) field, I don't have autocompletion, but rather a security error in the header: Strict-origin-when-cross-origin referrer policy
Using a web browser, the query works fine https://pactols.frantiq.fr/opentheso/api/search?q=vase&lang=fr&theso=TH_1&format=jsonld
The same problem occurs with the source: Homosaurus
Check your PHP error log. A 500 Internal Server Error
suggests there was an error when making the proxy request. That error would have been logged. If the module worked before, perhaps your server environment changed in the meantime.
Hello, I am a little desperate, I have tried everything, but I still have the same error! The logs do not give anything since the connection is not made, my program does not receive the request, it is rejected before. You say that (for you it works), I'm amazed, I also have the same problem for (Homosaurus). Could you describe to me your test environment? (I have attached a screenshot to show that if I go through a program independent of ValueSuggest, everything works fine) Thank you
It appears that a connection is made and your server responds with a 500 Internal Server Error
. PHP usually logs those errors. In your browser's debugger, after getting a 500 error, click on "Réponse" and see if there's an error message somewhere in the response.
Here is the error message in (response).
I am using version (7.4.16) of PHP. I have no error message in the logs
Please follow these directions to retrieve error messages. Once you've done that you should get a more helpful message that should explain the error.
here is the error message after switching to development mode
Laminas\Http\Client\Adapter\Exception\RuntimeException Unable to enable crypto on TCP connection pactols.frantiq.fr: make sure the "sslcafile" or "sslcapath" option are properly set for the environment.
Details:
ErrorException: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /Applications/MAMP/htdocs/omeka-s/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:320 Stack trace:
Next Laminas\Http\Client\Adapter\Exception\RuntimeException: Unable to enable crypto on TCP connection pactols.frantiq.fr: make sure the "sslcafile" or "sslcapath" option are properly set for the environment. in /Applications/MAMP/htdocs/omeka-s/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:350 Stack trace:
Omeka S version 3.0.2
2021-08-31T10:40:56+00:00 ERR (3): ErrorException: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /Applications/MAMP/htdocs/omeka-s/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:320 Stack trace:
Next Laminas\Http\Client\Adapter\Exception\RuntimeException: Unable to enable crypto on TCP connection pactols.frantiq.fr: make sure the "sslcafile" or "sslcapath" option are properly set for the environment. in /Applications/MAMP/htdocs/omeka-s/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:350 Stack trace:
If the module worked before and then stopped working, either your server environment has changed or both PACTOLS and Homosaurus switched to using SSL in the meantime. You'll probably need to configure Omeka's HTTP client to use your server's SSL certificate. Your server administrator should know where the certificate it.
Okay, thank you for this conclusion, so the problem needs to be resolved on our side, we have effectively switched to https. One last question before closing this thread, could you confirm that it works on your side the connection with PACTOLS and Homosaurus?
PACTOLS continues to work for me, but I have encountered a problem with Homosaurus (in my server environment, at least). It appears that the service is using weak SSL settings and Omeka's HTTP client is refusing to connect. This is probably something that Homosaurus should correct on their side, as we've never encountered this on another server.
I've made a temporary fix by including the following code in ValueSuggest\Suggester\Homosaurus\HomosaurusSuggest::__construct()
:
$adapter = $client->getAdapter();
$adapter->setStreamContext([
'ssl' => [
'ciphers' => 'DEFAULT@SECLEVEL=1',
],
]);
You could try this and see if it works, but note that you are getting a different error than I was. Your error:
OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed
My error (fixed by the code above):
OpenSSL Error messages: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small
Thank you for your answers and your availability, I will close the thread. I am not administering the Homosaurus server, I used it as an example which was not working. I only manage PACTOLS.
@jimsafley @miledrousset -> Homosaurus has been made aware of this issue and I've created a new issue to track it at: https://github.com/DigitalTransgenderArchive/homosaurus_site/issues/6
We will update that location once we have resolved things hopefully in the next week or two regarding SSL certificate issues.
Hello, I think that since the passage to the module (Laminas \ Http \ Client), the search in the PACTOLS thesaurus no longer passes, I have an error (state 500 Internal Server Error VersionHTTP / 1.1 Referent policy (strict-origin-when-cross-origin).
My REST API services (java) do return a header ("Access-Control-Allow-Origin", "*").
Could you tell me what I need to correct? on the REST API side or in ValueSuggest?
here is an example of a query : pactols.frantiq.fr/opentheso/api/search?q=amphore&lang=fr&theso=TH_1&format=jsonld
Thank you