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

Plugin will cannot load #10

Open
jack-burridge-cfh opened this issue Feb 2, 2023 · 1 comment
Open

Plugin will cannot load #10

jack-burridge-cfh opened this issue Feb 2, 2023 · 1 comment

Comments

@jack-burridge-cfh
Copy link

jack-burridge-cfh commented Feb 2, 2023

I'm having an issue where the plugin will not load. I have the following API:

{
    "name": "Hello-World",
    "api_id": "Hello-World",
    "org_id": "1",
    "use_keyless": true,
    "version_data": {
        "not_versioned": true,
        "versions": {
            "Default": {
                "name": "Default",
                "use_extended_paths": true
            }
        }
    },
    "proxy": {
        "listen_path": "/hello-world/",
        "target_url": "http://echo.tyk-demo.com:8080/anything/",
        "strip_listen_path": true
    },
    "active": true,
    "custom_middleware": {
        "pre": [
            {
                "name": "AddFooBarHeader",
                "path": "/opt/tyk-gateway/middleware/CustomGoPlugin.so",
                "require_session": false,
                "raw_body_only": false
            }
        ],
        "driver": "goplugin"
    }
}

When I reload I get this in the logs:

time="Feb 02 13:43:42" level=error msg="Could not load Go-plugin" error="plugin.Open("/opt/tyk-gateway/middleware/CustomGoPlugin.so"): /opt/tyk-gateway/middleware/CustomGoPlugin.so: cannot open shared object file: No such file or directory" mwPath="/opt/tyk-gateway/middleware/CustomGoPlugin.so" mwSymbolName=AddFooBarHeader

The file is there though:

docker exec -it custom-go-plugin-tyk-gateway-1 sh
# cd /opt/tyk-gateway/middleware/
# ls -l
total 20332
-rw-r--r-- 1 root root 20816776 Feb  2 13:22 CustomGoPlugin.so

Note I am running this on an M1 mac

@sedkis
Copy link
Collaborator

sedkis commented Jul 13, 2023

Apologies for missing this. This issue is likely because of the architecture (are you on M1?)
Would you mind trying to fetch the latest base from master and try again?

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

No branches or pull requests

2 participants