Lazychain / artela-rollkit

0 stars 0 forks source link

Error using cast (rpc 8545) #3

Open pablin-dev opened 1 month ago

pablin-dev commented 1 month ago

cast client

Error: 
error sending request for url (http://localhost:8545/)

Context:
- Error #0: error sending request for url (http://localhost:8545/)
- Error #1: client error (SendRequest)
- Error #2: connection closed before message completed

On the artella rollkit server:

2024/10/17 12:27:50 http: panic serving 172.16.0.15:60194: runtime error: invalid memory address or nil pointer dereference
goroutine 17821 [running]:
net/http.(*conn).serve.func1()
    /usr/local/go/src/net/http/server.go:1903 +0xbe
panic({0x45ffb40?, 0x88f50a0?})
    /usr/local/go/src/runtime/panic.go:770 +0x132
github.com/gorilla/rpc/v2/json2.(*CodecRequest).WriteError(0xc00fc06660, {0x609cf00, 0xc0017f6000}, 0x12?, {0x0?, 0x0?})
    /go/pkg/mod/github.com/gorilla/rpc@v1.2.1/v2/json2/server.go:192 +0xa5
github.com/rollkit/rollkit/rpc/json.(*handler).serveJSONRPCforWS(0xc002565f20, {0x609cf00, 0xc0017f6000}, 0xc0028cd320, 0x0)
    /go/pkg/mod/github.com/rollkit/rollkit@v0.13.6/rpc/json/handler.go:76 +0x4c2
github.com/rollkit/rollkit/rpc/json.(*handler).serveJSONRPC(...)
    /go/pkg/mod/github.com/rollkit/rollkit@v0.13.6/rpc/json/handler.go:52
net/http.HandlerFunc.ServeHTTP(0xc0016f9c70?, {0x609cf00?, 0xc0017f6000?}, 0x833bed?)
    /usr/local/go/src/net/http/server.go:2171 +0x29
net/http.(*ServeMux).ServeHTTP(0xc010005b18?, {0x609cf00, 0xc0017f6000}, 0xc0028cd320)
    /usr/local/go/src/net/http/server.go:2688 +0x1ad
github.com/rollkit/rollkit/rpc/json.(*handler).ServeHTTP(0x48d4e5?, {0x609cf00?, 0xc0017f6000?}, 0xc0017f6001?)
    /go/pkg/mod/github.com/rollkit/rollkit@v0.13.6/rpc/json/handler.go:47 +0x25
net/http.serverHandler.ServeHTTP({0x60844d8?}, {0x609cf00?, 0xc0017f6000?}, 0x6?)
    /usr/local/go/src/net/http/server.go:3142 +0x8e
net/http.(*conn).serve(0xc002e74000, {0x60b1770, 0xc003139aa0})
    /usr/local/go/src/net/http/server.go:2044 +0x5e8
created by net/http.(*Server).Serve in goroutine 109
    /usr/local/go/src/net/http/server.go:3290 +0x4b4
yarikbratashchuk commented 1 week ago

can't reproduce panic. If running artela-rollkit docker - getting:

ybratashchuk@yblocal:~/artela-rollkit$ cast client
Error:
error sending request for url (http://localhost:8545/)

Context:
- Error #0: error sending request for url (http://localhost:8545/)
- Error #1: client error (Connect)
- Error #2: tcp connect error: Connection refused (os error 61)
- Error #3: Connection refused (os error 61)

but no panic on the server side.

If building and running artela-rollkitd on local machine getting the response:

ybratashchuk@yblocal:~/artela-rollkit$ cast client
artela-rollkitd//darwin-arm64/go1.23.2

and no panic.

@pablin-dev please provide details on how you start artela