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 compiling script #39

Closed
ppontryagin opened this issue May 22, 2018 · 3 comments
Closed

Error compiling script #39

ppontryagin opened this issue May 22, 2018 · 3 comments

Comments

@ppontryagin
Copy link

  1. I start redis server:
redisServer, err = miniredis.Run()
redisServer.RequireAuth(redisPassword)
  1. Create a connection:
conn, err := redigo.Dial("tcp", addr, redigo.DialPassword(redisPassword),
					redigo.DialConnectTimeout(5*time.Second))
  1. Create a stored procedure:
const getScript = `
return redis.call("GET",KEYS[1])
`
storedProcGet = redis.NewScript(1, getScript)
  1. And when I execute it:
    _, err = storedProcGet.Do(conn, "key")

I get:

ERR Error compiling script (new function): <string>:2: NOAUTH Authentication required. stack traceback: [G]: in function 'call' <

However if I disable authentication or use real Redis, everything is fine.

Could you please look at that?

alicebob added a commit that referenced this issue May 22, 2018
@alicebob
Copy link
Owner

Thanks for the clear bugreport!

I fixed it in the luaauth branch, please have a look whether that solves it for you as well.

@ppontryagin
Copy link
Author

ppontryagin commented May 22, 2018

Thank you, it helps!
👍

@alicebob
Copy link
Owner

merged, thanks again! Let me know if you have other problems with the Lua integration. It's rather new code.

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