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

Calling wakuext_peers causes a nil pointer reference #3104

Open
jakubgs opened this issue Jan 18, 2023 · 3 comments
Open

Calling wakuext_peers causes a nil pointer reference #3104

jakubgs opened this issue Jan 18, 2023 · 3 comments

Comments

@jakubgs
Copy link
Member

jakubgs commented Jan 18, 2023

I'm trying to run status-go node with Waku v2 for the new Gorush notification fleet:

But I'm getting no peers, and when I try to use wakuext_peers it just crashes:

[email protected]:~ % /docker/status-go/rpc.sh wakuext_peers
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32000,
    "message": "method handler crashed"
  }
}

And in the logs I get:

ERROR[01-18|12:57:04.306] RPC method wakuext_peers crashed: runtime error: invalid memory address or nil pointer dereference
goroutine 45460 [running]:
github.com/ethereum/go-ethereum/rpc.(*callback).call.func1()
#011/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/rpc/service.go:200 +0x89
panic({0x1dd2060, 0x38af400})
#011/usr/local/go/src/runtime/panic.go:838 +0x207
github.com/status-im/status-go/protocol.(*Messenger).Peers(...)
#011/go/src/github.com/status-im/status-go/protocol/messenger_peers.go:24
github.com/status-im/status-go/services/ext.(*PublicAPI).Peers(0x1?)
#011/go/src/github.com/status-im/status-go/services/ext/api.go:1077 +0x1a
reflect.Value.call({0xc0021e7080?, 0xc0021f7250?, 0x7f3e61ad3108?}, {0x20a1545, 0x4}, {0xc00048c450, 0x1, 0xaf8ad2?})
#011/usr/local/go/src/reflect/value.go:556 +0x845
reflect.Value.Call({0xc0021e7080?, 0xc0021f7250?, 0x0?}, {0xc00048c450, 0x1, 0x2})
#011/usr/local/go/src/reflect/value.go:339 +0xbf
github.com/ethereum/go-ethereum/rpc.(*callback).call(0xc0022560c0, {0x2713988?, 0xc0032cf300}, {0xc002bdc2a0, 0xd}, {0x3a81ee8, 0x0, 0x4d6217?})
[13:57]
#011/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/rpc/service.go:206 +0x3f0
github.com/ethereum/go-ethereum/rpc.(*handler).runMethod(0xc002bdc2b0?, {0x2713988?, 0xc0032cf300?}, 0xc0040f2000, 0x0?, {0x3a81ee8?, 0xc0022e8fa8?, 0x0?})
#011/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/rpc/handler.go:389 +0x45
github.com/ethereum/go-ethereum/rpc.(*handler).handleCall(0xc003ef42d0, 0xc00048c3f0, 0xc0040f2000)
#011/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/rpc/handler.go:337 +0x239
github.com/ethereum/go-ethereum/rpc.(*handler).handleCallMsg(0xc003ef42d0, 0xc003b8e800?, 0xc0040f2000)
#011/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/rpc/handler.go:298 +0xd1
github.com/ethereum/go-ethereum/rpc.(*handler).handleMsg.func1(0xc00048c3f0)
#011/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/rpc/handler.go:139 +0x35
github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc.func1()
#011/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/rpc/handler.go:226 +0xc5
created by github.com/ethereum/go-ethereum/rpc.(*handler).startCallProc
#011/go/src/github.com/status-im/status-go/vendor/github.com/ethereum/go-ethereum/rpc/handler.go:222 +0x8d

WARN [01-18|12:57:04.308] Served wakuext_peers                     conn=172.17.3.1:49760 reqid=1 t=2.358763ms err="method handler crashed"
@cammellos
Copy link
Contributor

@jakubgs I think messenger either hasn't started yet, or wasn't started at all (the panic should be probably fixed), but can you check if you waited either long enough (30 seconds should do, just to make sure), or whether StartMessenger was run?

@jakubgs
Copy link
Member Author

jakubgs commented Jan 18, 2023

Same thing.

@jakubgs
Copy link
Member Author

jakubgs commented Jan 18, 2023

My config:

{
  "LogLevel": "INFO",
  "IPCEnabled": true,
  "HTTPEnabled": true,
  "HTTPHost": "0.0.0.0",
  "HTTPPort": 8545,
  "MaxPeers": 5000,
  "APIModules": "eth,web3,admin,waku,wakuext",
  "DataDir": "/data",
  "EnableNTPSync": true,
  "AdvertiseAddr": "178.128.139.80",
  "NodeKey": "123qwe",
  "NetworkID": 1,
  "Rendezvous": false,
  "RegisterTopics": [ "whisper" ],
  "RequireTopics": { "whisper": { "min": 3, "max": 5 } },
  "WakuConfig": {
    "Enabled": false
  },
  "WakuV2Config": {
    "Enabled": true,
    "Port": 30504,
    "EnableDiscV5": true,
    "EnableConfirmations": false,
    "FullNode": true,
    "LightClient": false,
    "DataDir": "/data/waku"
  },
  "PushNotificationServerConfig": {
    "Enabled": true,
    "GorushURL": "https://gorush.infra.status.im"
  },
  "ClusterConfig": {
    "Enabled": true,
    "WakuNodes": [
    ],
    "DiscV5BootstrapNodes": [
      "enr:-M-4QLOTEs_ZFxCb09FgIezZd5KeTru5CWWyEtMWMN-yUABrerWxckU-pMIh3yO8VjxHpgZ4jU2WSXuK3goW4uYb6c4BgmlkgnY0gmlwhI_G-a6KbXVsdGlhZGRyc7EALzYobm9kZS0wMS5kby1hbXMzLnN0YXR1cy5wcm9kLnN0YXR1c2ltLm5ldAYBu94DiXNlY3AyNTZrMaECoVyonsTGEQvVioM562Q1fjzTb_vKD152PPIdsV7sM6SDdGNwgnZfg3VkcIIjKIV3YWt1MgM",
      "enr:-M-4QIhQjPgSnoKXLsJAxbRzF8cZYYjOfdt1ysBkibcriCvXb9lWHDiRghIv11JQltK5KYFs2zrCKoQ-_ZoRXEs5FasBgmlkgnY0gmlwhKEj9HmKbXVsdGlhZGRyc7EALzYobm9kZS0wMi5kby1hbXMzLnN0YXR1cy5wcm9kLnN0YXR1c2ltLm5ldAYBu94DiXNlY3AyNTZrMaED1AYI2Ox27DnSqf2qoih5M2fNpHFq-OzJ3thREEApdiiDdGNwgnZfg3VkcIIjKIV3YWt1MgM",
      "enr:-Nm4QPRAG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F0dXMucHJvZC5zdGF0dXNpbS5uZXQGAbveA4lzZWNwMjU2azGhAzE4YIBrPK5oT_9MvYEeggmaDd205iU4Nn1MAhU5xqY5g3RjcIJ2X4N1ZHCCIyiFd2FrdTID"
    ]
  }
}

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

No branches or pull requests

4 participants