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

http: panic serving [::1]:50061: runtime error: invalid memory address or nil pointer dereference goroutine 3 [running]: #942

Open
Adebusy opened this issue Feb 15, 2020 · 1 comment

Comments

@Adebusy
Copy link

Adebusy commented Feb 15, 2020

Please how , kindly help me with solution to the below error message on Golang. Please what could be the reason for this error message and possible solution to it.

reated by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2884 +0x2f4
i am up and running.got here 1.2020/02/13 19:41:05 http: panic serving [::1]:60825: runtime error: invalid memory address or nil pointer dereference
goroutine 3 [running]:
net/http.(*conn).serve.func1(0xc0001ad040)
/usr/local/go/src/net/http/server.go:1769 +0x139
panic(0x1404960, 0x17c1fc0)
/usr/local/go/src/runtime/panic.go:522 +0x1b5
database/sql.(*DB).conn(0x0, 0x1505740, 0xc0000180c8, 0xc000053901, 0xc000053a00, 0x10621ad, 0xc0001bc428)
/usr/local/go/src/database/sql/sql.go:1080 +0x3a
database/sql.(*DB).query(0x0, 0x1505740, 0xc0000180c8, 0x147ff6d, 0x2c, 0x0, 0x0, 0x0, 0x701, 0xb, ...)
/usr/local/go/src/database/sql/sql.go:1513 +0x66
database/sql.(*DB).QueryContext(0x0, 0x1505740, 0xc0000180c8, 0x147ff6d, 0x2c, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/database/sql/sql.go:1495 +0xd1
database/sql.(*DB).Query(...)

@gilwi
Copy link

gilwi commented Feb 17, 2020

Hi there,

invalid memory address or nil pointer dereference
goroutine 3 [running]:
net/http.(*conn).serve.func1(0xc0001ad040)

This bit message specifically tells you it tried to get the value of *conn which had a nil value or an invalid address.

AFAIK your error could be related to your code, and could even not be related to this repo.

Please give us a little context so that we can "kindly help".

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

No branches or pull requests

2 participants