[ 
https://issues.apache.org/jira/browse/JENA-868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14391837#comment-14391837
 ] 

Stian Soiland-Reyes commented on JENA-868:
------------------------------------------

JENA-868 seems fixed in that I am now able to create the dataset even if I use 
-p 3032:3030 to map to a different port. Apologies for not being able to verify 
your fix earlier.

Unfortunately it seems your patch introduces a new bug when uploading data - it 
now tries to POST to:

http://localhost:3032/%5Bobject%20Object%5D/fred/data

instead of
http://localhost:3032/fred/data

Not sure where [object,Object] is from.

I must admit I don't like much either of the string approaches of 
https://github.com/apache/jena/blob/master/jena-fuseki2/jena-fuseki-core/src/main/webapp/js/app/models/fuseki-server.js#L138

but a bit more proper URI management in Javascript would require an additional 
library like https://medialize.github.io/URI.js/


> Fuseki2: Can't create datasets/ if accessing through different (non-3030) port
> ------------------------------------------------------------------------------
>
>                 Key: JENA-868
>                 URL: https://issues.apache.org/jira/browse/JENA-868
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Fuseki
>    Affects Versions: Fuseki 2.0.0
>         Environment: Docker
> https://registry.hub.docker.com/u/stain/jena-fuseki/
>            Reporter: Stian Soiland-Reyes
>            Assignee: Andy Seaborne
>            Priority: Minor
>             Fix For: Fuseki 2.0.1
>
>
> If I use docker and jena-fuseki exposing the port on something other than the 
> one it is running at, e.g. with -p 3031:3030 - then in the browser at 
> http://localhost:3031/ when I go to *Manage datasets* -> *Create dataset"* I 
> simply get "error" because it is trying to POST to 
> http://localhost:3030/datasets instead of http://localhost:3031/datasets.
> This could make it tricky to expose the Fuseki server through firewalls, web 
> servers etc, as one has to change the Fuseki port to match the public port.
> All URIs should be relative and not hard-code the port. (and not the host!)
> This is using fuseki-server.jar, I have not checked what happens if I do the 
> same through tomcat/WAR.
> The workaround is to always expose the same port - e.g. add the argument 
> --port=3031
>     docker run -p 3031:3031 stain/jena-fuseki ./fuseki-server --port=3031



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to