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] (swag-crowdsec) Nginx Error - Module 'resty.string' not found #907

Closed
1 task done
Be-Mann opened this issue Jun 5, 2024 · 4 comments
Closed
1 task done

Comments

@Be-Mann
Copy link

Be-Mann commented Jun 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Name of mod

swag-crowdsec

Name of base container

linuxserver/nginx

Current Behavior

Container spams the log full of errors

Expected Behavior

No response

Steps To Reproduce

crowdsecurity/cs-nginx-bouncer#54

Environment

- OS: Ubuntu 22.04.4 LTS
- How docker service was installed: Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1

CPU architecture

x86-64

Docker creation

"Env": [
            "DOCKER_MODS=linuxserver/mods:universal-git|linuxserver/mods:universal-cron|linuxserver/mods:universal-package-install|linuxserver/mods:swag-auto-reload|linuxserver/mods:swag-imagemagick|linuxserver/mods:swag-crowdsec",
            "INSTALL_PACKAGES=rsync|git|nginx",
            "PGID=1000",
            "PUID=1000",
            "TZ=Europe/Berlin",
            "CROWDSEC_API_KEY=XXXXXXXXXXXXXXXXXXXXXXX",
            "CROWDSEC_LAPI_URL=http://192.168.190.20:8080",
            "CROWDSEC_CAPTCHA_PROVIDER=recaptcha",
            "CROWDSEC_SITE_KEY=XXXXXXXXXXXXXXXXXXXXXXX",
            "CROWDSEC_SECRET_KEY=XXXXXXXXXXXXXXXXXXXXXXX",
            "dns=127.0.0.11",
            "PS1=$(whoami)@$(hostname):$(pwd)\\$",
            "PATH=/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "HOME=/root",
            "TERM=xterm",
            "S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0",
            "S6_VERBOSITY=1",
            "S6_STAGE2_HOOK=/docker-mods",
            "VIRTUAL_ENV=/lsiopy",
            "LSIO_FIRST_PARTY=true"
        ],

Container logs

[error] 2998#2998: init_by_lua error: /usr/share/lua/common/resty/http_connect.lua:8: module 'resty.string' not found:
        no field package.preload['resty.string']
        no file '/usr/local/lua/crowdsec/resty/string.lua'
        no file './resty/string.lua'
        no file '/usr/share/luajit-2.1/resty/string.lua'
        no file '/usr/local/share/lua/5.1/resty/string.lua'
        no file '/usr/local/share/lua/5.1/resty/string/init.lua'
        no file '/usr/share/lua/5.1/resty/string.lua'
        no file '/usr/share/lua/5.1/resty/string/init.lua'
        no file '/usr/share/lua/common/resty/string.lua'
        no file '/usr/share/lua/common/resty/string/init.lua'
        no file './resty/string.lua'
        no file './resty/string.so'
        no file '/usr/local/lib/lua/5.1/resty/string.so'
        no file '/usr/lib/lua/5.1/resty/string.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file './resty.so'
        no file '/usr/local/lib/lua/5.1/resty.so'
        no file '/usr/lib/lua/5.1/resty.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        stack traceback:
        [C]: in function 'require'
        /usr/share/lua/common/resty/http_connect.lua:8: in main chunk
        [C]: in function 'require'
        /usr/share/lua/common/resty/http.lua:166: in main chunk
        [C]: in function 'require'
        /usr/local/lua/crowdsec/crowdsec.lua:5: in main chunk
        [C]: in function 'require'
        init_by_lua(http.d/crowdsec_nginx.conf:4):2: in main chunk
@thespad
Copy link
Member

thespad commented Jun 5, 2024

Please test with ghcr.io/linuxserver/mods:pull_request_908

@Be-Mann
Copy link
Author

Be-Mann commented Jun 5, 2024

Looks very good, the error seems to have been rectified. As a precaution, I have recreated the container once and no more errors can be seen there either

@Be-Mann
Copy link
Author

Be-Mann commented Jun 5, 2024

works perfectly, can be merged

@Be-Mann Be-Mann closed this as completed Jun 5, 2024
@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Jun 5, 2024
@thespad
Copy link
Member

thespad commented Jun 5, 2024

Thanks for testing, PR is merged and should be build in a few minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants