Closed kuchaguangjie closed 2 years ago
that looks like it's working for the controller, and matches what our helm setup is: https://github.com/filecoin-project/helm-charts/blob/master/charts/dealbot/templates/deployment.yaml#L229-L230
perhaps the error is about a different flag that is missing?
in particular, you haven't provided the info for how the dealbot daemon should talk to a running lotus node to make storage or retrieval deals as tasked by the controller
USAGE:
dealbot daemon [command options] [arguments...]
OPTIONS:
--data-dir value, -d value writable directory used to transfer data to node [$DEALBOT_DATA_DIRECTORY]
--node-data-dir value, -n value data-dir from relative to node's location [data-dir] [$DEALBOT_NODE_DATA_DIRECTORY]
--wallet value, -w value deal client wallet address on node [$DEALBOT_WALLET_ADDRESS]
--endpoint value, -e value HTTP endpoint of the controller [$DEALBOT_CONTROLLER_ENDPOINT]
--id value set bot worker id [$DEALBOT_ID]
--listen value, -l value host:port to bind http server on [$DEALBOT_LISTEN]
--stage-timeout value stagename=duration (example: DealAccepted=15m), DefaultRetrieval and DefaultStorage set defaults [$STAGE_TIMEOUT]
--tags value comma separated tag strings [$DEALBOT_TAGS]
--workers value number of concurrent task workers (default: 1) [$DEALBOT_WORKERS]
--minfil value min amount of fil needed (in attofil) in wallet for tasks to be popped by daemon [$DEALBOT_MIN_FIL]
--mincap value min amount of datacap needed (in bytes) in wallet for tasks to be popped by daemon [$DEALBOT_MIN_CAP]
--posthook value bash script to run when a deal finishes [$DEALBOT_POST_HOOK]
--datapointlog value file / stream to write out a json line for each task as it updates [$DEALBOT_DATAPOINT_LOG]
--help, -h show help (default: false)
Above are all the flags, @willscott do you know which flag(s) I'm missing, thanks.
this is going to be rough around the edges. i'm afraid you're going to need to look at the code.
i think it tries to find a lotus running token in home directory by default, but there is a way to specify an api to use instead for retrieval-only mode.
You mean it require the api
flag, but dealbot daemon
command doesn't support that flag? Or something else ?
I'm a bit confused, is there a working command example using command line flags to start daemon, thanks.
i believe we have used it in configurations with that flag set via env var, or where the flag is not needed because it learns it from the lotus state in the home directory, but have not run it in a configuration where it is passed on the command line
Do you know what's the env name for api
flag?
And is its value something like this: "token:/ip4/127.0.0.1/tcp/1234/http"
?
After specify api, it worked, thanks.
But, after dealbot daemon
start, when I executed lotus wallet list
, got error:
ERROR: missing permission to invoke 'WalletList' (need 'write')
Do you know what might be the cause? (I'm using local devnet), thanks.
if you can't execute lotus wallet list
on your local lotus node you aren't passing auth token to the daemon appropriately
@willscott Thanks, but I didn't specify any token when start lotus.
lotus wallet list
works before I start dealbot daemon
.
Anyway, let me do more test.
I've managed to add token together with api, now lotus wallet list
works, thanks.
Hi,
When start dealbot daemon via:
dealbot daemon -l localhost:0 -d /mnt/mars/data/dealbot/daemon/data/ -n /mnt/mars/data/dealbot/daemon/data/ --endpoint https://127.0.0.1:8764
Get error:
So, what is the correct format for
--endpoint
flag? Isn't it the--listen
flag ofdealbot controller
? Thanks.