apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
14.56k stars 2.52k forks source link

help request: mqtt-proxy not showing up during K8s helm chart install #9728

Closed NNicoletti closed 2 months ago

NNicoletti commented 1 year ago

Description

Using helm chart 1.4.0 to install apisix 3.3.0 in decoupled mode.

When trying to test out MQTT stuff I attempted to install the mqtt-proxy plugin. I've put it in both stream_plugins and plugins and nothing works. I didn't expect putting it into plugins to work, but it was worth a shot (it installs, but can't find files. Expected).

When in stream_plugins it successfully reads that it exists in the logs with 12023/06/26 17:15:07 [warn] 49#49: *2 [lua] plugin.lua:252: load_stream(): new plugins: {"mqtt-proxy":true}, context: init_worker_by_lua* however when I do a request to get all plugins with curl [CLUSTER_IP]:9180/apisix/admin/plugins/list -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' and it's not in the returned response:

["real-ip","request-id","zipkin","ext-plugin-pre-req","fault-injection","serverless-pre-function","batch-requests","cors","ip-restriction","ua-restriction","referer-restriction","uri-blocker","request-validation","openid-connect","authz-casbin","wolf-rbac","hmac-auth","basic-auth","jwt-auth","key-auth","consumer-restriction","authz-keycloak","proxy-cache","proxy-mirror","proxy-rewrite","api-breaker","limit-conn","limit-count","limit-req","node-status","gzip","server-info","traffic-split","redirect","response-rewrite","grpc-transcode","grpc-web","prometheus","echo","http-logger","sls-logger","tcp-logger","kafka-logger","syslog","udp-logger","file-logger","serverless-post-function","ext-plugin-post-req"]

Relevant parts of configs:

Control Plane config.yaml:

...
    apisix:    # universal configurations
      enable_heartbeat: true
      enable_admin: true

...
    stream_plugins:
      - mqtt-proxy
    plugin_attr:
...

I have the same thing in the data plane but without enable admin (I wasn't sure where plugins were needed, so I kept them the same to simplify figuring it out - I don't believe it effects anything since admin api isn't even enabled on the data plane side).

Environment

shreemaan-abhishek commented 1 year ago

I've put it in both stream_plugins and plugins and nothing works.

Could you please describe how you did that? (I wanted to make sure if you did that correctly.)

Revolyssup commented 1 year ago

@NNicoletti apisix/admin/plugins/list doesn't show stream_plugins and only shows plugins.

NNicoletti commented 1 year ago

@shreemaan-abhishek I meant I tried a deployment with mqtt-proxy in the regular plugin list as well as a deployment with it in the stream plugin list and have been unable to access it.

@Revolyssup That's what I was thinking. Is there an api call to show stream plugins? If not, this seems like a bit of an oversight.

This also leads to another question: are stream_routes and stream_plugins only available through the Admin API or can they be created/used via the dashboard? When manually putting in mqtt-proxy on a route using the dashboard (using the raw data editor) I can't submit as the dashboard can't find the mqtt-proxy plugin.

shreemaan-abhishek commented 1 year ago

Is there an api call to show stream plugins?

Not yet.

are stream_routes and stream_plugins only available through the Admin API or can they be created/used via the dashboard?

The dashboard should work as well. Just so you know, it is not maintained anymore.

That said, please try using the mqtt proxy plugin to confirm if it has actually loaded.

NNicoletti commented 1 year ago

are stream_routes and stream_plugins only available through the Admin API or can they be created/used via the dashboard?

The dashboard should work as well. Just so you know, it is not maintained anymore.

How do you create a stream route in dashboard? Just set upstream to TCP?

So the dashboard isn't going to be officially updated anymore?

That said, please try using the mqtt proxy plugin to confirm if it has actually loaded.

Let me try and create a stream_route with mqtt-proxy and see if it works.

Thank you for your patience and answering all of my questions, I really appreciate it.

shreemaan-abhishek commented 1 year ago

@NNicoletti, did it work?

github-actions[bot] commented 3 months ago

This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.

github-actions[bot] commented 2 months ago

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.