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 2020/03/14 08:09:57 UTC
[GitHub] [incubator-apisix] zd04 opened a new issue #1264: bug: apisix start
failed
zd04 opened a new issue #1264: bug: apisix start failed
URL: https://github.com/apache/incubator-apisix/issues/1264
### Issue description
I install openresty and luarocks,then install apisix by luarocks.Do apisix init,apisix init_etcd,then apisix start,show me error:
[root@www001 apisix]# /usr/local/luarocks-3.3.1/bin/apisix start
nginx: [error] init_by_lua error: init_by_lua:3: module 'apisix' not found:
no field package.preload['apisix']
no file '/usr/local/apisix//deps/share/lua/5.1/apisix.lua'
no file '/usr/share/lua/5.1/apisix/lua/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix/lua/apisix.lua'
no file '/usr/local/apisix//deps/share/lua/5.1/apisix/lua/apisix.lua'
no file '/usr/local/apisix/lua/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix.ljbc'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix/init.ljbc'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix.ljbc'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix/init.ljbc'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix/init.lua'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix/init.lua'
no file './apisix.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/luajit-2.1.0-beta3/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix/init.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/lua/5.1/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/lua/5.1/apisix/init.lua'
no file '/usr/local/luarocks-3.3.1/share/lua/5.1/apisix.lua'
no file '/usr/local/luarocks-3.3.1/share/lua/5.1/apisix/init.lua'
no file './apisix.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/luajit-2.1.0-beta3/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix/init.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/lua/5.1/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/lua/5.1/apisix/init.lua'
no file '/root/.luarocks/share/lua/5.1/apisix.lua'
no file '/root/.luarocks/share/lua/5.1/apisix/init.lua'
no file '/usr/local/apisix//deps/lib64/lua/5.1/apisix.so'
no file '/usr/local/apisix//deps/lib/lua/5.1/apisix.so'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix.so'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix.so'
no file './apisix.so'
no file '/usr/local/lib/lua/5.1/apisix.so'
no file '/usr/local/openresty/1.15.8.2/luajit/lib/lua/5.1/apisix.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/usr/local/luarocks-3.3.1/lib/lua/5.1/apisix.so'
no file './apisix.so'
no file '/usr/local/lib/lua/5.1/apisix.so'
no file '/usr/local/openresty/1.15.8.2/luajit/lib/lua/5.1/apisix.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/root/.luarocks/lib/lua/5.1/apisix.so'
stack traceback:
[C]: in function 'require'
init_by_lua:3: in main chunk
### Environment
* apisix version (cmd: `apisix version`):
* OS: centos 8 x64
### Minimal test code / Steps to reproduce the issue
1.install openresty
./configure --prefix="/usr/local/openresty/1.15.8.2" \
--with-luajit --with-pcre-jit --with-pcre \
--with-http_realip_module --add-module=./bundle/ngx_cache_purge-2.3/ --add-module=./bundle/nginx_upstream_check_module-0.3.0/ \
--with-http_stub_status_module --with-http_v2_module
2.install luarocks
./configure --prefix="/usr/local/luarocks-3.3.1" --with-lua="/usr/local/openresty/1.15.8.2/luajit/" --lua-suffix="jit" --with-lua-include="/usr/local/openresty/1.15.8.2/luajit/include/luajit-2.1"
make
sudo make install
3.install apisix
/usr/local/luarocks-3.3.1/bin/luarocks install --lua-dir=/usr/local/openresty/1.15.8.2/luajit/ apisix
### What's the actual result? (including assertion message & call stack if applicable)
[root@www001 apisix]# /usr/local/luarocks-3.3.1/bin/apisix start
nginx: [error] init_by_lua error: init_by_lua:3: module 'apisix' not found:
no field package.preload['apisix']
no file '/usr/local/apisix//deps/share/lua/5.1/apisix.lua'
no file '/usr/share/lua/5.1/apisix/lua/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix/lua/apisix.lua'
no file '/usr/local/apisix//deps/share/lua/5.1/apisix/lua/apisix.lua'
no file '/usr/local/apisix/lua/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix.ljbc'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix/init.ljbc'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix.ljbc'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix/init.ljbc'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix/init.lua'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix/init.lua'
no file './apisix.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/luajit-2.1.0-beta3/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix/init.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/lua/5.1/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/lua/5.1/apisix/init.lua'
no file '/usr/local/luarocks-3.3.1/share/lua/5.1/apisix.lua'
no file '/usr/local/luarocks-3.3.1/share/lua/5.1/apisix/init.lua'
no file './apisix.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/luajit-2.1.0-beta3/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix.lua'
no file '/usr/local/share/lua/5.1/apisix/init.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/lua/5.1/apisix.lua'
no file '/usr/local/openresty/1.15.8.2/luajit/share/lua/5.1/apisix/init.lua'
no file '/root/.luarocks/share/lua/5.1/apisix.lua'
no file '/root/.luarocks/share/lua/5.1/apisix/init.lua'
no file '/usr/local/apisix//deps/lib64/lua/5.1/apisix.so'
no file '/usr/local/apisix//deps/lib/lua/5.1/apisix.so'
no file '/usr/local/openresty/1.15.8.2/site/lualib/apisix.so'
no file '/usr/local/openresty/1.15.8.2/lualib/apisix.so'
no file './apisix.so'
no file '/usr/local/lib/lua/5.1/apisix.so'
no file '/usr/local/openresty/1.15.8.2/luajit/lib/lua/5.1/apisix.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/usr/local/luarocks-3.3.1/lib/lua/5.1/apisix.so'
no file './apisix.so'
no file '/usr/local/lib/lua/5.1/apisix.so'
no file '/usr/local/openresty/1.15.8.2/luajit/lib/lua/5.1/apisix.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/root/.luarocks/lib/lua/5.1/apisix.so'
stack traceback:
[C]: in function 'require'
init_by_lua:3: in main chunk
### What's the expected result?
apisix start success
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis commented on issue #1264: bug: apisix
start failed
Posted by GitBox <gi...@apache.org>.
membphis commented on issue #1264: bug: apisix start failed
URL: https://github.com/apache/incubator-apisix/issues/1264#issuecomment-599150114
We can start the service by command `apisix start`, the CLI of `apisix` will be install to `/usr/bin/apisix` default.
```shell
$ sudo luarocks show apisix
apisix 1.1-0 - Apache APISIX(incubating) is a cloud-native microservices API gateway, delivering the ultimate performance, security, open source and scalable platform for all your APIs and microservices.
License: Apache License 2.0
Homepage: https://github.com/apache/incubator-apisix
Installed in: /usr
Commands:
/usr/bin/apisix (/usr/bin/usr/bin/apisix) # <<<<<< here
... ...
$ apisix help
Usage: apisix [action] <argument>
help: show this message, then exit
init: initialize the local nginx.conf
init_etcd: initialize the data of etcd
start: start the apisix server
stop: stop the apisix server
restart: restart the apisix server
reload: reload the apisix server
version: print the version of apisix
```
----------------------------------------------------------------
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
With regards,
Apache Git Services
[GitHub] [incubator-apisix] membphis closed issue #1264: bug: apisix start failed
Posted by GitBox <gi...@apache.org>.
membphis closed issue #1264:
URL: https://github.com/apache/incubator-apisix/issues/1264
----------------------------------------------------------------
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