Hi Patricia

Have you tried the url path of '/v1/jars/upload' ?

Best
Jiadong Lu

On 2023/8/16 14:00, patricia lee wrote:
Hi,

Below are the steps that I take to replicate the issue. I have a requirement to disable both the capability to run and submit jobs in Flink Web UI and Rest Endpoint.
I created a docker compose of job manager and task manager.

When the property in job manager's config is set to web.submit.enabled: true
I can submit a job via rest api as shown below (which is expected)

Screenshot 2023-08-16 at 1.05.00 PM.png

However, when I disabled the job manager's property web.submit.enabled: false

Screenshot 2023-08-16 at 1.55.25 PM.png

I can no longer upload a jar file via rest endpoint. According to the Apache Flink Documentation, web.submit.enable=false is only on the front end flag and would not take effect on the rest api.

*Reference:*
https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/ 
<https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/>
Screenshot 2023-08-16 at 1.18.25 PM.png






On Tue, Aug 15, 2023 at 12:31 AM jiadong.lu <http://jiadong.lu> <archzi...@gmail.com <mailto:archzi...@gmail.com>> wrote:

    Hi, Patricia

    I think you should have a look the REST API[1].

      > "Even it is disabled sessions clusters still accept jobs through
    REST
    requests (Http calls). This flag only guards the feature to upload jobs
    in the UI"

    means  you cannot upload flink application jar in the flink
    dashboard UI
    if the `web.ui.submit=false`,

    you still can sumbit the flink application jar by the REST API.

    Best

    Jiadong Lu.

    1.
    https://nightlies.apache.org/flink/flink-docs-master/docs/ops/rest_api/ 
<https://nightlies.apache.org/flink/flink-docs-master/docs/ops/rest_api/>

    On 2023/8/15 0:14, patricia lee wrote:
     > Hi,
     >
     > Just to add, when I set back to "true" the web.ui submit property,
     > that is when the rest endpoint /jars/upload worked again. But in the
     > documentation reference:
     >
     >
    https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/ 
<https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/config/>
     >
     >
     > Disabling the UI doesnt disable the endpoint. Is this the expected
     > behavior?
     >
     > Regards,
     > Patricia
     >
     > On Mon, Aug 14, 2023, 5:07 PM patricia lee <plee3...@gmail.com
    <mailto:plee3...@gmail.com>> wrote:
     >
     >     Hi,
     >
     >     I disabled the web.ui.submit=false, after that uploading jar
    files
     >     via rest endpoint is now throwing 404. In the documentation
    it says:
     >
     >     "Even it is disabled sessions clusters still accept jobs through
     >     REST requests (Http calls). This flag only guards the feature to
     >     upload jobs in the UI"
     >
     >     I also set the io.tmp.dirs to my specified directory.
     >
     >
     >     But I can no longer upload jar via rest endpoint.
     >
     >
     >     Regards,
     >     Patricia
     >

Reply via email to