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

DAO error when updating a plugin #570

Closed
subnetmarco opened this issue Sep 25, 2015 · 0 comments
Closed

DAO error when updating a plugin #570

subnetmarco opened this issue Sep 25, 2015 · 0 comments
Labels

Comments

@subnetmarco
Copy link
Member

I am encountering the following problem when trying to update a plugin:

2015/09/24 17:46:29 [error] 73861#0: *17 lua coroutine: runtime error: ./kong/dao/cassandra/base_dao.lua:423: attempt to index local 'old_t' (a nil value)
stack traceback:
coroutine 0:
    ./kong/dao/cassandra/base_dao.lua: in function 'fix_tables'
    ./kong/dao/cassandra/base_dao.lua:427: in function 'fix_tables'
    ./kong/dao/cassandra/base_dao.lua:454: in function 'update'
    ./kong/api/crud_helpers.lua:114: in function 'patch'
    ./kong/api/routes/apis.lua:87: in function <./kong/api/routes/apis.lua:86>
coroutine 1:
    [C]: in function 'resume'
    /usr/local/share/lua/5.1/lapis/application.lua:652: in function 'handler'
    /usr/local/share/lua/5.1/lapis/application.lua:393: in function 'resolve'
    /usr/local/share/lua/5.1/lapis/application.lua:402: in function </usr/local/share/lua/5.1/lapis/application.lua:400>
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1/lapis/application.lua:400: in function 'dispatch'
    /usr/local/share/lua/5.1/lapis/nginx.lua:181: in function 'serve'
    content_by_lua(nginx.conf:136):8: in function <content_by_lua(nginx.conf:136):1>, client: 127.0.0.1, server: , request: "PATCH /apis/hello.com/plugins/34f70cdb-e5bf-4e67-cea7-fbccada6d3ff HTTP/1.1", host: "127.0.0.1:8001"
2015/09/24 17:46:29 [error] 73861#0: *17 [lua] app.lua:113: handle_error(): /usr/local/share/lua/5.1/lapis/application.lua:655: ./kong/dao/cassandra/base_dao.lua:423: attempt to index local 'old_t' (a nil value)
stack traceback:
    ./kong/dao/cassandra/base_dao.lua: in function 'fix_tables'
    ./kong/dao/cassandra/base_dao.lua:427: in function 'fix_tables'
    ./kong/dao/cassandra/base_dao.lua:454: in function 'update'
    ./kong/api/crud_helpers.lua:114: in function 'patch'
    ./kong/api/routes/apis.lua:87: in function <./kong/api/routes/apis.lua:86>

stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/lapis/application.lua:655: in function 'handler'
    /usr/local/share/lua/5.1/lapis/application.lua:393: in function 'resolve'
    /usr/local/share/lua/5.1/lapis/application.lua:402: in function </usr/local/share/lua/5.1/lapis/application.lua:400>
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1/lapis/application.lua:400: in function 'dispatch'
    /usr/local/share/lua/5.1/lapis/nginx.lua:181: in function 'serve'
    content_by_lua(nginx.conf:136):8: in function <content_by_lua(nginx.conf:136):1>, client: 127.0.0.1, server: , request: "PATCH /apis/hello.com/plugins/34f70cdb-e5bf-4e67-cea7-fbccada6d3ff HTTP/1.1", host: "127.0.0.1:8001"

Steps to reproduce:

  • Add an API
curl -d "request_host=hello.com&upstream_url=http://httpbin.org" 127.0.0.1:8001/apis
  • Add an empty request transformation plugin
curl -d "name=request-transformer" 127.0.0.1:8001/apis/hello.com/plugins/
  • Update the transformation plugin with a config
curl -X PATCH -d "name=request-transformer&config.add.headers=pippo:wot, host:marco.com" 127.0.0.1:8001/apis/hello.com/plugins/{plugin_id}
@subnetmarco subnetmarco changed the title DAO when updating a plugin DAO error when updating a plugin Sep 25, 2015
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

1 participant