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

bug: apisix doesn't work, 'resty.events.compat' not found #10684

Closed
Vacant2333 opened this issue Dec 21, 2023 · 8 comments · Fixed by #10729
Closed

bug: apisix doesn't work, 'resty.events.compat' not found #10684

Vacant2333 opened this issue Dec 21, 2023 · 8 comments · Fixed by #10729
Assignees
Labels
bug Something isn't working

Comments

@Vacant2333
Copy link
Contributor

Vacant2333 commented Dec 21, 2023

Current Behavior

i follow the source installation guild(checkout master), https://apisix.apache.org/docs/apisix/building-apisix/
then start the apisix, it will throw a error like 'resty.events.compat' not found:

if i checkout to the branch before, it works fine, looks like #10550 makes this

Expected Behavior

start apisix success, and no errors

Error Logs

2023/12/21 11:45:49 [info] 4409#48488: *9 [lua] init.lua:114: http_init_worker(): random test in [1, 10000]: 9291, context: init_worker_by_lua*
2023/12/21 11:45:49 [error] 4406#48485: init_worker_by_lua error: /Users/vacant/apisix/apisix/events.lua:68: module 'resty.events.compat' not found:
	no field package.preload['resty.events.compat']
	no file '/Users/vacant/apisix//deps/share/lua/5.1/resty/events/compat.lua'
	no file '/Users/vacant/apisix//deps/share/lua/5.1/resty/events/compat/init.lua'
	no file '/Users/vacant/apisix/resty/events/compat.lua'
	no file '/Users/vacant/apisix/resty/events/compat/init.lua'
	no file '/opt/homebrew/Cellar/openresty/1.21.4.2_1/site/lualib/resty/events/compat.ljbc'

Steps to Reproduce

follow the source installation guild
https://apisix.apache.org/docs/apisix/building-apisix/

curl https://raw.githubusercontent.com/apache/apisix/master/utils/install-dependencies.sh -sL | bash -

git checkout master

apisix stop

make deps
sudo make install

apisix start

cat logs/error.log

Environment

  • APISIX version (run apisix version): 3.7.0
  • Operating system (run uname -a): Darwin MasterNode.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:34 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T8103 arm64
  • OpenResty / Nginx version (run openresty -V or nginx -V): nginx version: openresty/1.21.4.2
  • LuaRocks version, for installation issues (run luarocks --version): 3.9.2
@shreemaan-abhishek
Copy link
Contributor

for now please change the value of events:

module: lua-resty-events # Sets the name of the events module used.

to lua-resty-worker-events. It will fix the issue.

@shreemaan-abhishek
Copy link
Contributor

cc: @bzp2010

@shreemaan-abhishek shreemaan-abhishek added the bug Something isn't working label Dec 21, 2023
@Vacant2333
Copy link
Contributor Author

for now please change the value of events:

module: lua-resty-events # Sets the name of the events module used.

to lua-resty-worker-events. It will fix the issue.

yes! it works

@Vacant2333
Copy link
Contributor Author

i dont understand why the ci pass, if this work bad on mac only?

@shreemaan-abhishek
Copy link
Contributor

i dont understand why the ci pass, if this work bad on mac only?

not a problem with mac, this occured on linux as well... we are missing some steps.

@moonming
Copy link
Member

@Vacant2333 please update the install docs.

@Vacant2333
Copy link
Contributor Author

@Vacant2333 please update the install docs.

did u mean raise a pr to update this line?
image

@Sn0rt
Copy link
Contributor

Sn0rt commented Dec 22, 2023

  1. need new code to ensure the APISIX runwith APISIX-runtime
  2. need doc to guide user how to install APISIX-runtime
  3. (option) for macos need brew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants