deislabs / bindle

Bindle: Object Storage for Collections

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to upload invoice

VishnuJin opened this issue · comments

hey guys,

I'm facing issue in starting uploading Invoice, I followed the documentation steps to get started(This is the first time I'm trying bindle)

I cloned the current main branch make build

OS: Mac M1

Bindle version

❯ bindle-server --version                                                                                                                 ─╯
bindle-server 0.8.0

Client Logs

❯ bindle -s http://localhost:8080/v1/ push-invoice invoice.toml              ─╯
Error contacting server: The request could not be handled by the server. Verify your Bindle server URL

Server Logs

bindle-server --directory ${HOME}/.bindle/bindles --unauthenticated        ─╯
2022-02-18T14:16:09.888714Z  WARN bindle_server: No config file loaded error=failed to read TOML file /Users/vishnujin/Library/Application Support/bindle/server.toml: No such file or directory (os error 2)
2022-02-18T14:16:09.888851Z  WARN bindle_server: No keyring.toml found. Using default keyring.
2022-02-18T14:16:09.888878Z DEBUG bindle_server: No signing key file set, attempting to load from default
2022-02-18T14:16:09.889012Z  INFO bindle_server: Using verification strategy of GreedyVerification
2022-02-18T14:16:09.889763Z  INFO bindle_server: Starting server at 127.0.0.1:8080, and serving bindles from /Users/vishnujin/.bindle/bindles
2022-02-18T14:16:09.889788Z  INFO bindle_server: Using FileProvider
2022-02-18T14:16:09.889804Z DEBUG bindle::provider::file: Creating new file provider path=/Users/vishnujin/.bindle/bindles cache_size=50
2022-02-18T14:16:09.889878Z DEBUG bindle::provider::file: warming index
2022-02-18T14:16:09.889893Z  INFO bindle::provider::file: Beginning index warm path=/Users/vishnujin/.bindle/bindles
2022-02-18T14:16:09.890026Z DEBUG bindle::server: No TLS config found, starting server in HTTP mode
2022-02-18T14:16:37.710620Z  INFO request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:53284}: warp::filters::trace: processing request
2022-02-18T14:16:37.716446Z DEBUG request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:53284}: bindle::invoice::verification: No signatures on invoice id=mybindle/0.1.0
2022-02-18T14:16:37.717130Z DEBUG request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:53284}: bindle::server::reply: Parsed accept header into list accept_value=application/toml accept_items=["application/toml"]
2022-02-18T14:16:37.717167Z DEBUG request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:53284}: bindle::server::reply: Selected a best-fit MIME best_fit=application/toml
2022-02-18T14:16:37.717391Z  INFO request{method=POST path=/v1/_i version=HTTP/1.1 remote.addr=127.0.0.1:53284}: warp::filters::trace: finished processing with success status=400

Hi @VishnuJin, there may be more than one issue here. The first is the unspecific error returned by the push-invoice command. My hunch is that the error is really due to "No signatures on invoice id=mybindle/0.1.0" as seen in the bindle server logs. To test that hunch, could you try signing the invoice first and then pushing the signed invoice? Something like:

bindle sign-invoice -o signed-invoice.toml invoice.toml
bindle -s http://localhost:8080/v1/ push-invoice signed-invoice.toml

@vdice thanks !! your hunch was right, I had to create the Keys to make it work, with that I feel like our Using Bindle documentation needs little update !!

with that I feel like our Using Bindle documentation needs little update !!

@VishnuJin +1 :)