Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not connect to the IPFS API from WebUI at http://0.0.0.0:5001/webui #10515

Open
3 tasks done
gillbates opened this issue Sep 15, 2024 · 3 comments · May be fixed by #10520
Open
3 tasks done

Could not connect to the IPFS API from WebUI at http://0.0.0.0:5001/webui #10515

gillbates opened this issue Sep 15, 2024 · 3 comments · May be fixed by #10520
Assignees
Labels
dif/easy kind/bug A bug in existing code (including security flaws)

Comments

@gillbates
Copy link

Checklist

Installation method

built from source

Version

No response

Config

No response

Description

using the original docker-compose.yml to start. it shows

CleanShot 2024-09-15 at 17 41 17@2x

do we need some other init process for this compose?

@gillbates gillbates added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Sep 15, 2024
@lidel
Copy link
Member

lidel commented Sep 17, 2024

@gillbates i was not able to reproduce

$ > docker compose up
Attaching to kubo-ipfs-1
kubo-ipfs-1  | Changing user to ipfs
kubo-ipfs-1  | ipfs version 0.31.0-dev
kubo-ipfs-1  | generating ED25519 keypair...
kubo-ipfs-1  | done
kubo-ipfs-1  | peer identity: 12D3KooWFiiVnrcncbCmiVMbsrMyYG4CHPH75gUopvmMdnuSY7KJ
kubo-ipfs-1  | initializing IPFS node at /data/ipfs
kubo-ipfs-1  | Initializing daemon...
kubo-ipfs-1  | Kubo version: 0.31.0-dev-4236207
kubo-ipfs-1  | Repo version: 16
kubo-ipfs-1  | System version: amd64/linux
kubo-ipfs-1  | Golang version: go1.22.7
kubo-ipfs-1  | PeerID: 12D3KooWFiiVnrcncbCmiVMbsrMyYG4CHPH75gUopvmMdnuSY7KJ
kubo-ipfs-1  | Swarm listening on 127.0.0.1:4001 (TCP+UDP)
kubo-ipfs-1  | Swarm listening on [::1]:4001 (TCP+UDP)
kubo-ipfs-1  | Run 'ipfs id' to inspect announced and discovered multiaddrs of this node.
kubo-ipfs-1  | RPC API server listening on /ip4/0.0.0.0/tcp/5001
kubo-ipfs-1  | WebUI: http://0.0.0.0:5001/webui
kubo-ipfs-1  | Gateway server listening on /ip4/0.0.0.0/tcp/8080
kubo-ipfs-1  | Daemon is ready

Accessing WebUI via http://127.0.0.1:5001/webui works just fine:

2024-09-18_00-25

I guess your setup looks different?
Do you mind providing reproduction steps of your problem?

@lidel lidel added the need/author-input Needs input from the original author label Sep 17, 2024
@gillbates
Copy link
Author

@gillbates i was not able to reproduce

$ > docker compose up
Attaching to kubo-ipfs-1
kubo-ipfs-1  | Changing user to ipfs
kubo-ipfs-1  | ipfs version 0.31.0-dev
kubo-ipfs-1  | generating ED25519 keypair...
kubo-ipfs-1  | done
kubo-ipfs-1  | peer identity: 12D3KooWFiiVnrcncbCmiVMbsrMyYG4CHPH75gUopvmMdnuSY7KJ
kubo-ipfs-1  | initializing IPFS node at /data/ipfs
kubo-ipfs-1  | Initializing daemon...
kubo-ipfs-1  | Kubo version: 0.31.0-dev-4236207
kubo-ipfs-1  | Repo version: 16
kubo-ipfs-1  | System version: amd64/linux
kubo-ipfs-1  | Golang version: go1.22.7
kubo-ipfs-1  | PeerID: 12D3KooWFiiVnrcncbCmiVMbsrMyYG4CHPH75gUopvmMdnuSY7KJ
kubo-ipfs-1  | Swarm listening on 127.0.0.1:4001 (TCP+UDP)
kubo-ipfs-1  | Swarm listening on [::1]:4001 (TCP+UDP)
kubo-ipfs-1  | Run 'ipfs id' to inspect announced and discovered multiaddrs of this node.
kubo-ipfs-1  | RPC API server listening on /ip4/0.0.0.0/tcp/5001
kubo-ipfs-1  | WebUI: http://0.0.0.0:5001/webui
kubo-ipfs-1  | Gateway server listening on /ip4/0.0.0.0/tcp/8080
kubo-ipfs-1  | Daemon is ready

Accessing WebUI via http://127.0.0.1:5001/webui works just fine:

2024-09-18_00-25

I guess your setup looks different? Do you mind providing reproduction steps of your problem?

haha, I found the issue.
it works with the url: http://127.0.0.1:5001/
but it doesnot work with url: http://0.0.0.0:5001/

however the docker logs shows we should access the ipfs using http://0.0.0.0:5001/
maybe we should adjust some params in docker-compose? @lidel

@lidel lidel changed the title Could not connect to the IPFS API Docker: Could not connect to the IPFS API from WebUI at http://0.0.0.0:5001/webui Sep 18, 2024
@lidel lidel changed the title Docker: Could not connect to the IPFS API from WebUI at http://0.0.0.0:5001/webui Could not connect to the IPFS API from WebUI at http://0.0.0.0:5001/webui Sep 18, 2024
lidel added a commit that referenced this issue Sep 18, 2024
@lidel lidel linked a pull request Sep 18, 2024 that will close this issue
@lidel
Copy link
Member

lidel commented Sep 18, 2024

Ah, makes sense.

This is a cosmetic issue with text printed on daemon start.

Docker image config has all listeners, including Addresses.API set to catch-all 0.0.0.0 (here, /ip4/0.0.0.0/tcp/5001), and the WebUI URL should be normalized to useful local URL. In the past, browsers interpreted 0.0.0.0 as loopback and things "just worked", but now things break due to https being default, and also origin isolation finally doing the right thing.

Fixed in #10520, thank you for reporting this papercut.

@lidel lidel removed the need/author-input Needs input from the original author label Sep 18, 2024
@lidel lidel self-assigned this Sep 18, 2024
@lidel lidel added dif/easy and removed need/triage Needs initial labeling and prioritization labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dif/easy kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants