I have created a resource template and associated several elements with a Value Suggest data type. However, when keying a value into one of these fields, the auto-suggest feature does not appear to load suggestions. In troubleshooting this, I have tried multiple controlled vocabularies just to rule out issues with a specific vocab, but the issue seems to persist regardless.
When inspecting the browser’s console during input into one of these fields, I notice that it is generating an HTTP 500 status error like when sending a query to the endpoint. Here’s an example of the URL (without the domain) that is resulting in the error:
/admin/value-suggest/proxy?query=Smith&type=valuesuggest%3Agetty%3Aulan&lang=&property_id=6&resource_template_id=12&resource_class_id=32
In reviewing posts about similar symptoms on the forum, I’ve seen reference to “server-side changes” and also to configuration changes to Laminas http client adapters, but none offer specifics on what changes resolved the issue.
Thanks for any guidance!
Omeka-S version: 4.1.1
Value Suggest version: 1.17.1
I can’t reproduce the issue using the same versions. I’ll need more information about the error before I can troubleshoot. Enable logging, reproduce the error, and paste the error message here.
After enable logging, I’m seeing this more helpful error:
2024-11-12T17:01:02+00:00 ERR (3): ErrorException: stream_socket_client(): Unable to connect to vocab.getty.edu:80 (Connection timed out) in /var/www/omeka/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:323
Stack trace:
#0 [internal function]: Laminas\Stdlib\ErrorHandler::addError()
#1 /var/www/omeka/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php(323): stream_socket_client()
#2 /var/www/omeka/vendor/laminas/laminas-http/src/Client.php(1465): Laminas\Http\Client\Adapter\Socket->connect()
#3 /var/www/omeka/vendor/laminas/laminas-http/src/Client.php(965): Laminas\Http\Client->doRequest()
#4 /var/www/omeka/modules/ValueSuggest/src/Suggester/Getty/Sparql.php(65): Laminas\Http\Client->send()
#5 /var/www/omeka/modules/ValueSuggest/src/Controller/IndexController.php(62): ValueSuggest\Suggester\Getty\Sparql->getSuggestions()
#6 /var/www/omeka/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): ValueSuggest\Controller\IndexController->proxyAction()
#7 /var/www/omeka/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch()
#8 /var/www/omeka/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#9 /var/www/omeka/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil()
#10 /var/www/omeka/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch()
#11 /var/www/omeka/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch()
#12 /var/www/omeka/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners()
#13 /var/www/omeka/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil()
#14 /var/www/omeka/index.php(21): Laminas\Mvc\Application->run()
#15 {main}
Your server’s connection to the Getty server is timing out. It could be an intermittent problem with Getty, or it could be that your server is unable to connect to external servers for some reason. You mention that this happens regardless of which ValueSuggest data type you choose, so the latter is most likely. Speak with your server admin about reasons why your server may be having trouble connecting to other servers.
Thank you. I’ve shared this with the colleague who manages the server on which Omeka is running, and he confirmed that egress traffic on that server is indeed restricted and must go through a proxy. We don’t yet have it running, but I think we’re on the right track. If there’s any additional detail I can offer once we’ve solved the issue, I’ll post it here in case others encounter a similar roadblock.
Just wanted to share the change we made to resolve this issue. I modified the configuration for our http-client adapter in our local.config.php file:
I changed this:
'http_client' => [
'sslcapath' => null,
'sslcafile' => null,
]
To the following, substituting the host and port with the specific hostname and port provided by our server admin:
'http_client' => [
'adapter' => \Laminas\Http\Client\Adapter\Proxy::class,
'proxy_host' => 'PROXY_SERVER_HOSTNAME',
'proxy_port' => 'PROXY_PORT',
]
1 Like