-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Hi,
I'm using the official docker image "php:apache" to test the Skomos application (https://github.com/NatLibFi/Skosmos). This php-apache container must have access throug http to another docker container within Jena-Fuseki (https://store.docker.com/community/images/stain/jena-fuseki) running a sparql triplestore server endpoint.
The problem is that php-apache container triggers an error when trying to access the jena-fuseki container throug this URL => GET http://localhost:3030/ds/data/Biodiversite_ark :
Fatal error: Uncaught EasyRdf_Exception: Unable to connect to localhost:3030 (Connection refused) in /var/www/html/vendor/easyrdf/easyrdf/lib/EasyRdf/Http/Client.php:423 Stack trace: #0 /var/www/html/vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php(276): EasyRdf_Http_Client->request() #1 /var/www/html/vendor/easyrdf/easyrdf/lib/EasyRdf/Sparql/Client.php(120): EasyRdf_Sparql_Client->request('query', 'SELECT ?cs ?lab...') #2 /var/www/html/model/sparql/GenericSparql.php(72): EasyRdf_Sparql_Client->query('SELECT ?cs ?lab...') #3 /var/www/html/model/sparql/GenericSparql.php(653): GenericSparql->query('SELECT ?cs ?lab...') #4 /var/www/html/model/Vocabulary.php(210): GenericSparql->queryConceptSchemes('en') #5 /var/www/html/model/Vocabulary.php(227): Vocabulary->getConceptSchemes() #6 /var/www/html/model/Vocabulary.php(139): Vocabulary->getDefaultConceptScheme() #7 /var/www/html/vendor/twig/twig/lib/Twig/Template.php(680): Vocabulary->getInfo('en') #8 /tmp/skosmos-template-cache/33/33ee68b76e69dfd64d470b6af94c1e4974cd1e8211c in /var/www/html/view/vocab-shared.twig on line 9
The skosmos container logs on making http request:
skosmos | 172.18.0.1 - - [14/Oct/2017:16:48:19 +0000] "GET /Biodiversit%C3%A9_ARK/en/ HTTP/1.1" 200 1065 "http://localhost:8080/en/" "Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"
Wheras, a sparql client (e.g. YASGUI) can perfectly access the jena-fuseki container throug this URL => POST http://localhost:3030/ds/sparql
The fuseki container logs on receiving from from sparql client:
FYI:
- docker-compose.yml:
`
version: '2'
services:
fuseki:
container_name: fuseki
image: stain/jena-fuseki
ports:
- 3030:3030
environment:
- ADMIN_PASSWORD="pw"
volumes:
- ${PWD}/fuseki:/fuseki
restart: always
skosmos:
container_name: skosmos
links:
- fuseki
build:
context: .
ports:
- 8080:80
volumes:
- ${PWD}/Skosmos:/var/www/html
`
- skosmos Dockerfile (php-apache) :
FROM php:apache RUN apt-get update && apt-get install -y locales && \ locale-gen fr_FR.UTF-8 && \ a2enmod rewrite && \ docker-php-ext-install gettext mbstring
PS: here NatLibFi/Skosmos#635 is already discussed this problem from the Skosmos point of view, but seems more Network/socket related...
Thanks.