dennis-tra / nebula

🌌 A network agnostic DHT crawler, monitor, and measurement tool that exposes timely information about DHT networks.
Apache License 2.0
294 stars 30 forks source link

ERRO[0000] error: flag provided but not defined: -json-out #41

Closed ckarapapas closed 11 months ago

ckarapapas commented 11 months ago

Hi! Running nebula crawl --json-out + dir i am having the abovementioned response (ERRO[0000] error: flag provided but not defined: -json-out ). Any ideas? Thanks! ++ I tried postgres to avoid json. After running the docker image i get the following error: creating crawl in db: models: unable to insert into crawls: pq: relation "crawls" does not exist) and from the postgres' side: 2023-10-11 08:47:04.973 UTC [70] ERROR: relation "crawls" does not exist at character 13

dennis-tra commented 11 months ago

Hi Christos :)

that's odd :/ could you paste the full command you tried to run?

Could you also verify that your nebula binary isn't an old one? I have added the json-out flag only recently

ckarapapas commented 11 months ago

Hi Dennis :) This is the full command: ./nebula crawl --json-out /home/christos/Desktop/output/ inside the go/bin directory. ++ I installed it today through go install github.com/dennis-tra/nebula-crawler/cmd/nebula@latest

dennis-tra commented 11 months ago

okay, weird 🤔

I have just done the following:

  1. deleted my nebula binary from $GOPATH/bin
  2. Ran go install github.com/dennis-tra/nebula-crawler/cmd/nebula@latest
  3. Ran nebula crawl --json-out .

This is working for me. What is the output of nebula crawl --help? Mine prints:

NAME:
   nebula crawl - Crawls the entire network starting with a set of bootstrap nodes.

USAGE:
   nebula crawl [command options] [arguments...]

OPTIONS:
   --bootstrap-peers value [ --bootstrap-peers value ]  Comma separated list of multi addresses of bootstrap peers (default: default IPFS) [$NEBULA_CRAWL_BOOTSTRAP_PEERS, $NEBULA_BOOTSTRAP_PEERS]
   --protocols value [ --protocols value ]              Comma separated list of protocols that this crawler should look for [$NEBULA_CRAWL_PROTOCOLS, $NEBULA_PROTOCOLS]
   --workers value                                      How many concurrent workers should dial and crawl peers. (default: 1000) [$NEBULA_CRAWL_WORKER_COUNT]
   --limit value                                        Only crawl the specified amount of peers (0 for unlimited) (default: 0) [$NEBULA_CRAWL_PEER_LIMIT]
   --dry-run                                            Don't persist anything (default: false) [$NEBULA_CRAWL_DRY_RUN]
   --json-out DIR                                       If set, stores the crawl results as JSON documents at DIR (takes precedence over database settings). [$NEBULA_CRAWL_JSON_OUT]
   --neighbors                                          Whether to persist all k-bucket entries of a particular peer at the end of a crawl. (default: false) [$NEBULA_CRAWL_NEIGHBORS]
   --check-exposed                                      Whether to check if the Kubo API is exposed. Checking also includes crawling the API. (default: false) [$NEBULA_CRAWL_CHECK_EXPOSED]
   --network value                                      Which network should be crawled (IPFS, FILECOIN, KUSAMA, POLKADOT). Presets default bootstrap peers and protocol. (default: "IPFS") [$NEBULA_CRAWL_NETWORK]
   --help, -h                                           show help

Does the list of flags contain the --json-out option?

ckarapapas commented 11 months ago

Did you also get the following error:

github.com/quic-go/quic-go/internal/qtls

../pkg/mod/github.com/quic-go/quic-go@v0.33.0/internal/qtls/go121.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.21 yet. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.21 yet. F...) as int value in variable declaration

dennis-tra commented 11 months ago

Did you also get the following error:

github.com/quic-go/quic-go/internal/qtls ../pkg/mod/github.com/quic-go/quic-go@v0.33.0/internal/qtls/go121.go:5:13: cannot use "The version of quic-go you're using can't be built on Go 1.21 yet. For more details, please see https://github.com/quic-go/quic-go/wiki/quic-go-and-Go-versions." (untyped string constant "The version of quic-go you're using can't be built on Go 1.21 yet. F...) as int value in variable declaration

yeah, you can't build Nebula with Go 1.21 yet :/ I would need to update the dependencies. If you have the chance to use Go 1.20 that should work.

ckarapapas commented 11 months ago

Yes! It does work :)