Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-19429

For a springboot CXF deployment, "server.shutdown=graceful" does not work as expected

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.11.1-GA
    • fuse-7.10-GA
    • CXF, Spring Boot
    • None
    • False
    • None
    • False
    • Release Notes
    • % %
    • Todo
    • Release Note
    • Workaround Exists
    • Hide

      Set the CXF endpoint as "synchronous=true", and it works as expected

      Show
      Set the CXF endpoint as "synchronous=true", and it works as expected
    • Hide
      • You can run at your side as follows:
        + Open 2 shell terminals

      in terminal 1:
      + unzip zip file on comment #13
      + create file body.soap.xml with "body.soap.xml contents" below
      + go to unzipped folder and start project
      $ mvn clean spring-boot:run

      in terminal 2
      + send an invocation using curl
      $ curl -vv -X POST -d @body.soap.xml http://localhost:8080/services/HelloWorld

      in terminal 1
      + stop the SpringBoot execution (Ctrl + C)

      in terminal 2
      + check results

      Show
      You can run at your side as follows: + Open 2 shell terminals in terminal 1: + unzip zip file on comment #13 + create file body.soap.xml with "body.soap.xml contents" below + go to unzipped folder and start project $ mvn clean spring-boot:run in terminal 2 + send an invocation using curl $ curl -vv -X POST -d @body.soap.xml http://localhost:8080/services/HelloWorld in terminal 1 + stop the SpringBoot execution (Ctrl + C) in terminal 2 + check results

      • When a request to a long running service is sent, and while the request is being processed, the service is shutdown, a response is not returned as expected.
        See "invocation with default parameters" below
      • When we add "?synchronous=true" to CXF URI on the from endpoint, the behavior is as expected (while the request is being processed, the service is shutdown, a response is returned).
        See "invocation adding synchronous=true parameter" below

      Attached reproduced here: https://drive.google.com/file/d/1aoot7c7BC8x2yArBsbsK657e-O4u3m0A/view?usp=sharing

      invocation with default parameters
      ==================================
      $ curl -vv -X POST -d @body.soap.xml http://localhost:8080/services/HelloWorld
      Note: Unnecessary use of -X or --request, POST is already inferred.

      • Trying 127.0.0.1:8080...
      • Connected to localhost (127.0.0.1) port 8080 (#0)
        > POST /services/HelloWorld HTTP/1.1
        > Host: localhost:8080
        > User-Agent: curl/7.79.1
        > Accept: /
        > Content-Length: 214
        > Content-Type: application/x-www-form-urlencoded
        >
      • Mark bundle as not supporting multiuse
        < HTTP/1.1 404 Not Found
        < Connection: keep-alive
        < Content-Type: text/html;charset=ISO-8859-1
        < Content-Length: 47
        < Date: Thu, 23 Jun 2022 15:51:31 GMT
        <
      • Connection #0 to host localhost left intact
        <html><body>No service was found.</body></html>

      invocation adding synchronous=true parameter
      =============================================
      $ curl -vv -X POST -d @body.soap.xml http://localhost:8080/services/HelloWorld
      Note: Unnecessary use of -X or --request, POST is already inferred.

      • Trying 127.0.0.1:8080...
      • Connected to localhost (127.0.0.1) port 8080 (#0)
        > POST /services/HelloWorld HTTP/1.1
        > Host: localhost:8080
        > User-Agent: curl/7.79.1
        > Accept: /
        > Content-Length: 214
        > Content-Type: application/x-www-form-urlencoded
        >
      • Mark bundle as not supporting multiuse
        < HTTP/1.1 200 OK
        < Accept: /
        < Connection: keep-alive
        < breadcrumbId: ID-laptop-t14s-1656001688422-0-1
        < Content-Type: text/xml;charset=UTF-8
        < Content-Length: 227
        < User-Agent: curl/7.79.1
        < Host: localhost:8080
        < Date: Thu, 23 Jun 2022 16:28:25 GMT
        <
      • Connection #0 to host localhost left intact
        <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><HelloWorldResponse xmlns="http://localhost/WebService/"><HelloWorldResult>Hi!</HelloWorldResult></HelloWorldResponse></soap:Body></soap:Envelope>

      body.soap.xml contents
      =======================
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://localhost/WebService/">
      <soapenv:Header/>
      <soapenv:Body>
      <web:HelloWorld/>
      </soapenv:Body>
      </soapenv:Envelope>

            yfang@redhat.com Freeman(Yue) Fang
            rhn-support-anarvaez Alfredo Narvaez
            Daniel Olearcin Daniel Olearcin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: