You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/04/08 12:01:28 UTC

[GitHub] [apisix] Marco-Zheng opened a new issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Marco-Zheng opened a new issue #4007:
URL: https://github.com/apache/apisix/issues/4007


   ### Issue description
   when  i start apisix,here come's a problem as below which said 'Bad http library. Should use api7-lua-resty-http instead'
   ![image](https://user-images.githubusercontent.com/52538259/114021668-8433a380-98a3-11eb-9c2f-7aeaad41f00d.png)
   
   so i try to vim deps/share/lua/5.1/resty/etcd/utils.lua, then find the code 
   ```
   if not http.tls_handshake then
       error("Bad http library. Should use api7-lua-resty-http instead")
   end
   ```
   it show that may has any problem with the package resty.http, so i found the http.lua under 'deps/share/lua/5.1/resty'
   there had no method named tls_handshake, but only found method named ssl_handshake
   
   Could you please help to check if it's a bug? or please give me a solution, thanks a lot!
   ### Environment 
   
   * apisix version (cmd: `apisix version`): apisix-2.5
   * OS (cmd: `uname -a`):Linux VM-50-173-centos 3.10.0-1160.11.1.el7.x86_64
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): nginx version: openresty/1.19.3.1
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 3.4.15
   * apisix-dashboard version, if have: no
   
   ### Minimal test code / Steps to reproduce the issue
   
   1. ./bin/apisix start
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   Bad http library. Should use api7-lua-resty-http instead
   
   ### What's the expected result?
   running successfully
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Firstsawyou edited a comment on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Firstsawyou edited a comment on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815797983


   It would be better if you provide the following installation steps.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815819097


   > How do you install the dependencies? Have you reinstalled the dependencies after upgrading to 2.5 (if you come from an older version)?
   
   no, i just download the new version by following the README doc, firstly it was failed then i guess that accidentally deleted any dependencies lua, so i try again, download a new one, but it also didn't work. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816356255


   It's luarocks 2.3.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816362046


   Emm... Luarocks 2.3.0 was released in 2015. It lacks many features. To fix it we need a time machine.
   
   Would you try Luarocks 3.4.0? We already provide a script to do that: https://github.com/apache/apisix/blob/master/utils/linux-install-luarocks.sh
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815792961


   How do you install the dependencies? Have you reinstalled the dependencies after upgrading to 2.5 (if you come from an older version)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander edited a comment on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
