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

bug: nwaku node fails to start without a shard flag #2644

Closed
fbarbu15 opened this issue Apr 29, 2024 · 2 comments · Fixed by #2647
Closed

bug: nwaku node fails to start without a shard flag #2644

fbarbu15 opened this issue Apr 29, 2024 · 2 comments · Fixed by #2647
Assignees
Labels
bug Something isn't working

Comments

@fbarbu15
Copy link
Contributor

Problem

Seems that shard flag was made mandatory. But I maybe it should default to 0 (like cluster id) if not passed.
And even if it's left mandatory maybe a clearer error message can be added so the node operator is aware that shard is mandatory

docker run -i -t -p 52779:52779 -p 52780:52780 -p 52781:52781 -p 52782:52782 -p 52783:52783 harbor.status.im/wakuorg/nwaku:latest --listen-address=0.0.0.0 --rest=true --rest-admin=true --websocket-support=true --log-level=TRACE --rest-relay-cache-capacity=100 --websocket-port=52781 --rest-port=52779 --tcp-port=52780 --discv5-udp-port=52782 --rest-address=0.0.0.0 --nat=extip:172.18.65.132 --peer-exchange=true --discv5-discovery=true --cluster-id=0 --metrics-server=true --metrics-server-address=0.0.0.0 --metrics-server-port=52783 --metrics-logging=true --relay=true --filter=true --nodekey=30348dd51465150e04a5d9d932c72864c8967f806cce60b5d26afeca1e77
eb68
INF 2024-04-29 06:45:51.874+00:00 Running nwaku node                         topics="wakunode main" tid=1 file=wakunode2.nim:121 version=v0.27.0-rc.0-27-g6e6cb2
INF 2024-04-29 06:45:51.874+00:00 Configuration: Enabled protocols           topics="wakunode main" tid=1 file=wakunode2.nim:29 relay=true rlnRelay=false store=false filter=true lightpush=false peerExchange=true
INF 2024-04-29 06:45:51.875+00:00 Configuration. Network                     topics="wakunode main" tid=1 file=wakunode2.nim:37 cluster=0 maxPeers=none(int)
INF 2024-04-29 06:45:51.875+00:00 Configuration. Shards                      topics="wakunode main" tid=1 file=wakunode2.nim:40 shard=/waku/2/default-waku/proto
NTC 2024-04-29 06:45:51.875+00:00 REST service started                       tid=1 file=server.nim:189 address=0.0.0.0:52779
INF 2024-04-29 06:45:51.875+00:00 Starting REST HTTP server                  tid=1 file=builder.nim:109 url=http://0.0.0.0:52779/
DBG 2024-04-29 06:45:51.875+00:00 Retrieve dynamic bootstrap nodes           topics="wakunode main" tid=1 file=app.nim:123
DBG 2024-04-29 06:45:51.875+00:00 No method for retrieving dynamic bootstrap nodes specified. topics="wakunode app" tid=1 file=app.nim:107
/app/apps/wakunode2/wakunode2.nim(137) wakunode2
/app/waku/factory/app.nim(134) init
/app/waku/factory/node_factory.nim(406) setupNode
/app/vendor/nim-chronicles/chronicles.nim(170) enrConfiguration
/app/vendor/nim-results/results.nim(906) error
/app/vendor/nim-results/results.nim(376) raiseResultDefect
Error: unhandled exception: Trying to access error when value is set: none(RelayShards) [ResultDefect]

nwaku version/commit hash

harbor.status.im/wakuorg/nwaku:latest

@fbarbu15 fbarbu15 added the bug Something isn't working label Apr 29, 2024
@alrevuelta
Copy link
Contributor

alrevuelta commented Apr 29, 2024

Agree, this should works and doesnt:

  ./build/wakunode2\
  --rest=true\
  --log-level=DEBUG\
  --relay=true\
  --cluster-id=0

But I maybe it should default to 0

I would say shard should not default to 0. Right now it defaults to all shards. Meaning this defaults to shard 0, 1, 2, 3.

./build/wakunode2\
  --rest=true\
  --log-level=DEBUG\
  --relay=true\
  --pubsub-topic=/waku/2/rs/10/0\
  --pubsub-topic=/waku/2/rs/10/1\
  --pubsub-topic=/waku/2/rs/10/2\
  --pubsub-topic=/waku/2/rs/10/3\
  --cluster-id=10\

@chaitanyaprem
Copy link
Contributor

This looks like it has been caused by my recent fix #2633 as the error is pointing to the code that was introduced.

Will take a look.

@chaitanyaprem chaitanyaprem self-assigned this Apr 29, 2024
@chaitanyaprem chaitanyaprem moved this to In Progress in Waku Apr 29, 2024
@chaitanyaprem chaitanyaprem moved this from In Progress to Code Review / QA in Waku Apr 29, 2024
@github-project-automation github-project-automation bot moved this from Code Review / QA to Done in Waku Apr 29, 2024
chaitanyaprem added a commit that referenced this issue May 3, 2024
chaitanyaprem added a commit that referenced this issue May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants