poidl opened a new issue #1893:
URL: https://github.com/apache/incubator-apisix/issues/1893
Version 1.4
I'm a beginner and tried using
```
node_listen: 80
```
in ` conf/config.yaml`. The objective is simply to use APISIX for a
publicly available home page.
```
sudo ./bin/apisix start`
```
errors with
```
2020/07/23 11:17:24 [error] 26714#0: init_worker_by_lua error:
...er/programs/apache-apisix-1.4-incubating/apisix/init.lua:72: module
'resty.worker.events' not found:
no field package.preload['resty.worker.events']
no file
'/home/labuser/programs/apache-apisix-1.4-incubating//deps/share/lua/5.1/resty/worker/events.lua'
no file
'/home/labuser/programs/apache-apisix-1.4-incubating//deps/share/lua/5.1/resty/worker/events/init.lua'
no file
'/home/labuser/programs/apache-apisix-1.4-incubating/resty/worker/events.lua'
no file
'/home/labuser/programs/apache-apisix-1.4-incubating/resty/worker/events/init.lua'
no file '/usr/local/openresty/site/lualib/resty/worker/events.ljbc'
no file
'/usr/local/openresty/site/lualib/resty/worker/events/init.ljbc'
no file '/usr/local/openresty/lualib/resty/worker/events.ljbc'
no file '/usr/local/openresty/lualib/resty/worker/events/init.ljbc'
no file '/usr/local/openresty/site/lualib/resty/worker/events.lua'
no file
'/usr/local/openresty/site/lualib/resty/worker/events/init.lua'
no file '/usr/local/openresty/lualib/resty/worker/events.lua'
no file '/usr/local/openresty/lualib/resty/worker/events/init.lua'
no file './resty/worker/events.lua'
no file
'/usr/local/openresty/luajit/share/luajit-2.1.0-beta3/resty/worker/events.lua'
no file '/usr/local/share/lua/5.1/resty/worker/events.lua'
no file '/usr/local/share/lua/5.1/resty/worker/events/init.lua'
no file
'/usr/local/openresty/luajit/share/lua/5.1/resty/worker/events.lua'
no file
'/usr/local/openresty/luajit/share/lua/5.1/resty/worker/events/init.lua'
no file '/usr/share/lua/5.3/resty/worker/events.lua'
no file '/usr/share/lua/5.3/resty/worker/events/init.lua'
no file '/usr/lib/lua/5.3/resty/worker/events.lua'
no file '/usr/lib/lua/5.3/resty/worker/events/init.lua'
no file './resty/worker/events.lua'
no file './resty/worker/events/init.lua'
no file
'/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib64/lua/5.1/resty/worker/events.so'
no file
'/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib/lua/5.1/resty/worker/events.so'
no file '/usr/local/openresty/site/lualib/resty/worker/events.so'
no file '/usr/local/openresty/lualib/resty/worker/events.so'
no file './resty/worker/events.so'
no file '/usr/local/lib/lua/5.1/resty/worker/events.so'
no file
'/usr/local/openresty/luajit/lib/lua/5.1/resty/worker/events.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/usr/lib/lua/5.3/resty/worker/events.so'
no file '/usr/lib/lua/5.3/loadall.so'
no file './resty/worker/events.so'
no file
'/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib64/lua/5.1/resty.so'
no file
'/home/labuser/programs/apache-apisix-1.4-incubating//deps/lib/lua/5.1/resty.so'
no file '/usr/local/openresty/site/lualib/resty.so'
no file '/usr/local/openresty/lualib/resty.so'
no file './resty.so'
no file '/usr/local/lib/lua/5.1/resty.so'
no file '/usr/local/openresty/luajit/lib/lua/5.1/resty.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file '/usr/lib/lua/5.3/resty.so'
no file '/usr/lib/lua/5.3/loadall.so'
no file './resty.so'
stack traceback:
[C]: in function 'require'
...er/programs/apache-apisix-1.4-incubating/apisix/init.lua:72: in
function 'http_init_worker'
init_worker_by_lua:2: in main chunk
```
I read this issue
#https://github.com/apache/incubator-apisix/issues/1693
where it says that nginx shouldn't be run as root.
I read some forum posts, e.g.
https://superuser.com/questions/710253/allow-non-root-process-to-bind-to-port-80-and-443
and tried using
```
sudo setcap CAP_NET_BIND_SERVICE=+ep /usr/local/openresty/nginx/sbin/nginx
```
This works. I also have control over my firewall and could do port
remapping. Another suggesting in that forum post is `authbind`, which I have
not tried.
Do the APISIX developers suggest a specific way? Or should this already work
with `sudo`, and maybe I have not understood how to do it? Is port remapping
via `iptables` the best way?
Thanks!
----------------------------------------------------------------
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:
[email protected]