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 on upload files via kong proxy #1067

Closed
jl91 opened this issue Mar 10, 2016 · 8 comments
Closed

Error on upload files via kong proxy #1067

jl91 opened this issue Mar 10, 2016 · 8 comments
Assignees
Labels

Comments

@jl91
Copy link

jl91 commented Mar 10, 2016

kong throwing error "An unexpected error occurred" with server 500 when we try to upload a file via kong proxy with post. We identitf that this error occurs when kong try to merge the request in

kong/plugins/oauth2.lua

in line 94
return utils.table_merge(ngx.req.get_uri_args(), ngx.req.get_post_args())

this error dont happen if we change this line for this another line

return ngx.req.get_uri_args()

In my error log i have this

coroutine 0:
[C]: in function 'get_post_args'
/usr/local/share/lua/5.1/kong/plugins/oauth2/access.lua:97: in function 'retrieve_parameters'
/usr/local/share/lua/5.1/kong/plugins/oauth2/access.lua:344: in function 'parse_access_token'
/usr/local/share/lua/5.1/kong/plugins/oauth2/access.lua:397: in function 'execute'
/usr/local/share/lua/5.1/kong/plugins/oauth2/handler.lua:12: in function 'access'
/usr/local/share/lua/5.1/kong.lua:173: in function 'access'
access_by_lua(nginx.conf:98):2: in function <access_by_lua(nginx.conf:98):1>, client: 127.0.0.1, server: _, request: "POST /rebate/debit-notes HTTP/1.1", host: "localhost:8000"

@subnetmarco
Copy link
Member

@jl91 I believe my PR fixes your problem. Is the error message you pasted the full log?

subnetmarco added a commit that referenced this issue Mar 11, 2016
@jl91
Copy link
Author

jl91 commented Mar 11, 2016

no, this is a tail of log. tomorrow i will update this ticket.

@subnetmarco
Copy link
Member

Okay - I think my PR fixes it but seeing the full log would still help.

@jl91
Copy link
Author

jl91 commented Mar 24, 2016

now i have another problem. Everytime i reboot my pc and when i try to start kong have this messa.

[ERR] nginx: [error] [lua] kong.lua:144: init(): Startup error: /usr/local/share/lua/5.1/kong/tools/utils.lua:221: /usr/local/share/lua/5.1/kong/plugins/runscope/handler.lua:3: module 'kong.plugins.runscope.log' not found: no field package.preload['kong.plugins.runscope.log'] no file '/usr/local/openresty/lualib/kong/plugins/runscope/log.lua' no file '/usr/local/openresty/lualib/kong/plugins/runscope/log/init.lua' no file './kong/plugins/runscope/log.lua' no file '/usr/local/openresty/luajit/share/luajit-2.1.0-beta1/kong/plugins/runscope/log.lua' no file '/usr/local/share/lua/5.1/kong/plugins/runscope/log.lua' no file '/usr/local/share/lua/5.1/kong/plugins/runscope/log/init.lua'no file '/usr/local/openresty/luajit/share/lua/5.1/kong/plugins/runscope/log.lua' no file '/usr/local/openresty/luajit/share/lua/5.1/kong/plugins/runscope/log/init.lua' no file '/usr/local/openresty/lualib/kong/plugins/runscope/log.so' no file './kong/plugins/runscope/log.so' no file '/usr/local/lib/lua/5.1/kong/plugins/runscope/log.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/kong/plugins/runscope/log.so' no file '/usr/local/lib/lua/5.1/loadall.so' no file '/usr/local/openresty/lualib/kong.so' no file './kong.so' no file '/usr/local/lib/lua/5.1/kong.so' no file '/usr/local/openresty/luajit/lib/lua/5.1/kong.so' no file '/usr/local/lib/lua/5.1/loadall.so'
[ERR] Could not start Kong

To fix that always i have to "Make install again kong"

@Tieske
Copy link
Member

Tieske commented Mar 24, 2016

see #1079

@subnetmarco
Copy link
Member

@jl91 that's fixed in the next release.

@jl91
Copy link
Author

jl91 commented Mar 28, 2016

thanks man, really thanks i love this project haha <3

@subnetmarco
Copy link
Member

@jl91 btw you can give it a try, RC1 is out: https://github.com/Mashape/kong/releases/tag/0.8.0rc1

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

4 participants
@subnetmarco @Tieske @jl91 and others