You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Heinrich Michael (PS-EC/EBT3)" <Mi...@de.bosch.com.INVALID> on 2020/03/13 13:52:43 UTC

uploading multipart messages with Tomat 9.0.31 and TLS not working

Hello all,

I found out that I've trouble in uploading multipart messages with TLS in Tomcat 9.0.31 (Windows server 2012/2016, Java 1.8.0_241, also 221). With the same server config in 9.0.30 it works well. Uploading multipart messages in 9.0.31 without TLS works also. This can be reproduced when using the manager app with/without TLS. When using TLS, Tomcat logs below errors in the log file.
I'm just not sure if this is a bug or a wrong configuration/misunderstanding from my site. Although I've found nothing in the change log for 9.0.31 that makes me think I've to modify my config files.
Is the problem I describe known to someone else or just a configuration issue?


Catalina.log:
13-Mar-2020 10:32:53.273 INFO [https-openssl-nio-8743-exec-5] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
 Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
	java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
		at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:416)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:260)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.lang.Thread.run(Thread.java:748)

Localhost.log:
13-Mar-2020 10:32:53.273 SEVERE [https-openssl-nio-8743-exec-5] org.apache.catalina.core.ApplicationContext.log HTMLManager: FAIL - Deploy Upload Failed, Exception: [org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly]
	java.io.IOException: org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
		at org.apache.catalina.connector.Request.parseParts(Request.java:2917)
		at org.apache.catalina.connector.Request.parseParameters(Request.java:3198)
		at org.apache.catalina.connector.Request.getParameter(Request.java:1123)
		at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:381)
		at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:141)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
		at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
		at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
		at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
		at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
		at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
		at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:666)
		at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
		at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
		at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:688)
		at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
		at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
		at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
		at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
		at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
		at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1639)
		at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.lang.Thread.run(Thread.java:748)
	Caused by: org.apache.tomcat.util.http.fileupload.impl.IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly
		at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:297)
		at org.apache.catalina.connector.Request.parseParts(Request.java:2870)
		... 26 more
	Caused by: org.apache.tomcat.util.http.fileupload.MultipartStream$MalformedStreamException: Stream ended unexpectedly
		at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.makeAvailable(MultipartStream.java:983)
		at org.apache.tomcat.util.http.fileupload.MultipartStream$ItemInputStream.read(MultipartStream.java:881)
		at java.io.FilterInputStream.read(FilterInputStream.java:133)
		at org.apache.tomcat.util.http.fileupload.util.LimitedInputStream.read(LimitedInputStream.java:132)
		at java.io.FilterInputStream.read(FilterInputStream.java:107)
		at org.apache.tomcat.util.http.fileupload.util.Streams.copy(Streams.java:98)
		at org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:293)
		... 27 more


In my web application, were I also handle multipart messages another error occurs, but also only with 9.0.31 and TLS activated:
[HTTP 400 Bad Request] [POST.a2l.a2lcompliparams] [https-openssl-nio-8843-exec-7 | SID: b71ec2d0-cda6-4042-9f20-00bfa57d4453]
javax.ws.rs.BadRequestException: HTTP 400 Bad Request
...
Caused by: org.jvnet.mimepull.MIMEParsingException: Reached EOF, but there is no closing MIME boundary.
	at org.jvnet.mimepull.MIMEParser.readBody(MIMEParser.java:230)


My TLS config:
<Connector port="${https.port}"
              protocol="org.apache.coyote.http11.Http11NioProtocol"
              SSLEnabled="true"
              maxThreads="150"
              scheme="https"
              secure="true"
              keystoreFile=FileLoc
              keystorePass=MyPwd
              clientAuth="false"
              sslProtocol="TLSv1.2"
              sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1"
              ciphers="TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
                       TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
                       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
                       TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
                       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
                       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
                       TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
                       TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
                       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
                       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
                       TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
                       TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA"
   />			





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: uploading multipart messages with Tomat 9.0.31 and TLS not working

Posted by Mark Thomas <ma...@apache.org>.
On 13/03/2020 13:52, Heinrich Michael (PS-EC/EBT3) wrote:
> Hello all,
> 
> I found out that I've trouble in uploading multipart messages with TLS in Tomcat 9.0.31 (Windows server 2012/2016, Java 1.8.0_241, also 221). With the same server config in 9.0.30 it works well. Uploading multipart messages in 9.0.31 without TLS works also. This can be reproduced when using the manager app with/without TLS. When using TLS, Tomcat logs below errors in the log file.
> I'm just not sure if this is a bug or a wrong configuration/misunderstanding from my site. Although I've found nothing in the change log for 9.0.31 that makes me think I've to modify my config files.
> Is the problem I describe known to someone else or just a configuration issue?

https://bz.apache.org/bugzilla/show_bug.cgi?id=64195

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org