weixin_42994375
商圈科技-胡翰林
采纳率100%
2019-04-10 20:19 阅读 1.0k
已采纳

tomcat8.5异常:指定的 网络名不再可用。时好时坏

20

问题简介:
系统win s 2016
用的:tomcat8.5
应用:javaweb
问题:javaweb做的网站应用,用servlet上传图片或文件时,tomcat出现以下异常,导致用户上传图片或文件上传不上去,这个问题在重庆tomcat后得到恢复,有时连续几小时不出现问题,可以成功上传,有时就突然出现下面异常。请教各位大神这怎么搞?是tomcat本身问题,还是服务器防火墙的问题,服务器防火墙已经全部关闭,还是路由器防火墙的问题,路由器防火墙也全部关闭!

下面是tomcat异常代码!
org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. 指定的 网络名不再可用。

    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
    at org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:126)
    at com.ringtech.util.UpSeeking.doGet(UpSeeking.java:72)
    at com.ringtech.util.UpSeeking.doPost(UpSeeking.java:168)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    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:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
    at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1688)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at org.apache.tomcat.util.net.AbstractEndpoint.processSocket(AbstractEndpoint.java:1051)
    at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:636)
    at org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper$4.completed(Nio2Endpoint.java:614)
    at sun.nio.ch.Invoker.invokeUnchecked(Unknown Source)
    at sun.nio.ch.Invoker.invokeUnchecked(Unknown Source)
    at sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(Unknown Source)
    at sun.nio.ch.Iocp$EventHandlerTask.run(Unknown Source)
    at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Caused by: java.io.IOException: 指定的网络名不再可用。

    at sun.nio.ch.Iocp.translateErrorToIOException(Unknown Source)
    at sun.nio.ch.Iocp.access$700(Unknown Source)
    ... 5 more
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • 已采纳
    CodeYearn 代码的向往 2019-04-11 08:56

    这样试试:
    第一种方式:
    在httpd.conf中的末尾添加以下代码:
    AcceptFilter http none
    AcceptFilter https none
    EnableSendfile Off

    EnableMMAP off
    第二种方式:
    因为:apache2.4及以上的版本“AcceptFilter None”取代了“Win32DisableAcceptEx”

    所以:
    1、如果你的apache版本为APAche2.0.49及以上版本,增加Win32DisableAcceptEx配置项

    2、如果你的apache版本为APAche2.4及以上版本,增加AcceptFilter http None AcceptFilter https None配置项替代“Win32DisableAcceptEx”


    ThreadsPerChild 1920
    #MaxConnectionsPerChild
    MaxRequestsPerChild 10000
    Win32DisableAcceptEx

    点赞 评论 复制链接分享
  • devmiao devmiao 2019-04-10 23:49

    检查下网络还有服务器的负载还有计算机上的消耗资源的软件

    点赞 评论 复制链接分享
  • toutuopang alvenhhh 2019-04-12 14:07

    既然是时好时坏,那说明是本身架构有问题,是否遭到恶意cc攻击,导致web压力过载,或者核心节点有问题,可以从web优化和架构加固方面入手试试,没有遇到过这种问题,若是您解决了还请您分享一下

    点赞 评论 复制链接分享

相关推荐