# Failed to fetch

**URL:** <https://community.stardog.com/t/failed-to-fetch/3752>\
**Category:** Support\
**Created:** [May 19, 2022, 9:31am UTC](https://community.stardog.com/t/failed-to-fetch/3752 "2022-05-19T09:31:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Teixeira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/daniel_teixeira/32/1429_2.png) [@Daniel\_Teixeira](https://community.stardog.com/u/Daniel_Teixeira)\
**Post date:** [May 19, 2022, 9:31am UTC](https://community.stardog.com/t/failed-to-fetch/3752/1 "2022-05-19T09:31:44Z")

</div>

Hello,  
I am trying to install the docker version of stardog.  
The docker launched, but when I click on the [http://10.203.20](http://10.203.20)...:5820 I am redirected to [cloud.stardog.com](http://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](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](https://cloud.stardog.com/get-started) it keeps failing.

 ![stardog](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/8/88fe1cbe5daee15c1bc6afaac8236f980e139d4d.png)

Can you help me please?

---

<div class="post-metadata">

**Author:** ![mike](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mike/32/14_2.png) [@mike](https://community.stardog.com/u/mike)\
**Post date:** [May 19, 2022, 1:04pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/2 "2022-05-19T13:04:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Daniel\_Teixeira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/daniel_teixeira/32/1429_2.png) [@Daniel\_Teixeira](https://community.stardog.com/u/Daniel_Teixeira)\
**Post date:** [May 19, 2022, 10:33pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/3 "2022-05-19T22:33:26Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mike](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mike/32/14_2.png) [@mike](https://community.stardog.com/u/mike)\
**Post date:** [May 20, 2022, 11:18am UTC](https://community.stardog.com/t/failed-to-fetch/3752/4 "2022-05-20T11:18:38Z")

</div>

This is a browser restriction, not a Stardog one. Best thing would be to setup the server on the dev machine to [use ssl](https://docs.stardog.com/operating-stardog/security/encryption-in-transit).

You could also [use Stardog Cloud](https://cloud.stardog.com/get-started/).

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [May 20, 2022, 11:52am UTC](https://community.stardog.com/t/failed-to-fetch/3752/5 "2022-05-20T11:52:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Daniel\_Teixeira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/daniel_teixeira/32/1429_2.png) [@Daniel\_Teixeira](https://community.stardog.com/u/Daniel_Teixeira)\
**Post date:** [May 22, 2022, 3:40pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/6 "2022-05-22T15:40:48Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![mike](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mike/32/14_2.png) [@mike](https://community.stardog.com/u/mike)\
**Post date:** [May 23, 2022, 11:12am UTC](https://community.stardog.com/t/failed-to-fetch/3752/7 "2022-05-23T11:12:35Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [May 23, 2022, 1:18pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/8 "2022-05-23T13:18:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Daniel\_Teixeira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/daniel_teixeira/32/1429_2.png) [@Daniel\_Teixeira](https://community.stardog.com/u/Daniel_Teixeira)\
**Post date:** [May 23, 2022, 2:22pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/9 "2022-05-23T14:22:05Z")

</div>

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 ?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/1/172492770912f526ea0d95627ad3f8fe6b9580cb.png)

Thank you very much for your help

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [May 23, 2022, 3:22pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/10 "2022-05-23T15:22:58Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Daniel\_Teixeira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/daniel_teixeira/32/1429_2.png) [@Daniel\_Teixeira](https://community.stardog.com/u/Daniel_Teixeira)\
**Post date:** [May 23, 2022, 8:29pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/11 "2022-05-23T20:29:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Daniel\_Teixeira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/daniel_teixeira/32/1429_2.png) [@Daniel\_Teixeira](https://community.stardog.com/u/Daniel_Teixeira)\
**Post date:** [May 23, 2022, 10:52pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/12 "2022-05-23T22:52:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [May 31, 2022, 2:38am UTC](https://community.stardog.com/t/failed-to-fetch/3752/13 "2022-05-31T02:38:59Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [June 9, 2022, 6:16am UTC](https://community.stardog.com/t/failed-to-fetch/3752/14 "2022-06-09T06:16:11Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [June 20, 2022, 1:42am UTC](https://community.stardog.com/t/failed-to-fetch/3752/15 "2022-06-20T01:42:20Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [June 30, 2022, 9:32pm UTC](https://community.stardog.com/t/failed-to-fetch/3752/16 "2022-06-30T21:32:25Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [July 12, 2022, 1:52am UTC](https://community.stardog.com/t/failed-to-fetch/3752/17 "2022-07-12T01:52:06Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [July 23, 2022, 5:43am UTC](https://community.stardog.com/t/failed-to-fetch/3752/18 "2022-07-23T05:43:29Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [August 5, 2022, 11:03am UTC](https://community.stardog.com/t/failed-to-fetch/3752/19 "2022-08-05T11:03:41Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [August 19, 2022, 7:09am UTC](https://community.stardog.com/t/failed-to-fetch/3752/20 "2022-08-19T07:09:24Z")

</div>



[Next page](https://community.stardog.com/t/failed-to-fetch/3752.md?page=2)
