Comments (4)
Hi Lavdim,
Thx for your interest in this project.
Could you please let me know whether SPARQL Microservice works behind proxy, and what could be the fix?
I have honestly never tried it behind a proxy, although I don't see any reason why it would not work. The Flickr micro-service will simply issue a https query to Flickr's Web API, nothing more. Can you make sure port 443 is open on your proxy?
Also you may have a look at the log file, as the log directory is mounted on the docker host. See https://github.com/frmichel/sparql-micro-service/blob/master/doc/04-install.md#check-application-logs.
Let me know how it goes and we'll see from there.
In addition, if I would like to create a docker image with SPARQL Microservice installed in it, what is the entry command that should run on docker container initialization apart from starting Apache?
None. The only thing that needs to run is a properly configured Apache server. In addition to the running the Corese and MongoDB containers of course.
If you like, I can share with you the files and procedure I use to build the Docker image.
Franck.
from sparql-micro-service.
Hi Frank,
thank you for your quick response.
Actually, it seems that the proxy information should be given during the service call. So, according to this link: https://stackoverflow.com/questions/1336262/file-get-contents-behind-a-proxy , I added/changed the following code lines into the common/Utils.php file, now your docker container is working fine:
$PROXY_HOST = "proxyAdress"; // Proxy server address
$PROXY_PORT = 8080;// Proxy server port
$PROXY_USER = "username"; // Username
$PROXY_PASS = "pass"; // Password
// Username and Password are required only if your proxy server needs basic authentication
$auth = base64_encode("$PROXY_USER:$PROXY_PASS");
// Build the list of HTTP headers
$headers = array();
$headers[] = "Accept: application/json; q=0.9, */*; q=0.1";
$headers[] = "User-Agent: SPARQL-Micro-Service";
$headers[] = "Proxy-Authorization: Basic $auth";
if ($headers != null) {
foreach ($additionalHeaders as $hName => $hVal)
$headers[] = $hName . ": " . $hVal;
}
$streamContextOptions = array(
'method' => 'GET',
'header' => $headers,
'proxy' => "tcp://$PROXY_HOST:$PROXY_PORT",
'timeout' => Processor::REMOTE_TIMEOUT,
'ssl' => [
'verify_peer' => true,
'verify_peer_name' => true,
'allow_self_signed' => false
]
)
The only thing that needs to run is a properly configured Apache server.
Is there anything else which is done for configuring Apache, since I see that in your docker there are a number of environment variables which are set and there exist a number of scripts into /usr/local/bin, such as docker-php-entrypoint, etc. Also, I see that docker-php-entrypoint is run on the initialization of the docker container.
If you like, I can share with you the files and procedure I use to build the Docker image.
Would be great if you can share the Docker build file.
Lavdim
from sparql-micro-service.
Indeed you are right! I had not thought about that use case but indeed, the proxy configuration has to be made explicit at some point. Thx for the code, I'll put this into the code asap and make it part of the main configuration file.
If you like, I can share with you the files and procedure I use to build the Docker image.
Would be great if you can share the Docker build file.
Ok sure. It's not public yet, can you send me your email address?
When would you like to have that, like asap or that can wait a few days? (I'm in the middle of a conference right now... quite dense! ;)).
from sparql-micro-service.
Implemented in 0.4.2_RC.
from sparql-micro-service.
Related Issues (20)
- Document rewriting rules for HTML doc generation HOT 1
- Support for multiple values of an argument in ServiceDescription mode HOT 1
- cache_expires_after doesn't work HOT 1
- Nested calls to micro-services don't work HOT 2
- Implement paging of results from Web API
- Generate provenance information HOT 1
- Federated recursive query HOT 13
- Improve documentation HOT 2
- Support for multiple values of a custom parameter on the http query string HOT 1
- Allow different strategies for passing multiple values to the Web API HOT 1
- No triples are generated if file construct.sparql is not present HOT 1
- Support Web API with no parameter HOT 1
- Problem parsing json response of HOT 9
- Problem testing docker deployment HOT 25
- discussion: a similar project HOT 1
- How to test queries from remote HOT 7
- Microservices do not accept content type "application/x-www-form-urlencoded;charset=utf-8" HOT 5
- Error with GoogleMaps API
- Error in re-injecting parameters in the graph HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sparql-micro-service.