Closed matthewjmckinley closed 1 year ago
I got a variation of this error for two 7.x sites:
2022-06-10T21:36:20+00:00 ERR (3): ErrorException: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:296
Stack trace:
#0 [internal function]: Laminas\Stdlib\ErrorHandler::addError(2, 'stream_socket_c...', '/var/www/html/k...', 296, Array)
#1 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php(296): stream_socket_client('repository.muse...', 0, 'php_network_get...', 120, 4, Resource id #797)
#2 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client.php(1447): Laminas\Http\Client\Adapter\Socket->connect('repository.muse...', 443, true)
#3 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client.php(947): Laminas\Http\Client->doRequest(Object(Laminas\Uri\Http), 'GET', true, Array, '')
#4 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(354): Laminas\Http\Client->send()
#5 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(84): DspaceConnector\Job\Import->getResponseOld('https://reposit...', 'items', 0)
#6 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(67): DspaceConnector\Job\Import->importCollectionOld('https://reposit...')
#7 /var/www/html/katknow/OmekaSTesting/application/src/Job/DispatchStrategy/Synchronous.php(34): DspaceConnector\Job\Import->perform()
#8 /var/www/html/katknow/OmekaSTesting/application/src/Job/Dispatcher.php(105): Omeka\Job\DispatchStrategy\Synchronous->send(Object(Omeka\Entity\Job))
#9 /var/www/html/katknow/OmekaSTesting/application/data/scripts/perform-job.php(66): Omeka\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\Synchronous))
#10 {main}
Next ErrorException: stream_socket_client(): unable to connect to repository.museumsiam.orghttps:443 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:296
Stack trace:
#0 [internal function]: Laminas\Stdlib\ErrorHandler::addError(2, 'stream_socket_c...', '/var/www/html/k...', 296, Array)
#1 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php(296): stream_socket_client('repository.muse...', 0, 'php_network_get...', 120, 4, Resource id #797)
#2 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client.php(1447): Laminas\Http\Client\Adapter\Socket->connect('repository.muse...', 443, true)
#3 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client.php(947): Laminas\Http\Client->doRequest(Object(Laminas\Uri\Http), 'GET', true, Array, '')
#4 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(354): Laminas\Http\Client->send()
#5 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(84): DspaceConnector\Job\Import->getResponseOld('https://reposit...', 'items', 0)
#6 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(67): DspaceConnector\Job\Import->importCollectionOld('https://reposit...')
#7 /var/www/html/katknow/OmekaSTesting/application/src/Job/DispatchStrategy/Synchronous.php(34): DspaceConnector\Job\Import->perform()
#8 /var/www/html/katknow/OmekaSTesting/application/src/Job/Dispatcher.php(105): Omeka\Job\DispatchStrategy\Synchronous->send(Object(Omeka\Entity\Job))
#9 /var/www/html/katknow/OmekaSTesting/application/data/scripts/perform-job.php(66): Omeka\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\Synchronous))
#10 {main}
Next Laminas\Http\Client\Adapter\Exception\RuntimeException: Unable to connect to repository.museumsiam.orghttps:443 . Error #0: stream_socket_client(): unable to connect to repository.museumsiam.orghttps:443 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client/Adapter/Socket.php:307
Stack trace:
#0 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client.php(1447): Laminas\Http\Client\Adapter\Socket->connect('repository.muse...', 443, true)
#1 /var/www/html/katknow/OmekaSTesting/vendor/laminas/laminas-http/src/Client.php(947): Laminas\Http\Client->doRequest(Object(Laminas\Uri\Http), 'GET', true, Array, '')
#2 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(354): Laminas\Http\Client->send()
#3 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(84): DspaceConnector\Job\Import->getResponseOld('https://reposit...', 'items', 0)
#4 /var/www/html/katknow/OmekaSTesting/modules/DspaceConnector/src/Job/Import.php(67): DspaceConnector\Job\Import->importCollectionOld('https://reposit...')
#5 /var/www/html/katknow/OmekaSTesting/application/src/Job/DispatchStrategy/Synchronous.php(34): DspaceConnector\Job\Import->perform()
#6 /var/www/html/katknow/OmekaSTesting/application/src/Job/Dispatcher.php(105): Omeka\Job\DispatchStrategy\Synchronous->send(Object(Omeka\Entity\Job))
#7 /var/www/html/katknow/OmekaSTesting/application/data/scripts/perform-job.php(66): Omeka\Job\Dispatcher->send(Object(Omeka\Entity\Job), Object(Omeka\Job\DispatchStrategy\Synchronous))
#8 {main}
It also says this on the job page every time I try to run it, so I don't know if that means I need to change something on my instance:
\r\nNotice<\/b>: Undefined variable: version in \/var\/www\/html\/katknow\/OmekaSTesting\/modules\/DspaceConnector\/view\/dspace-connector\/index\/import.phtml<\/b> on line 74<\/b>
\r\n"
Whoops, that's my fault--a change to the protocol for determining whether new or old API that I didn't implement throughout the whole import process. Should be fixed in the latest commits.
I think this works really well and is good to go.
DSpace version 7.x and above introduces significant changes to the API, which means we need different code in order to import communities/collections/items into Omeka S for post-7.x DSpace versions. The new code changes in this module are meant to A) determine the DSpace version automatically by examining the
Generator
meta header tag of theDSpace Site URL
in import settings and B) use the new API to access collections and import items/files for the post-7.x DSpace instances. Please test community/collection retrieval for both 'old' and 'new' instances of DSpace.New (post-7.x) DSpace instances can be found on DSpace's user registry here: https://duraspace.org/registry/?gv_search=7.x&filter_10=DSpace&filter_4_6=&filter_3=&filter_20=&filter_28=&mode=all
Old (pre-7.x) instances can also be found in this interface as any instance with a version # below 7 https://duraspace.org/registry/
Testing Tasks
For both older and newer versions:
Get Collections & Communities
returns the correct containers, and that the formatting and titles/descriptions come through, where available.rest
toserver/api
for post-7.x instances, as noted in the dropdown./rest/collections
(for older versions) and/server/api/core/collections/
(for newer versions) example: https://research.assaf.org.za/rest/collections