Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-1751

Normal usage of Optimize shows warning in logs

    Details

    • Type: Bug Report
    • Status: Done
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.0, 2.4.0-alpha1
    • Component/s: backend
    • Labels:
      None

      Description

      • given:
        • I start Optimize
      • when:
        • I open the Optimize UI and start to interact with it (e.g. create a new report)
      • then:
        • I see the following warning:
          09:59:19.227 [qtp288994035-17] WARN  o.e.j.w.jsr356.annotations.JsrEvents - Unable to report throwable to websocket (no @OnError handler declared): org.camunda.optimize.websocket.StatusWebSocket
          org.eclipse.jetty.io.EofException: null
          	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:286)
          	at org.eclipse.jetty.io.WriteFlusher.flush(WriteFlusher.java:393)
          	at org.eclipse.jetty.io.WriteFlusher.write(WriteFlusher.java:277)
          	at org.eclipse.jetty.io.AbstractEndPoint.write(AbstractEndPoint.java:380)
          	at org.eclipse.jetty.websocket.common.io.FrameFlusher.flush(FrameFlusher.java:218)
          	at org.eclipse.jetty.websocket.common.io.FrameFlusher.process(FrameFlusher.java:157)
          	at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241)
          	at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:224)
          	at org.eclipse.jetty.websocket.common.io.FrameFlusher.enqueue(FrameFlusher.java:90)
          	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.outgoingFrame(AbstractWebSocketConnection.java:495)
          	at org.eclipse.jetty.websocket.common.WebSocketSession.close(WebSocketSession.java:223)
          	at org.eclipse.jetty.websocket.common.WebSocketSession.close(WebSocketSession.java:202)
          	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onConnectionStateChange(AbstractWebSocketConnection.java:353)
          	at org.eclipse.jetty.websocket.common.io.IOState.notifyStateListeners(IOState.java:184)
          	at org.eclipse.jetty.websocket.common.io.IOState.onReadFailure(IOState.java:498)
          	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.readParse(AbstractWebSocketConnection.java:547)
          	at org.eclipse.jetty.websocket.common.io.AbstractWebSocketConnection.onFillable(AbstractWebSocketConnection.java:391)
          	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
          	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
          	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
          	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
          	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
          	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
          	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
          	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
          	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
          	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
          	at java.lang.Thread.run(Thread.java:748)
          Caused by: java.io.IOException: Broken pipe
          	at sun.nio.ch.FileDispatcherImpl.writev0(Native Method)
          	at sun.nio.ch.SocketDispatcher.writev(SocketDispatcher.java:51)
          	at sun.nio.ch.IOUtil.write(IOUtil.java:148)
          	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:504)
          	at org.eclipse.jetty.io.ChannelEndPoint.flush(ChannelEndPoint.java:266)
          	... 27 common frames omitted
          
      • expected:
        • I don't the any warning since I'm using Optimize in the expected manner

        Issue Links

          Activity

          Hide
          sebastian.stamm Sebastian Stamm added a comment -

          The error still exists and can be reproduced in the following way:

          • login to optimize and navigate to the reports list page http://localhost:8090/#/reports
          • Copy the url, Open a new incognito tab and paste the url and press enter
          • It will show the login page since you are not logged in in the incognito tab, but the websocket error occurs in the backend log

          I assume this error occurs because the backend tries to write data on a connection that is - for some reason - closed. Maybe we can fix this by removing the websocket from the statusReports map in the onError handler of the StatusWebSocket

          Show
          sebastian.stamm Sebastian Stamm added a comment - The error still exists and can be reproduced in the following way: login to optimize and navigate to the reports list page http://localhost:8090/#/reports Copy the url, Open a new incognito tab and paste the url and press enter It will show the login page since you are not logged in in the incognito tab, but the websocket error occurs in the backend log I assume this error occurs because the backend tries to write data on a connection that is - for some reason - closed. Maybe we can fix this by removing the websocket from the statusReports map in the onError handler of the StatusWebSocket
          Hide
          sebastian.stamm Sebastian Stamm added a comment -

          Here is how the described reproduction steps produce a websocket connection that is opened and then immediately closed:

          • Browser requests index.html and index.js because the URL is http://localhost:8090/#/reports. The hash portion of the url is not sent to the server so it does not know that this is a page the user has to be logged in for, so it can't answer with a redirect
          • The frontend looks at the URL to determine what to render. #/reports renders the Reports list page and the footer
          • The footer establishes a websocket connection
          • At the same time, the report list tries to load the list of reports. The server realizes that the user is not logged in and responds with a redirect
          • Due to the redirect, the newly established websocket connection of the footer is closed.
          • Since the connection was previously opened the backend tries to send the initial status data over the websocket, but it was already closed

          So it's kind of a race condition, but it appears to be very consistent. Ideally, when sending any data over the websocket we could check if it is still open.

          Show
          sebastian.stamm Sebastian Stamm added a comment - Here is how the described reproduction steps produce a websocket connection that is opened and then immediately closed: Browser requests index.html and index.js because the URL is http://localhost:8090/#/reports . The hash portion of the url is not sent to the server so it does not know that this is a page the user has to be logged in for, so it can't answer with a redirect The frontend looks at the URL to determine what to render. #/reports renders the Reports list page and the footer The footer establishes a websocket connection At the same time, the report list tries to load the list of reports. The server realizes that the user is not logged in and responds with a redirect Due to the redirect, the newly established websocket connection of the footer is closed. Since the connection was previously opened the backend tries to send the initial status data over the websocket, but it was already closed So it's kind of a race condition, but it appears to be very consistent. Ideally, when sending any data over the websocket we could check if it is still open.
          Hide
          johannes.heinemann Johannes Heinemann added a comment -

          Kyrylo Zakurdaiev: If you don't know what's exactly or how to test this, feel free to approach me anytime.

          Show
          johannes.heinemann Johannes Heinemann added a comment - Kyrylo Zakurdaiev : If you don't know what's exactly or how to test this, feel free to approach me anytime.

            People

            • Assignee:
              Unassigned
              Reporter:
              johannes.heinemann Johannes Heinemann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: