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

failed to connect to the unix socket unix:/usr/local/apisix/conf/apisix-45.sock: no such file or directory #268

Open
bin-53 opened this issue Oct 19, 2023 · 3 comments

Comments

@bin-53
Copy link

bin-53 commented Oct 19, 2023

After I configured the java plug-in in apisix, I performed the related configuration according to the documentation, but there was an error that could not connect。
apisix and java plugins communicate through the /tmp/runner.sock file. Why look for the apisix-45.sock file when, strangely, the key file is not generated

the error is:
image

image

the route config:

{
    "id": "483159253050196671",
    "create_time": 1697514956,
    "update_time": 1697538848,
    "uri": "/*",
    "name": "java-plugin-demo",
    "priority": 1,
    "methods": [
        "GET",
        "POST"
    ],
    "plugins": {
        "ext-plugin-pre-req": {
            "conf": [
                {
                    "name": "TokenValidator",
                    "value": "{\"validate_header\":\"token\",\"validate_url\":\"https://www.sso.foo.com/token/validate\",\"rejected_code\":\"401\"}"
                }
            ]
        }
    },
    "upstream": {
        "nodes": [
            {
                "host": "192.168.97.25",
                "port": 1004,
                "weight": 1
            }
        ],
        "retries": 1,
        "timeout": {
            "connect": 6,
            "send": 6,
            "read": 6
        },
        "type": "roundrobin",
        "scheme": "http",
        "discovery_args": {
            "group_name": "",
            "namespace_id": ""
        },
        "pass_host": "pass",
        "keepalive_pool": {
            "idle_timeout": 60,
            "requests": 1000,
            "size": 320
        }
    },
    "labels": {
        "API_VERSION": "x"
    },
    "status": 1
}

the apisix config:

ext-plugin:
  # path_for_test: /tmp/runner.sock
  cmd: ['/usr/local/jdk/jdk-11.0.17/bin/java', '-jar', '-Xmx1g', '-Xms1g', '/usr/local/apisix/demo-0.0.1-SNAPSHOT.jar']

apisix-java-plugin-runner:0.3
apisix:2.15-centos

@bin-53 bin-53 changed the title request help: failed to fetch registryconnection refused? Oct 19, 2023
@bin-53
Copy link
Author

bin-53 commented Oct 19, 2023

@tzssangglass Honey, can you take a look?

@bin-53 bin-53 changed the title failed to fetch registryconnection refused? failed to connect to the unix socket unix:/usr/local/apisix/conf/apisix-45.sock: no such file or directory Oct 19, 2023
@monkeyDluffy6017
Copy link

@shreemaan-abhishek please help to check

@tzssangglass
Copy link
Member

ref: #146 (comment)

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

3 participants