Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-1420

Print on RDP session always generates same file when nginx is used as a reverse proxy

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 1.2.0, 1.3.0
    • None
    • guacamole-server
    • 1.2 on Debian 10, and 1.3 on Debian 11 and Ubuntu 20.04
    • Important

    Description

      Printing from a RDP session always generates the same (first printed) file when printing from the same application.

      To reproduce, open Notepad, type :

      test 1

      Print, check generated pdf

      Edit text to:

      test 2

      Print again, generated pdf will have a new filename but contents will still be "test 1"

       

      Tested against 1.2 on Debian 10, and 1.3 on Debian 11 and Ubuntu 20.04, with latest Chrome and Firefox

       

      Attachments

        Activity

          FaberfoX Faber Fox created issue -
          FaberfoX Faber Fox made changes -
          Field Original Value New Value
          Description Printing from a RDP session always generates the same (first printed) file when printing from the same application.

          To reproduce, open Notepad, type :

          test 1

          Print, check generated pdf

          Edit text to:

          test 2

          Print again, generated pdf will have a new filename but contents will still be "test 1"

           

          Tested against 1.2 on Debian 10, and 1.3 on Debian 11 and Ubuntu 20.04

           
          Printing from a RDP session always generates the same (first printed) file when printing from the same application.

          To reproduce, open Notepad, type :

          test 1

          Print, check generated pdf

          Edit text to:

          test 2

          Print again, generated pdf will have a new filename but contents will still be "test 1"

           

          Tested against 1.2 on Debian 10, and 1.3 on Debian 11 and Ubuntu 20.04, with latest Chrome and Firefox

           
          FaberfoX Faber Fox added a comment -

          Just noticed that after printing for the second time, the session gets frozen, needing to at least disconnect and reconnect to regain control.

          FaberfoX Faber Fox added a comment - Just noticed that after printing for the second time, the session gets frozen, needing to at least disconnect and reconnect to regain control.
          mjumper Mike Jumper added a comment -

          Printing from a RDP session always generates the same (first printed) file when printing from the same application.

          The result of printing a document through Guacamole and RDP is streamed. There is no storage of the document that could result in the same contents being sent twice. The only ways that viewing the second document could show the contents of the first are:

          1. The RDP server did actually print those contents.
          2. You are unintentionally viewing the first document, not the second.

          Retesting printing myself against 1.3.0, both documents printed flawlessly. I see "test 1" when printing the first time and "test 2" after making the change and printing again.

          Just noticed that after printing for the second time, the session gets frozen, needing to at least disconnect and reconnect to regain control.

          This behavior was noted previously in GUACAMOLE-1115. If you can reliably reproduce the deadlock, GUACAMOLE-1115 would be the issue to work with.

          mjumper Mike Jumper added a comment - Printing from a RDP session always generates the same (first printed) file when printing from the same application. The result of printing a document through Guacamole and RDP is streamed. There is no storage of the document that could result in the same contents being sent twice. The only ways that viewing the second document could show the contents of the first are: The RDP server did actually print those contents. You are unintentionally viewing the first document, not the second. Retesting printing myself against 1.3.0, both documents printed flawlessly. I see "test 1" when printing the first time and "test 2" after making the change and printing again. Just noticed that after printing for the second time, the session gets frozen, needing to at least disconnect and reconnect to regain control. This behavior was noted previously in GUACAMOLE-1115 . If you can reliably reproduce the deadlock, GUACAMOLE-1115 would be the issue to work with.
          mjumper Mike Jumper made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Open [ 1 ] Closed [ 6 ]
          FaberfoX Faber Fox added a comment - - edited

          Retested and found that the issue appears on hosts that have nginx as a reverse proxy, configured according to the Docs. On a host without nginx, printing works as expected. 

          mjumper, any ideas what to add to the nginx config to prevent this from happening?

          Reopening and updating issue title to reflect this.

           

          Edit: Also, no freezing issue when nginx is not used

          FaberfoX Faber Fox added a comment - - edited Retested and found that the issue appears on hosts that have nginx as a reverse proxy, configured according to the Docs. On a host without nginx, printing works as expected.  mjumper , any ideas what to add to the nginx config to prevent this from happening? Reopening and updating issue title to reflect this.   Edit: Also, no freezing issue when nginx is not used
          FaberfoX Faber Fox made changes -
          Resolution Cannot Reproduce [ 5 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          FaberfoX Faber Fox made changes -
          Summary Print on RDP session always generates same file Print on RDP session always generates same file when nginx is used as a reverse proxy
          FaberfoX Faber Fox made changes -
          Comment [ Reopening to edit title regarding issue happening when reverse-proxying thru nginx ]
          mjumper Mike Jumper added a comment -

          Retested and found that the issue appears on hosts that have nginx as a reverse proxy, configured according to the Docs. On a host without nginx, printing works as expected.

          The instance that I tested against is behind Nginx as well. If you have verified that you see this behavior only if using Nginx, that firmly establishes that this is not an issue in Guacamole but something to do with your Nginx configuration, perhaps something that is causing Nginx to cache responses.

          If nothing jumps out at you when you look at your Nginx config, please subscribe and post to the user@guacamole.apache.org mailing list:

          https://guacamole.apache.org/support/#mailing-lists

          With this now being a configuration question / troubleshooting and not a potential bug in Guacamole, the place to request assistance from the community would be the user@ list, not the bug tracker.

          mjumper Mike Jumper added a comment - Retested and found that the issue appears on hosts that have nginx as a reverse proxy, configured according to the Docs. On a host without nginx, printing works as expected. The instance that I tested against is behind Nginx as well. If you have verified that you see this behavior only if using Nginx, that firmly establishes that this is not an issue in Guacamole but something to do with your Nginx configuration, perhaps something that is causing Nginx to cache responses. If nothing jumps out at you when you look at your Nginx config, please subscribe and post to the user@guacamole.apache.org mailing list: https://guacamole.apache.org/support/#mailing-lists With this now being a configuration question / troubleshooting and not a potential bug in Guacamole, the place to request assistance from the community would be the user@ list, not the bug tracker.
          mjumper Mike Jumper made changes -
          Resolution Invalid [ 6 ]
          Status Reopened [ 4 ] Closed [ 6 ]
          FaberfoX Faber Fox added a comment -

          Digging further, I found that all the hosts where the issue happens are behind both nginx and cloudflare, when connecting straight to the server ip bypassing cloudflare, the issue doesn't surface. 

          Solved by adding a page rule on cloudflare to bypass the cache on the subdomain that points to Guacamole

          Thanks mjumper and sorry for wasting your time!

           

          FaberfoX Faber Fox added a comment - Digging further, I found that all the hosts where the issue happens are behind both nginx and cloudflare, when connecting straight to the server ip bypassing cloudflare, the issue doesn't surface.  Solved by adding a page rule on cloudflare to bypass the cache on the subdomain that points to Guacamole Thanks mjumper  and sorry for wasting your time!  

          People

            Unassigned Unassigned
            FaberfoX Faber Fox
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: