What you're seeing has nothing to do with Tomcat, nor with file uploads, but with the size of the data sent by the RDP server to Guacamole and the limits built into guacd. The SVC implementation within guac's RDP support has a built-in limit of 1 MB per received PDU:
https://github.com/apache/guacamole-server/blob/b2ae2fdf003a6854ac42877ce0fce8e88ceb038a/src/protocols/rdp/channels/common-svc.h#L37-L42 The warning you're seeing is from here: https://github.com/apache/guacamole-server/blob/b2ae2fdf003a6854ac42877ce0fce8e88ceb038a/src/protocols/rdp/plugins/guac-common-svc/guac-common-svc.c#L114-L122 I've not seen this before with any standard RDP channel. Are you doing anything else within the connection in question? Any custom SVC? - Mike On Fri, Jul 15, 2022 at 5:31 PM David Ramirez <[email protected]> wrote: > Hi to all! I've been using Guacamole for a while for training gateway > purposes and it is just great! Thanks for an amazing open source product! > Now I am writing because I need help from the Gurus. I know it is a > configuration parameter that will likely has to be added to: > /var/lib/tomcat9/web-apps/guacamole/WEB-INF/web.xml > But it has been decades since I've configured Tomcat9 directly and I am > afraid that any change that I do will break things further. > The error itself is self explanatory: > Jul 15 18:16:20 suppod-1 guacd[2253]: RDP server has requested to send a > sequence of 1048632 bytes, but this exceeds the maximum buffer space of > 1048576 bytes. Received data may be truncated. > > When looking on the Guacamole documentation, nothing is mentioned that I > could find. > When going to the Tomcat9 documentation I found some parameters to modify, > all on the web.xml file but as I said, I do not know where to do it on the > guacamole WEB-INF/web.xml file. > The parameter that *looked to me* that may be the one is the following: > <init-param> > <param-name>buffered</param-name> > <param-value>1</param-value> > </init-param> > > As the limit described on the error is 1MB. > > I understand this may be a silly question, if anyone could point me in the > right direction would be really appreciated. > Thanks for any assistance you may provide! > David. > > For reference, here is a more complete section of the log with the error. > The filename TokenDistributionPKG.zip file is the one I am trying to upload. > > Jul 15 18:15:58 suppod-1 guacd[2253]: File open refused (-2): > "\desktop.ini" > Jul 15 18:16:00 suppod-1 guacd[2253]: File open refused (-2): > "\Download\desktop.ini" > Jul 15 18:16:20 suppod-1 guacd[2253]: RDP server has requested to send a > sequence of 1048632 bytes, but this exceeds the maximum buffer space of > 1048576 bytes. Received data may be truncated. > Jul 15 18:16:33 suppod-1 guacd[2253]: message repeated 27 times: [ RDP > server has requested to send a sequence of 1048632 bytes, but this exceeds > the maximum buffer space of 1048576 bytes. Received data may be truncated.] > Jul 15 18:16:34 suppod-1 guacd[2253]: File open refused (-2): > "\Download\TokenDistributionPKG.zip:Zone.Identifier" > Jul 15 18:16:34 suppod-1 guacd[2253]: File open refused (-2): > "\Download\TokenDistributionPKG.zip:Zone.Identifier" > Jul 15 18:16:34 suppod-1 guacd[2253]: File open refused (-2): > "\Download\TokenDistributionPKG.zip" > Jul 15 18:16:35 suppod-1 guacd[2253]: message repeated 2 times: [ File > open refused (-2): "\Download\TokenDistributionPKG.zip"] > Jul 15 18:16:56 suppod-1 guacd[2253]: RDP server has requested to send a > sequence of 1048632 bytes, but this exceeds the maximum buffer space of > 1048576 bytes. Received data may be truncated. > Jul 15 18:17:13 suppod-1 guacd[2253]: message repeated 27 times: [ RDP > server has requested to send a sequence of 1048632 bytes, but this exceeds > the maximum buffer space of 1048576 bytes. Received data may be truncated.] > Jul 15 18:17:14 suppod-1 guacd[2253]: File open refused (-2): > "\TokenDistributionPKG.zip:Zone.Identifier" > Jul 15 18:17:14 suppod-1 guacd[2253]: File open refused (-2): > "\TokenDistributionPKG.zip:Zone.Identifier" > Jul 15 18:17:22 suppod-1 guacd[2253]: Accepted format: 16-bit PCM with 2 > channels at 44100 Hz > Jul 15 18:17:47 suppod-1 guacd[2253]: File open refused (-2): > "\TokenDistributionPKG.zip" > Jul 15 18:17:55 suppod-1 guacd[2217]: User > "@3f34a609-c8da-417b-af58-a4fc2e9df733" disconnected (0 users remain) > Jul 15 18:17:55 suppod-1 guacd[2217]: Last user of connection > "$5280a8eb-b216-4fa4-8fdd-1d7421630bfd" disconnected > Jul 15 18:17:55 suppod-1 tomcat9[675]: 18:17:55.502 [http-nio-8080-exec-6] > INFO o.a.g.tunnel.TunnelRequestService - User "trapx" disconnected from > connection "Win10Token". Duration: 1284470 milliseconds > Jul 15 18:17:55 suppod-1 tomcat9[675]: Exception in thread "Thread-8" > java.lang.IllegalStateException: Message will not be sent because the > WebSocket session has been closed > Jul 15 18:17:55 suppod-1 tomcat9[675]: #011at > org.apache.tomcat.websocket.WsRemoteEndpointImplBase.writeMessagePart(WsRemoteEndpointImplBase.java:430) > Jul 15 18:17:55 suppod-1 tomcat9[675]: #011at > org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:309) > Jul 15 18:17:55 suppod-1 tomcat9[675]: #011at > org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:250) > Jul 15 18:17:55 suppod-1 tomcat9[675]: #011at > org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendString(WsRemoteEndpointImplBase.java:191) > Jul 15 18:17:55 suppod-1 tomcat9[675]: #011at > org.apache.tomcat.websocket.WsRemoteEndpointBasic.sendText(WsRemoteEndpointBasic.java:37) > Jul 15 18:17:55 suppod-1 tomcat9[675]: #011at > org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.sendInstruction(GuacamoleWebSocketTunnelEndpoint.java:152) > Jul 15 18:17:55 suppod-1 tomcat9[675]: #011at > org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint.access$200(GuacamoleWebSocketTunnelEndpoint.java:53) > Jul 15 18:17:55 suppod-1 tomcat9[675]: #011at > org.apache.guacamole.websocket.GuacamoleWebSocketTunnelEndpoint$2.run(GuacamoleWebSocketTunnelEndpoint.java:253) > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > resumed (module 'builtin:omfile') [v8.2001.0 try > https://www.rsyslog.com/e/2359 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), retry 0. There should be messages > before this one giving the reason for suspension. [v8.2001.0 try > https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 rsyslogd: action 'action-8-builtin:omfile' > suspended (module 'builtin:omfile'), next retry is Fri Jul 15 18:18:25 > 2022, retry nbr 0. There should be messages before this one giving the > reason for suspension. [v8.2001.0 try https://www.rsyslog.com/e/2007 ] > Jul 15 18:17:55 suppod-1 guacd[2217]: Internal RDP client disconnected > Jul 15 18:17:55 suppod-1 guacd[582]: Connection > "$5280a8eb-b216-4fa4-8fdd-1d7421630bfd" removed. > Jul 15 18:17:56 suppod-1 guacd[2106]: User > "@d0d18747-c276-4420-9662-4550f1b907f7" disconnected (0 users remain) > Jul 15 18:17:56 suppod-1 guacd[2106]: Last user of connection > "$10b8ed36-f0fc-4dc7-a936-7a8386963f4e" disconnected >