spacewander edited a comment on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816362046


   Emm... Luarocks 2.3.0 was released in 2015. It lacks many features and has a few known bugs. To fix it we need a time machine.
   
   Would you try Luarocks 3.4.0? We already provide a script to do that: https://github.com/apache/apisix/blob/master/utils/linux-install-luarocks.sh
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816400363


   > Have you reinstalled the dependencies? You may need to remove ./deps and install via `LUAROCKS_SERVER=https://luarocks.cn make deps`.
   > 
   > Here is my deps:
   > 
   > ```
   > argparse.lua    dkjson.lua  jsonschema.lua               lua_resty_jwt_0_2_0_0-resty  net          prometheus_keys.lua           protoc.lua  skywalking  ssl           typeof.lua
   > base64.lua      graphql     ltn12.lua                    luaxxhash.lua                opentracing  prometheus.lua                re.lua      socket      ssl.lua
   > binaryheap.lua  jsonschema  lua_resty_http_0_15_0-resty  mime.lua                     pl           prometheus_resty_counter.lua  resty       socket.lua  tinyyaml.lua
   > ```
   > 
   > You can see the vanilla lua-resty-http is installed as `lua_resty_http_0_15_0-resty`.
   
   The problem has been solved, many thanks for your kindly help!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815834691


   > Tha latest lua-resty-etcd should use api7-lua-resty-http:
   > https://github.com/api7/lua-resty-etcd/blob/b52830dca207c9e3653847b1b2ea072f8316e531/rockspec/lua-resty-etcd-1.5.0-0.rockspec#L16
   
   Sorry, i checked lua-resty-etcd under `/usr/local/apisix-2.5/deps/lib64/luarocks/rocks/lua-resty-etcd/1.5.0-0` as below, it's correct one , could you please give me an advise which part need i modify?
   ![image](https://user-images.githubusercontent.com/52538259/114036803-f52e8780-98b2-11eb-83ac-27b7442d20ad.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816376269


   > Emm... Luarocks 2.3.0 was released in 2015. It lacks many features and has a few known bugs. To fix it we need a time machine.
   > 
   > Would you try Luarocks 3.4.0? We already provide a script to do that: https://github.com/apache/apisix/blob/master/utils/linux-install-luarocks.sh
   
   Sorry, i just download the luarocks 3.4.0 as `linux-install-luarocks.sh` and link the luarock to `usr/local/bin/luarock`,it show that the luarock version is 3.4.0 now, but it also doesn't work as below...
   ![image](https://user-images.githubusercontent.com/52538259/114124486-29dc2680-9927-11eb-9b35-b4c1f90fa6f2.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816360411


   > > no, i just download the new version by following the README doc, firstly it was failed then i guess that accidentally deleted any dependencies lua, so i try again, download a new one, but it also didn't work.
   > 
   > I tried apisix 2.5 version without this problem. Maybe your `deps` is an old version, you should execute `make deps` command to reinstall related dependent files.
   
   I deleted the apisix 2.5 which i download yesterday and try again, `make deps` then run the application, but the result is same.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815827646


   > Tha latest lua-resty-etcd should use api7-lua-resty-http:
   > https://github.com/api7/lua-resty-etcd/blob/b52830dca207c9e3653847b1b2ea072f8316e531/rockspec/lua-resty-etcd-1.5.0-0.rockspec#L16
   
   Thanks for your quickly reply, i'll try it and leave a message


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816362604


   > Luarocks 3.4.0
   
   Many thanks! I'll try it with you comment 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815797904


   Tha latest lua-resty-etcd should use api7-lua-resty-http: 
   https://github.com/api7/lua-resty-etcd/blob/b52830dca207c9e3653847b1b2ea072f8316e531/rockspec/lua-resty-etcd-1.5.0-0.rockspec#L16


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816330401


   @Marco-Zheng 
   What is your version of Luarocks (`luarocks --version`)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-816378438


   Have you reinstalled the dependencies? You may need to remove ./deps and install via `LUAROCKS_SERVER=https://luarocks.cn make deps`.
   
   Here is my deps:
   ```
   argparse.lua    dkjson.lua  jsonschema.lua               lua_resty_jwt_0_2_0_0-resty  net          prometheus_keys.lua           protoc.lua  skywalking  ssl           typeof.lua
   base64.lua      graphql     ltn12.lua                    luaxxhash.lua                opentracing  prometheus.lua                re.lua      socket      ssl.lua
   binaryheap.lua  jsonschema  lua_resty_http_0_15_0-resty  mime.lua                     pl           prometheus_resty_counter.lua  resty       socket.lua  tinyyaml.lua
   ```
   
   You can see the vanilla lua-resty-http is installed as `lua_resty_http_0_15_0-resty`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng closed issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng closed issue #4007:
URL: https://github.com/apache/apisix/issues/4007


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Firstsawyou commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815903909


   > no, i just download the new version by following the README doc, firstly it was failed then i guess that accidentally deleted any dependencies lua, so i try again, download a new one, but it also didn't work.
   
   I tried apisix 2.5 version without this problem. Maybe your `deps` is an old version, you should execute `make deps` command to reinstall related dependent files.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Firstsawyou commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Firstsawyou commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815797983


   Are you deploying from source code?
   It would be better if you provide the following installation steps.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] Marco-Zheng commented on issue #4007: bug: When i start apisix,here come's a problem "Bad http library. Should use api7-lua-resty-http instead"

Posted by GitBox <gi...@apache.org>.
Marco-Zheng commented on issue #4007:
URL: https://github.com/apache/apisix/issues/4007#issuecomment-815825591


   > It would be better if you provide the following installation steps.
   
   I try the installation steps as below
   ![image](https://user-images.githubusercontent.com/52538259/114035258-83a20980-98b1-11eb-898e-34d5f897cb87.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org