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

Error with session provider config mysql #1681

Closed
areina opened this issue Mar 31, 2015 · 2 comments
Closed

Error with session provider config mysql #1681

areina opened this issue Mar 31, 2015 · 2 comments
Labels
Milestone

Comments

@areina
Copy link

areina commented Mar 31, 2015

Hi,
I'm trying grafana 2.0beta with mysql as a session provider and I have this error:

2015/03/31 16:02:28 [I] Completed / 500 Internal Server Error in 1.335567024s
[Macaron] PANIC: runtime error: invalid memory address or nil pointer dereference
/usr/src/go/src/runtime/panic.go:387 (0x4a9b58)
/usr/src/go/src/runtime/panic.go:42 (0x4a8e7e)
/usr/src/go/src/runtime/sigpanic_unix.go:26 (0x4af4c4)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/macaron-contrib/session/session.go:191 (0x5e745a)
/usr/src/go/src/runtime/asm_amd64.s:401 (0x4d2875)
/usr/src/go/src/reflect/value.go:419 (0x733c05)
/usr/src/go/src/reflect/value.go:296 (0x7329fc)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x7ffe67)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/context.go:113 (0x5c5ab5)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/context.go:104 (0x5c59b3)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/recovery.go:161 (0x5d7ee3)
/usr/src/go/src/runtime/asm_amd64.s:401 (0x4d2875)
/usr/src/go/src/reflect/value.go:419 (0x733c05)
/usr/src/go/src/reflect/value.go:296 (0x7329fc)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x7ffe67)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/context.go:113 (0x5c5ab5)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/context.go:104 (0x5c59b3)
/go/src/github.com/grafana/grafana/pkg/middleware/logger.go:40 (0x607b4d)
/usr/src/go/src/runtime/asm_amd64.s:402 (0x4d28e5)
/usr/src/go/src/reflect/value.go:419 (0x733c05)
/usr/src/go/src/reflect/value.go:296 (0x7329fc)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/inject/inject.go:102 (0x7ffe67)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/context.go:113 (0x5c5ab5)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/router.go:158 (0x5d93fc)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/router.go:245 (0x5d1ac8)
/go/src/github.com/grafana/grafana/Godeps/_workspace/src/github.com/Unknwon/macaron/macaron.go:171 (0x5ca57c)
/usr/src/go/src/net/http/server.go:1703 (0x5a9b2a)
/usr/src/go/src/net/http/server.go:1204 (0x5a75f7)
/usr/src/go/src/runtime/asm_amd64.s:2232 (0x4d4991)

I saw in documentation that I should create the session table before:

CREATE TABLE `session` (
    `key`       CHAR(16) NOT NULL,
    `data`      BLOB,
    `expiry`    INT(11) UNSIGNED NOT NULL,
    PRIMARY KEY (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

and I did it and still it doesn't work. I was debugging and I saw in godeps that grafana is using revision '65b8817c40cb5bdce08673a15fd2a648c2ba0e16' of macaron-contrib/session. That looks like an old version, because if you check the mysql code in that revision, column references are with 'session_' prefix:
https://github.com/macaron-contrib/session/blob/65b8817c40cb5bdce08673a15fd2a648c2ba0e16/mysql/mysql.go#L74

I tried to update manually godeps to latest version of macaron-contrib/session and after that, grafana works fine.

@torkelo torkelo added this to the 2.0-RC1 milestone Mar 31, 2015
@torkelo
Copy link
Member

torkelo commented Mar 31, 2015

Thanks for reporting this! Fixed in master, will probably push out a beta2 in a day or two.
In the mean time you can find daily builds here: http://grafana.org/download/builds (just pushed the build button so beta2 build should appear there and an updated latest package.

@areina
Copy link
Author

areina commented Mar 31, 2015

thank you!

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

No branches or pull requests

2 participants