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

docker image: btfs resolve -r /btns/blabla/: could not resolve name #21

Closed
solipsist01 opened this issue Dec 25, 2021 · 12 comments
Closed

Comments

@solipsist01
Copy link

Hello.

I'm testing the docker image of btfs 2.0.
In no way i'm able to successfully visit the webinterface.

Both webui and hostui give the same error.

I'm reverse proxying the webinterface with traefik (as i also do with 1.6)

i set the node up successfully, and gave the address test tokens
https://testfaucet.bt.io/#/

The port forward 4002/tcp+udp has been done correctly. (4001 is in use already)

Changing user to btfs
btfs version 2.0.0
Found BTFS fs-repo at /data/btfs
Initializing daemon...
go-btfs version: 2.0.0-4fd04f0
Repo version: 10
System version: amd64/linux
Golang version: go1.16.12
Repo location: /data/btfs
Peer identity: 16Uiu2HAkzYNxmpuRNkczDPRNR57hFNCP2Gvk7RjnjTnnjb2hwE29
the private key of wallet import format is:  142a5763c17b09f6095531364c83bb545f2eb4e36c801c3ed2feb48f6222c9c0
the address of Bttc format is:  0xa77cb7Bcd2DF62D0b9E7dAA93d4C5f20c4C2e38A
the address of Tron format is:  TREoFdjTZgiqiF8ZNWSFFwb4YHZsTVwdVZ
self vault: 0xb09addfb7af4e4501b533cd7a9c0e67ef88244d9
Swarm listening on /ip4/127.0.0.1/tcp/4002
Swarm listening on /ip4/172.19.0.59/tcp/4002
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4002
Swarm announcing /ip4/172.19.0.59/tcp/4002
Swarm announcing /ip4/mywanip/tcp/4002
API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui
HostUI: http://0.0.0.0:5001/hostui
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
Remote API server listening on /ip4/127.0.0.1/tcp/5101
Daemon is ready

i have done the following to try to solve the problem.
run this inside the container:

btfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
btfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT","GET","POST"]'
btfs config profile apply storage-host-testnet

i can't get the webinterface to work :) i'm getting this error:
btfs resolve -r /btns/16Uiu2HAmU9ysnuasmdyq1rRePYTwHntmyhZdfC9wm4qCPQMAh9Qq/: could not resolve name

Is there anything that I'm doing wrong, or, is there anything i can do to help with this issue.
Thanks.

@daniel-tron
Copy link
Contributor

@solipsist01
Copy link
Author

solipsist01 commented Dec 27, 2021

i can visit 5001/webui on my 1.6 host no problem :) also through my reverse proxy.

I don't know why, but my current container with btns solutions started working.
I can now visit the webinterface.

i'm building the commit with btfs solution as we speak to test that as well.

I have however one issue (sorry ;))

When i visit the interface through the reverse proxy, it cannot reach the api.
when i visit the interface internally, i can use the interface by putting http://btfstest:5001 as api url.

i would think http://btfstest:5001 should work through the reverse proxy, but not if the dashboard is an 'app' which needs a direct network connection to the api.

in that case i would need https://btfstest.hostname.com as api url.
http://btfstest:5001 is reverse proxied as https://btfstest.hostname.com so it should be able to reach the api that way.

the webinterface however says that the URL format is wrong.

image

@daniel-tron
Copy link
Contributor

the btns issue, i guess the node need some time to connect or recognized the seed node, anyway we will use the commit next version since it more stable.

the api issue, i will do some testing about reverse proxy and https architecture. dashboard (hostui) is used to manage local node, so the setting in configuration file is 127.0.0.1 ("API": "/ip4/127.0.0.1/tcp/5001"), maybe this is the reason. just be careful cause expose api to public will also public private key and upload file feature.

the api url format issue, i will discuss with front-end engineer.

@solipsist01
Copy link
Author

Thank you very much :)

in 1.6, the CORS settings allows for reaching the API from any source you want.
i'm also able to visit http://btfstest:5001 from 'another host', and that wouldn't work if only 127.0.0.1 would work.

api url format has a high probability i think :)

@daniel-tron
Copy link
Contributor

daniel-tron commented Dec 27, 2021

about api url format issue, you can temporary modify the check logic line 51, or use my private build directly (you can pin to your node in case my node offline).

other connection issue, i used vm + reverse proxy, seem the only factor is api ip mentioned in previous comment, no matter http/https, directly/reverse proxy, all successful when i use 0.0.0.0 (not advise), and all failed if use 127.0.01 for non-local node.

@solipsist01
Copy link
Author

solipsist01 commented Dec 27, 2021

Your private build works for me. :) so its definately urlcheck function

@daddydaycare
Copy link

Other threads closed.. so responding to this. I have this same issue on multiple distros. The work around to get to dashboard does not solve the problem that node is not connecting.. so choice is to have daemon running and get the resolving error going to internal link, or your workaround that goes to public dashboard taht says not connecting.. then what?

@solipsist01
Copy link
Author

There are commits that solve these issues in a future release.
Until then you can use the other dashboard.

@daddydaycare
Copy link

what other dashboard? this is a vicious loop. cant resolve, so you say use other dashboard, that otherdashboard says node not connected.. How about complete that step instead of going in circles? Like to be part of this but doesnt seem ready and the writeups and feedback loops is circular presently.. cant progress past cirtan point and all enquires into it, just go in same cirlce.

@solipsist01
Copy link
Author

I was talking about the private build of daniel-tron. (https://gateway-test.btfs.io/btfs/QmdzDohKocMhFvKKQhanVDk9gnczcXCHLKvynks4XDseKw)

That build doesn't work anymore for me either, so i guess he rebuilt it to test something else.

Just wait until 2.01 or so is released, or build it yourself with the fixes mentioned in this topic...

olenheim pushed a commit that referenced this issue Jan 7, 2022
* feat: btfs deposit (#14)

* fix: remove useless log (#18)

* chore: use go 1.16 when build docker image (#16,#19)

* chore: remove build-in hostui (#20)

* chore: make hostui use btfs instead of btns (#21)

* style: optimize deposit cmd output (#23)

Co-authored-by: ken.sun <ken.sun@tron.network>

* fix: delete unused cmd and features (#22)

* fix: delete unuse cmd and features

* fix: fix mode

* fix:fix test_go_test

* fix: test_go_test

* fix: modify interface of price oracle to support big number (#26)

* fix price-precision: modify interface of price oracle to support big number

* fix(price): update routines concurrency logic (#31)

* chore: update dashboard version

* version 2.0.1

Co-authored-by: rockca <86341157+rockca@users.noreply.github.com>
Co-authored-by: sunbx <sunbenxin007@gmail.com>
Co-authored-by: Daniel Wang <daniel.wang@tron.network>
Co-authored-by: ken.sun <ken.sun@tron.network>
Co-authored-by: laocheng-cheng <73106671+laocheng-cheng@users.noreply.github.com>
Co-authored-by: Daniel Wang <3644140+daniel-tron@users.noreply.github.com>
@daniel-tron
Copy link
Contributor

daniel-tron commented Jan 7, 2022

welcome to try the v2.0.1, "resolve btns issue" should disappeared since we are using btfs now.

@daniel-tron
Copy link
Contributor

what other dashboard? this is a vicious loop. cant resolve, so you say use other dashboard, that otherdashboard says node not connected.. How about complete that step instead of going in circles? Like to be part of this but doesnt seem ready and the writeups and feedback loops is circular presently.. cant progress past cirtan point and all enquires into it, just go in same cirlce.

can't connect api may have following reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants