Closed ChristianKniep closed 5 years ago
On my MacBook the latest version 0.3.8-dev shows the same empty webpage. 0.3.7 works as expected... Will update my docker image to check..
On my docker images I can reproduce this error when changing to a newer version then 0.3.5. I put it in the README: https://github.com/qnib/docker-ipfs
This sounds to me like a CORS issue. where are you accessing the webui from? from outside the docker node? (e.g. the docker host?)
i think you'll need to modify CORS according to ipfs daemon --help
. let me know if we can improve the UX here, without compromising in security, and without yet going full web auth ( #1532 )
we could use /sbin/ip route | awk '/default/ { print $3 }'
in the containers to grab the ip of the docker host, and then set the CORS headers to allow just that ip
I have this issue as well.
In this example, my docker daemon where I run the IPFS container is a separate home server at 192.168.1.2. The workaround has two steps:
First, on the docker daemon, set the API and Gateway to 0.0.0.0 like this:
sudo docker exec ipfs_host ipfs config Addresses.Gateway /ip4/0.0.0.0/tcp/8080 sudo docker exec ipfs_host ipfs config Addresses.API /ip4/0.0.0.0/tcp/5001 sudo docker stop ipfs_host sudo docker start ipfs_host sudo docker logs -f ipfs_host
Wait for the log to show:
API server listening on /ip4/0.0.0.0/tcp/5001 Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080 Daemon is ready
This will allow you to see the webui on your workstation at http://192.168.1.2:5001/webui, but it will still be blank.
Second, you need to forward your local ports to the 127.0.0.1 interface on your docker daemon with SSH:
ssh -L 4001:127.0.0.1:4001 -L 5001:127.0.0.1:5001 -L 8080:127.0.0.1:8080 192.168.1.2
Once you do that, you will be able to access the webui at http://127.0.0.1:5001/webui and it will be populated with info, but it will only work as long as that SSH tunnel is open...
It seems like there may be some in the webui or API somewhere that doesn't respect the setting of 0.0.0.0?
FYI:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f6d769a8be79 ipfs/go-ipfs:latest "/sbin/tini -- /us..." About an hour ago Up 8 minutes 0.0.0.0:4001->4001/tcp, 0.0.0.0:5001->5001/tcp, 0.0.0.0:8080->8080/tcp, 4002/udp, 8081/tcp ipfs_host
Still got the same issue running the current version. :(
Have anyone solved this problem yet ?
We are working on brand new version in revamp
branch. It will support things like re-using API from IPFS Companion (which can be external one).
Stay tuned :)
@lidel I know it's strange but, my ipfs docker just worked and I really don't know why.
@lidel Emmmm, I'm not sure if it's due to some network change, yesterday I set up a local webui and it's not working, neither can I visit localhost:5001/webui
, and my code using js-ipfs-api to get id keep getting network no response error, but today it suddently worked. I can now access lots of peers via ipfs swarm peers, but there's only few peers yesterday, is this anyhow related?
And I tried to cut of my network, still working...
@StepOITD really hard to tell without doing a deep dive into intricacies of your local setup, however usual suspects are:
--net=host
) and you need to create port redirect from localhost to ipfs' IP in this new docker network -- I imagine this was broken in the past and you fixed it somehowI believe this can be closed as the issue should solved in the latest webui: https://github.com/ipfs-shipyard/ipfs-webui#configure-ipfs-api-cors-headers
Thanks!
When I start the docker image and access the webui, all content stays blank.
I build the container like this:
$ dockerbuild --rm -t ipfs .
I started it like this:The logs read like this:
The error message is rewritten each time a reload (CTRL-R) the page.
Creating a bash within the container and fireing up the following brings this: