Failed to fetch

Hello,
I am trying to install the docker version of stardog.
The docker launched, but when I click on the http://10.203.20...:5820 I am redirected to cloud.stardog.com.

In this page, I click on "add connection", to add my local instance but it says "Failed to fetch".

If I look at the network, it looks like a a problem accessing the endpoint http://10.203.20...:5820/admin/token

When I try myself to access this endpoint directly from my browser it works (after setting username and password) and I get a token. But through the cloud page it keeps failing.

Can you help me please?

Use localhost otherwise you are making a cross origin request (from cloud.stardog.com -> your ip). Exceptions are made for localhost.

Dear @mike thank you for your answer. But I have installed stardog on a dev machine, not on my localhost (at work I am at windows and I don't have docker). I have installed stardog on a unix server with docker.
Is there a way I can bypass this limitation?

This is a browser restriction, not a Stardog one. Best thing would be to setup the server on the dev machine to use ssl.

You could also use Stardog Cloud.

If this is just for yourself you could do SSH port forwarding.

Yes that's what I did and it worked to add the stardog deployed server after I created a tunnel. But this would only work for me and not for the stakeholders of the project. How this would work in production?
In our local network we don't usually have SSL certificates. (We just use SSL when exposed to the internet).
Isn't there a chance to install the explorer / designer and studio without https in our environment?
Moreoever when I needed to add a database mongo connection, I got also an error connection... Not sure if it is due to the same problem? (again the host of the mongo server is not reacheable through internet)

Daniel, I'm sure one of our solutions consultants would be happy to talk through the options for production deployments.

It is unlikely that the errors you received while setting up the connection to Mongo are related. If you are still getting those, I recommend you open a separate post for the VG related question(s).

Daniel,

You can try setting cors.allowed.origins=http://cloud.stardog.com in your server's stardog.properties file (inside of $STARDOG_HOME) and restarting. This should allow your browser / the server to handle CORS properly.

Hi @stephen thank you very much for your answer.
I don't have a stardog.properties in that location in the docker image.
Should I just create the file? And do you know how should I restart the process in the docker ?

Thank you very much for your help

Daniel,

I was mistaken, this wasn't (strictly) a CORS issue. You're attempting to communicate from https to http, which browsers simply don't allow except for with localhost. You would need to set up ssl on your stardog server to get around that restriction. You can do so with a self-signed certificate so long as the CN of it matches your server's name/IP.

This seems a little bit complicated for an internal setup, just to try out a product? Are you sure I am doing things correctly?

it worked with the jar! thank you! meanwhile I use SSH port forwarding, but if I need to give this to customers I suppose I need to setup SSL. Is that correct?