Connection reset by peer: socket write error

这个错误在网上能查到很多结果,但是我参照做都没有效果,现在问题依然存在,详细的错误信息如下

2014-05-01 21:46:37 -close connection error

java.sql.SQLRecoverableException: IO 错误: Connection reset by peer: socket write error
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:587) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.PhysicalConnection.close(PhysicalConnection.java:4011) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:167) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.stat.StatFilter.connection_close(StatFilter.java:254) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.FilterChainImpl.connection_close(FilterChainImpl.java:163) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl.close(ConnectionProxyImpl.java:115) ~[druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.util.JdbcUtils.close(JdbcUtils.java:82) ~[druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.discardConnection(DruidDataSource.java:967) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:934) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4534) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(StatFilter.java:661) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4530) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:880) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:872) [druid-1.0.0.jar:1.0.0]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:97) [druid-1.0.0.jar:1.0.0]
at org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource.getConnection(AbstractRoutingDataSource.java:162) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:111) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:77) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:382) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:456) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:464) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at com.payplat.util.jdbc.other.impl.JdbcServerImpl.meterList(JdbcServerImpl.java:88) [payplat-dacq-1.0-SNAPSHOT.jar:na]
at com.smotive.action.DasControl.meterList(DasControl.java:52) [DasControl.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_45]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_45]
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) [spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) [spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:920) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:816) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) [servlet-api.jar:na]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:801) [spring-webmvc-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [servlet-api.jar:na]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) [catalina.jar:6.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.35]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.1.RELEASE.jar:3.2.1.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.35]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.35]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina.jar:6.0.35]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina.jar:6.0.35]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina.jar:6.0.35]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina.jar:6.0.35]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina.jar:6.0.35]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) [catalina.jar:6.0.35]
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877) [tomcat-coyote.jar:6.0.35]
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594) [tomcat-coyote.jar:6.0.35]
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675) [tomcat-coyote.jar:6.0.35]
at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method) ~[na:1.7.0_45]
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113) ~[na:1.7.0_45]
at java.net.SocketOutputStream.write(SocketOutputStream.java:159) ~[na:1.7.0_45]
at oracle.net.ns.DataPacket.send(DataPacket.java:210) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetOutputStream.flush(NetOutputStream.java:230) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:321) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:268) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:190) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.net.ns.NetInputStream.read(NetInputStream.java:107) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:350) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4C7Ocommoncall.doOLOGOFF(T4C7Ocommoncall.java:61) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
at oracle.jdbc.driver.T4CConnection.logoff(T4CConnection.java:574) ~[ojdbc6-11.2.0.3.0.jar:11.2.0.3.0]
... 55 common frames omitted

根据网上的说法,出现的Connection reset by peer: 原因可能是多方面的,不过更常见的原因是:
①:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉;
②:客户关掉了浏览器,而服务器还在给客户端发送数据;
③:浏览器端按了Stop
2、3点可以排除,第一点让我觉得确实有问题,但是不知道该如何下手,还有一个问题就是,这个异常不是我手动捕获的,在我try catch前这个异常已经抛出,这个让我不解

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Connection reset by peer: socket write error!!!
[color=#FF0000]为帮助保护您的安全,Internet Explorer已经阻止从此站点下载文件到您的计算机。点击此处查看选项....[/color]rn为什么会出现这个问题啊???如何解决。。。?rnrn[code=Java]ClientAbortException: java.net.SocketException: Connection reset by peer: socket write errorrn at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:319)rn at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:288)rn at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)rn at org.apache.tools.zip.ZipOutputStream.flush(ZipOutputStream.java:508)rn at com.estar.web.mon.ExportAllAction.getZip(ExportAllAction.java:180)rn at com.estar.web.mon.ExportAllAction.handgetzip(ExportAllAction.java:120)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:163)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:128)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:148)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:128)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)rn at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.net.SocketException: Connection reset by peer: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.write(SocketOutputStream.java:136)rn at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:740)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:434)rn at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:299)rn at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:964)rn at org.apache.coyote.Response.action(Response.java:183)rn at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314)rn ... 78 morern[/code]
java.net.SocketException: Connection reset by peer: socket write error
[size=18px]我用以下代码实现文件下载:[/size]rnrn[code]rn<%@ page language="java" pageEncoding="GB18030"%>rnrn<%rn String path = request.getContextPath();rn String basePath = request.getScheme() + "://"rn + request.getServerName() + ":" + request.getServerPort()rn + path + "/";rn rn //rn rn request.setCharacterEncoding("GB18030");rn String srcURL = String.valueOf(request.getAttribute("srcURL"));//资源路径rn%>rnrn rn rn rn rn rn <%rn response.setContentType("application/x-download");rn String url = "/upload/"+srcURL;rn String fileName = srcURL;rn fileName = URLEncoder.encode(fileName, "UTF-8");rn response.addHeader("Content-Disposition", "attachment;filename="rn + fileName);rn RequestDispatcher rd = application.getRequestDispatcher(url);rn rd.forward(request, response);rn response.flushBuffer();rn out.clear();rn out = pageContext.pushBody();rn %>rn rnrn[/code]rn[size=18px]rn下载doc和txt格式的文件还可以,没有报错,可是下载ppt格式的文件他就报如下错误:[/size]rnrn[code=Java]rnjava.net.SocketException: Connection reset by peer: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(Unknown Source)rn at java.net.SocketOutputStream.write(Unknown Source)rn at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:750)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:773)rn at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:583)rn at org.apache.coyote.Response.doWrite(Response.java:560)rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392)rn at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)rn at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)rn at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:2083)rn at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1796)rn at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:874)rn at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:376)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)rn at org.apache.jsp.mainViews.downloadAction_jsp._jspService(downloadAction_jsp.java:74)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)rn at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)rn at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)rn at java.lang.Thread.run(Unknown Source)rn[/code]rnrn[size=18px]请问有谁知道原因的吗?[/size]
Connection reset by peer: socket write error什么原因
警告: Error sending end packetrnjava.net.SocketException: Connection reset by peer: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(Unknown Source)rn at java.net.SocketOutputStream.write(Unknown Source)rn at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:531)rn at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:121)rn at org.apache.jk.core.MsgContext.action(MsgContext.java:301)rn at org.apache.coyote.Response.action(Response.java:183)rn at org.apache.coyote.Response.finish(Response.java:305)rn at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:195)rn at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)rn at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)rn at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)rn at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686)rn at java.lang.Thread.run(Unknown Source)rn2009-7-28 12:24:15 org.apache.jk.common.ChannelSocket processConnectionrn警告: processCallbacks status 2rn我是APACH整合TOMCAT的,我日志里几乎都是这个异常,是什么原因造成的啊!
求救 Connection reset by peer: socket write error
我在jboss上发布一个应用,其中一个页面有一些连接,点击后将回下载avi到本地播放,但是jboss会报错:rn13:47:10,453 ERROR [Engine] StandardWrapperValve[default]: Servlet.service() for servlet default threw exceptionrnjava.net.SocketException: Connection reset by peer: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.write(SocketOutputStream.java:136)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffernr.doWrite(InternalOutputBuffer.java:668)rn at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentitrnyOutputFilter.java:160)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBrnuffer.java:523)rn at org.apache.coyote.Response.doWrite(Response.java:524)rn at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.jarnva:384)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:359)rn at org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:4rn11)rn at org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:398)rn at org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStreamrn.java:110)rn at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.rnjava:1996)rn at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:rn1745)rn at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServrnlet.java:1073)rn at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.javarn:506)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplrnicationFilterChain.java:247)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFrnilterChain.java:193)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVrnalve.java:256)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVrnalve.java:191)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurrnityMgrRealm.java:220)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValvern.java:246)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContairnnerStatsValve.java:76)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:rn2416)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jrnava:180)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatchernrValve.java:171)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jrnava:172)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecuritrnyAssociationValve.java:65)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:rn577)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValrnve.java:174)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContexrnt.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rnrn at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:22rn3)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.javarn:601)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.procernssConnection(Http11Protocol.java:392)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.javarn:565)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPrnool.java:619)rn at java.lang.Thread.run(Thread.java:536)rnrn请教各位大虾如何解决这个问题.
Connection reset by peer:socket write error
Connection reset by peer:socket write error rn报这样的异常是因为用户在发出一个请求之后,还未等待其响应又发出了另外一个请求所导致的,rn有没有办法避免这种异常的发生呢?
write error: connection reset by peer
在linux下用C写网络通讯时rnwrite error: connection reset by peerrn这个是什么错误,什么的原因引起的rn解决方案是什么?
java socket 长连接 Connection reset by peer: socket write error 问题
public class SocketUtil rn private static Logger logger = Logger.getLogger(SocketUtil.class);rn private static Socket socket = new Socket();rn private static OutputStream os = null;rn private static BufferedWriter bw = null;rn private static SocketAddress endpoint = new InetSocketAddress("131.252.83.51",30010);rn public static void getConnection() throws Exception rn //判断连接是否通畅,如果连接不通则重新连接rn int i = 0;rn while(!(socket.isConnected() && !socket.isClosed()))rn i++;rn tryrn socket = new Socket();rn socket.connect(endpoint,15*1000);rn os = socket.getOutputStream();rn catch(Exception e)rn try rn socket.close();rn // 60秒以后重新发起连接;rn// Thread.sleep(60000);rn Thread.sleep(5000);rn catch (IOException e1) rn rn logger.error(e, e);rn rn if(i>=5)rn throw new BizException("连接失败,本次发起连接次数:"+i);rn rn rn rn rn public static void sendMsg() throws Exception rn //判断是否需要连接,如果需要则发起连接rn SocketUtil.getConnection();rn // 组装报文字符串;rn String sendMsg = CTBRechargeRequestXml.toXML();rn try rn System.out.println(socket.toString());rn bw = new BufferedWriter(new OutputStreamWriter(os, "gb2312"));rn bw.write(sendMsg);rn bw.flush();rn// logger.debug("发送报文:[" + sendMsg + "]");rn catch (Exception e) rn e.printStackTrace();rn try rn socket.close();rn bw.close();rn SocketUtil.sendMsg();rn catch (IOException e1) rn rn logger.error(e, e);rn throw new BizException("发送报文失败:" + e.getMessage());rn rn rn public static String recvMsg() throws BizException rn try rn socket.setSoTimeout(10000);rn System.out.println(socket.toString());rn InputStream is = socket.getInputStream();rn DataInputStream dis = new DataInputStream(is);rn int n=0;rn ByteArrayOutputStream baos = new ByteArrayOutputStream(1024 * 64);rn byte[] buf = new byte[1024 * 64]; rn while ((n = dis.read(buf)) >= 0)rn rn baos.write(buf, 0, n);rn rn byte[] respContent = baos.toByteArray();rn String repMsg = new String(respContent,"GB2312");rn return repMsg;rn catch (Exception e) rn logger.error("接收报文出错:" + e.getMessage());rn e.printStackTrace();rn throw new BizException("接收报文出错:" + e.getMessage());rn rn rn rn public static void sendRecv() throws Exception rn //发送报文rn SocketUtil.sendMsg();rn //接收报文rn String repMsg = SocketUtil.recvMsg();rn //解析接收到的报文并入库rn ResolverResponse.resolverSaveXml(repMsg);rn rn说明一下:这个是java长连接发送socket报文, 问什么我每次启动服务 第一次发送报文的时候都会报错,接收报文出错:Connection reset 当我再次发送报文的时候就报:发送报文失败:Connection reset by peer: socket write error的错误。求高手指教
关于tomcat“java.net.SocketException: Connection reset by peer: socket write error”的错误
我这是tomcat+oraclern后台取数据放入页面时,随着点击次数越高,页面显示越来越慢,到最后干脆就是一白页了,后台就报一下面这个错误在:rnClientAbortException: java.net.SocketException: Connection reset by peer: socket write errorrn at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.jarnva:373)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:323)rn at org.apache.coyote.tomcat5.OutputBuffer.writeBytes(OutputBuffer.java:4rn01)rn at org.apache.coyote.tomcat5.OutputBuffer.write(OutputBuffer.java:388)rn at org.apache.coyote.tomcat5.CoyoteOutputStream.write(CoyoteOutputStreamrn.java:76)rn at org.apache.coyote.tomcat5.CoyoteOutputStream.write(CoyoteOutputStreamrn.java:70)rn at com.iss.inut.workflow.webmanage.web.WfDefineCtrl.preview(WfDefineCtrlrn.java:111)rn at sun.reflect.GeneratedMethodAccessor248.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesrnsorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:324)rn at com.iss.system.base.BaseAction.execute(BaseAction.java:334)rn at org.apache.struts.action.RequestProcessor.processActionPerform(RequesrntProcessor.java:421)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.jarnva:226)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:116rn4)rn at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplrnicationFilterChain.java:237)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFrnilterChain.java:157)rn at com.iss.common.CharacterEncodingFilter.doFilter(CharacterEncodingFiltrner.java:102)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplrnicationFilterChain.java:186)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFrnilterChain.java:157)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVrnalve.java:214)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValvrneContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:520)rn at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardrnContextValve.java:198)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextVrnalve.java:152)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValvrneContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:520)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jrnava:137)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValvrneContext.java:104)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jrnava:118)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValvrneContext.java:102)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:520)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValrnve.java:109)rn at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValvrneContext.java:104)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.javrna:520)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)rnrn at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16rn0)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.javarn:799)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.procernssConnection(Http11Protocol.java:705)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.javarn:577)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPrnool.java:683)rn at java.lang.Thread.run(Thread.java:534)rn我应该怎么解决啊?我在网上查了很多,但都没给出一个确切的解决方法啊。
Connection reset by peer: socket write error怎么解决?急急
08:29:22,717 WARN JDBCExceptionReporter:71 - SQL Error: 17002, SQLState: nullrn08:29:22,733 ERROR JDBCExceptionReporter:72 - Io 异常: Connection reset by peer: socket write errorrnorg.springframework.orm.hibernate3.HibernateJdbcException: JDBC exception on Hibernate data access; nested exception is org.hibernate.exception.GenericJDBCException: could not execute queryrnCaused by: org.hibernate.exception.GenericJDBCException: could not execute queryrn at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)rn at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)rn at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)rn at org.hibernate.loader.Loader.doList(Loader.java:2147)rnrn08:29:22,780 ERROR JDBCTransaction:124 - JDBC commit failedrnjava.sql.SQLException: Io 异常: Connection reset by peer: socket write error
jsp文件下载问题:Connection reset by peer: socket write error
我用以下方法实现资源下载功能:rnrn首先是一个客户端JSP页面,显示可下载的资源列表,当用户点击某个资源是,传递一个唯一的资源编号到Action,在数据库中读取该资源的url,然后下载次数+1,然后把url放到一个request里面,再跳到一个JSP页面:rnrn[code=HTML]rn<%@ page language="java" pageEncoding="GB18030"%>rnrn<%rn request.setCharacterEncoding("GB18030");rn String srcURL = String.valueOf(request.getAttribute("srcURL"));//资源路径rnrn response.setContentType("application/x-download");rn String url = "/upload/doc/"+srcURL;rn String fileName = srcURL;rn fileName = URLEncoder.encode(fileName, "UTF-8");rn response.addHeader("Content-Disposition", "attachment;filename="rn + fileName);rn RequestDispatcher rd = application.getRequestDispatcher(url);rn rd.forward(request, response);rn response.flushBuffer();rn out.clear();rn out.clearBuffer();rn out = pageContext.pushBody();rn%>rnrn[/code]rnrn这时候,可以下载资源了,但是我发现点击[color=#FF0000]某些资源[/color],弹出保存框,并且[color=#FF0000]取消保存[/color]的时候,控制台输出如下错误:rnrn[code=Java]rn2009-8-26 22:06:58 org.apache.catalina.core.ApplicationDispatcher invokern严重: Servlet.service() for servlet jsp threw exceptionrnjava.net.SocketException: Connection reset by peer: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(Unknown Source)rn at java.net.SocketOutputStream.write(Unknown Source)rn at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:750)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:773)rn at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:583)rn at org.apache.coyote.Response.doWrite(Response.java:560)rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392)rn at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)rn at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)rn at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:2083)rn at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1796)rn at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:874)rn at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:376)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)rn at org.apache.jsp.mainViews.downloadAction_jsp._jspService(downloadAction_jsp.java:56)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)rn at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)rn at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)rn at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)rn at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)rn at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)rn at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)rn at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)rn at java.lang.Thread.run(Unknown Source)rn2009-8-26 22:06:58 org.apache.catalina.core.StandardWrapperValve invokernrn[/code]rnrn有谁对这个错误了解的吗??有解决方案吗??
Connection reset by peer: socket write error 错误如何解决?
Apache Tomcat/4.1.30 - Error reportHTTP Status 500 - rnrnrnrntype Exception reportrnmessage rndescription The server encountered an internal error () that prevented it from rnfulfilling this request.rnexception rnorg.apache.jasper.JasperException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write errorrn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)rn at java.lang.Thread.run(Unknown Source)rnroot cause rnjava.lang.RuntimeException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write errorrn at com.evision.manager.DBManager.getData(DBManager.java:35)rn at com.evision.table.bean.TableItem.loadFromDatabase(TableItem.java:85)rn at com.evision.table.bean.TableItem.(TableItem.java:40)rn at com.evision.sinopec.newsclass.NewsClassItem.(NewsClassItem.java:33)rn at com.evision.sinopec.newsclass.NewsClassBean.getItem(NewsClassBean.java:64)rn at com.evision.sinopec.newsno.NewsNoEntity.getTopNewsClassNewsNo(NewsNoEntity.java:33)rn at com.evision.sinopec.vod.web.news.NewsWebAgent.getNewsNos(NewsWebAgent.java:843)rn at com.evision.sinopec.vod.web.news.NewsListImpl.setNewsNoList(NewsListImpl.java:184)rn at com.evision.sinopec.vod.web.news.NewsListImpl.goSubPage(NewsListImpl.java:130)rn at org.apache.jsp.vodNewsList_jsp._jspService(vodNewsList_jsp.java:273)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)rn at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)rn at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)rn at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)rn at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)rn at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)rn at java.lang.Thread.run(Unknown Source)rnrnrnrnApache Tomcat/4.1.30
这个问题Connection reset by peer: socket write error
请教各位大侠,这是怎么回事,我用的jdbc,jtds 直连数据库,向ms sql2000数据库中的rntext类型字段写入140M数据造成的,我该怎么解决!!
java itext导出报Connection reset by peer: socket write error
[code=Java]rnpublic static void createReport(HttpServletRequest request,rn HttpServletResponse response, List list) throws Exceptionrn String title = null;rn if(list.size() != 0)rn title = list.get(list.size() - 1).getCreateDate() + " ~ " + list.get(0).getCreateDate() + "日志";rn rn System.out.println(title);rn //设置文件响应信息rn String showFileName =URLEncoder.encode(title + ".doc", "UTF-8");rn showFileName = new String(showFileName.getBytes("iso8859-1"), "gb2312");rn //定义输出类型rn response.reset();rn response.setContentType("application/vnd.ms-word;charset=utf-8");rn response.setHeader("Pragma", "public");rn response.setHeader("Cache-Control", "max-age=30");rn response.setHeader("Content-disposition", "attachment; filename="+ new String(showFileName.getBytes("gb2312"), "iso8859-1"));rn Document doc=new Document(PageSize.A4,50,50,50,50);rn ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();rn RtfWriter2.getInstance(doc, byteArrayOutputStream);rn doc.open();rn rn //添加标题rn Paragraph paragraph=new Paragraph(title,ReportFontFactory.getFontChinese(Font_Type.TITLE));rn paragraph.getFont().setColor(230, 20, 220);rn paragraph.getFont().setSize(18);rn paragraph.setAlignment(Paragraph.ALIGN_CENTER);rn doc.add(paragraph);rnrn for(Diary d : list)rn doc.add(new Paragraph());rn Paragraph p = new Paragraph(" 标题:" + d.getTitle()+" 类型:" + d.getType()+" 天气:" + d.getWeather() +" 日期:" + d.getCreateDate());rn p.getFont().setStyle(Font.BOLD);rn p.getFont().setColor(100, 0, 0);rn doc.add(p);rn doc.add(new Paragraph(" " + d.getContent()));rn rn doc.close();rn ServletOutputStream outputStream=response.getOutputStream();rn byteArrayOutputStream.writeTo(outputStream);rn outputStream.flush();rn outputStream.close();rn rn[/code]
[SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write error
tomcat6.0 + sql2000rnrn刚开始运行没有报错,运行一段时间后,就报下面的错误rn重启tomcat后,又可以正确运行一段时间rn请问要怎么解决呀?rnrn错误提示:rn[ERROR][2009-09-07 09:48:37, 1252288117109][Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write errorrncom.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)rncom.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)rncom.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)rncom.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.submitRequest(Unknown Source)rncom.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)rncom.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)rncom.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)rncom.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)rncom.util.DBjdbc.querySQL(DBjdbc.java:74)rncom.service.StudyService.turnm(StudyService.java:54)rncom.servlet.StudyServlet.doGet(StudyServlet.java:51)rncom.servlet.StudyServlet.doPost(StudyServlet.java:162)rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:637)rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:717)rnorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rnorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rncom.filter.SetEncodingFilter.doFilter(SetEncodingFilter.java:23)rnorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rnorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rnorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rnorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rnorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rnorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rnorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rnorg.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rnorg.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)rnorg.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)rnorg.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)rnorg.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)rnorg.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)rnorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)rnjava.lang.Thread.run(Unknown Source)rn
关于“ Connection reset by peer: socket write error”错误
我最近做了一个论坛程序,发现一个奇怪的现象:发帖子的时候,有时会出现一个帖子连发两遍的情况,即数据库里会有两条记录。rnrn我发现一旦出现这种情况,服务器就会打印如下信息:rnrn2002-08-28 01:31:48 - Ctx( /newbbs ): IOException in: R( /newbbs + /post_ok.jsp + null) Connection reset by peer: socket write errorrnrn2002-08-28 01:31:48 - Ctx( /newbbs ): IOException in: R( /newbbs + /post_ok.jsp + null) Connection reset by peer: socket write errorrnrn请问为什么?rn我的开发环境:tomcat 3.2 /mysql/服务器在WIN2000上,数据库在LINUX上rnrn===========================rnJSP页面插入语句:rnrn//插入froum表,记录发帖rnrnrnDBconnBean.openConnection();rnrn……rnrnString SQL1 = "insert into forum(board,boardname,bq,UID,name,title,detail,sign,artsize,msg_inform,time,lasttime,ip,vtime,new,nickname) values ('"+ board +"','"+ boardsname +"','"+ bq +"','"+ ID +"','"+ name +"','"+ title +"','"+ detail +"','"+ sign_detail +"','"+ artsize +"','"+ msg_inform +"',now(),now(),'"+ request.getRemoteAddr() +"','"+ vtime +"','1','"+ nick +"')";rnrnDBconnBean.executeQuery(SQL1);rnrn……rnrn===============================rnDbConnection.java代码rnrnrnrnimport java.util.*;rnimport java.sql.*;rnimport java.io.*;rnrnpublic class DbConnectionrn Connection conn = null;rn Statement stmt = null;rn ResultSet rset = null;rnrn public DbConnection()rn rnrn /************************************************rn * openConnectionrn * read file "db.properties"rn ************************************************/rn public boolean openConnection()rn Properties prop = new Properties();rn tryrn InputStream is = getClass().getResourceAsStream("db.properties");rn prop.load(is);rn if(is != null) is.close();rn catch(IOException e)rn System.out.println("[DbConnection] Open db.properties File, Error!");rn rnrn String jdbc = prop.getProperty("driver");rn String uri = prop.getProperty("url");rnrn //System.out.println("jdbc=[" + jdbc + "]");rn //System.out.println("uri=[" + uri + "]");rnrn tryrn Class.forName(jdbc).newInstance();rn catch(ClassNotFoundException e)rn System.out.println("JDBC login, Error!@" + e.getMessage());rn return false;rn catch (Exception e)rn System.err.println("Unable to load driver!");rn e.printStackTrace();rn rnrn tryrn this.conn = DriverManager.getConnection (uri);rn catch(SQLException e)rn System.out.println("Generate Connection, Error!" + e.getMessage());rn return false;rn rn return true;rnrn rnrnrn /*************************************************rn * executeQuery and executeUpdatern * query and update DBrn *************************************************/rn public ResultSet executeQuery(String query) throws SQLExceptionrn stmt = conn.createStatement();rn rset = stmt.executeQuery(query);rn return rset;rn rn rnrn public void executeUpdate(String query) throws SQLExceptionrn stmt = conn.createStatement();rn stmt.executeUpdate(query);rn if(stmt != null) stmt.close();rn rnrn public void intodb(String query,String title) throws SQLExceptionrn stmt = conn.createStatement();rn System.out.println("=================="+title+"==================");rn stmt.executeUpdate(query);rn System.out.println("******************"+title+"******************"); rn if(stmt != null) stmt.close();rn rn rn public void close() throws SQLExceptionrn if(conn != null) conn.close();rn if(rset != null) rset.close();rn if(stmt != null) stmt.close();rn rnrn protected void finalize() throws Throwablern close();rn rnrn public static void main(String[] args)rn //Design for test purpose.rn DbConnection dc = new DbConnection();rn System.out.println(dc.openConnection());rn rnrn
关 于 “ Connection reset by peer: socket write error”错误
我最近做了一个论坛程序,发现一个奇怪的现象:发帖子的时候,有时会出现一个帖子连发两遍的情况,即数据库里会有两条记录。rnrn我发现一旦出现这种情况,服务器就会打印如下信息:rnrn2002-08-28 01:31:48 - Ctx( /newbbs ): IOException in: R( /newbbs + /post_ok.jsp + null) Connection reset by peer: socket write errorrnrn2002-08-28 01:31:48 - Ctx( /newbbs ): IOException in: R( /newbbs + /post_ok.jsp + null) Connection reset by peer: socket write errorrnrn请问为什么?rn我的开发环境:tomcat 3.2 /mysql/服务器在WIN2000上,数据库在LINUX上rnrn===========================rnJSP页面插入语句:rnrn//插入froum表,记录发帖rnrnrnDBconnBean.openConnection();rnrn……rnrnString SQL1 = "insert into forum(board,boardname,bq,UID,name,title,detail,sign,artsize,msg_inform,time,lasttime,ip,vtime,new,nickname) values ('"+ board +"','"+ boardsname +"','"+ bq +"','"+ ID +"','"+ name +"','"+ title +"','"+ detail +"','"+ sign_detail +"','"+ artsize +"','"+ msg_inform +"',now(),now(),'"+ request.getRemoteAddr() +"','"+ vtime +"','1','"+ nick +"')";rnrnDBconnBean.executeQuery(SQL1);rnrn……rnrn===============================rnDbConnection.java代码rnrnrnrnimport java.util.*;rnimport java.sql.*;rnimport java.io.*;rnrnpublic class DbConnectionrn Connection conn = null;rn Statement stmt = null;rn ResultSet rset = null;rnrn public DbConnection()rn rnrn /************************************************rn * openConnectionrn * read file "db.properties"rn ************************************************/rn public boolean openConnection()rn Properties prop = new Properties();rn tryrn InputStream is = getClass().getResourceAsStream("db.properties");rn prop.load(is);rn if(is != null) is.close();rn catch(IOException e)rn System.out.println("[DbConnection] Open db.properties File, Error!");rn rnrn String jdbc = prop.getProperty("driver");rn String uri = prop.getProperty("url");rnrn //System.out.println("jdbc=[" + jdbc + "]");rn //System.out.println("uri=[" + uri + "]");rnrn tryrn Class.forName(jdbc).newInstance();rn catch(ClassNotFoundException e)rn System.out.println("JDBC login, Error!@" + e.getMessage());rn return false;rn catch (Exception e)rn System.err.println("Unable to load driver!");rn e.printStackTrace();rn rnrn tryrn this.conn = DriverManager.getConnection (uri);rn catch(SQLException e)rn System.out.println("Generate Connection, Error!" + e.getMessage());rn return false;rn rn return true;rnrn rnrnrn /*************************************************rn * executeQuery and executeUpdatern * query and update DBrn *************************************************/rn public ResultSet executeQuery(String query) throws SQLExceptionrn stmt = conn.createStatement();rn rset = stmt.executeQuery(query);rn return rset;rn rn rnrn public void executeUpdate(String query) throws SQLExceptionrn stmt = conn.createStatement();rn stmt.executeUpdate(query);rn if(stmt != null) stmt.close();rn rnrn public void intodb(String query,String title) throws SQLExceptionrn stmt = conn.createStatement();rn System.out.println("=================="+title+"==================");rn stmt.executeUpdate(query);rn System.out.println("******************"+title+"******************"); rn if(stmt != null) stmt.close();rn rn rn public void close() throws SQLExceptionrn if(conn != null) conn.close();rn if(rset != null) rset.close();rn if(stmt != null) stmt.close();rn rnrn protected void finalize() throws Throwablern close();rn rnrn public static void main(String[] args)rn //Design for test purpose.rn DbConnection dc = new DbConnection();rn System.out.println(dc.openConnection());rn rnrnrn
后台报错Connection reset by peer: socket write error
[Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write errorrnrn我的系统是MS SQL SERVER 2000做的数据库,采用tomcat的dataSource做的连接池,问题是:rn我对数据库进行还原操作,成功后,重新启动数据库服务器!然后跳转到登录页面,而这时就会报 以下错误!rnjava.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write errorrnat com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)rnat com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)rnat com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)rnat com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.submitRequest(Unknown Source)rnat com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown Source)rnat com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)rnat com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)rnat com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)rnat com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)rnat org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)rnat xnc.db.query.DBQuery.getRs(DBQuery.java:60)rnat org.apache.jsp.login_jsp._jspService(login_jsp.java:145)rnat org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnat org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rnat org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rnat org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rnat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rnat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)rnat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)rnat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rnat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)rnat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rnat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)rnat org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)rnat org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)rnat org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rnat java.lang.Thread.run(Unknown Source)rn报此错误的同时,数据库服务器是打开状态,即使我重新启动了 数据库服务器,依然会报此错误,我重新打开一个浏览器页,也一样报此错误!rn只有当我将TOMCAT重新启动后,才访问正常!rnrn这是为什么呢?难道连接池不能监听到数据库服务器的状态?必须重新对连接池初始化?非要重启tomcat?请高手指点!
ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
这个异常 ClientAbortException: java.net.SocketException: Connection reset by peer: socket write errorrn是什么意思啊?谁能帮我解决阿? 这个问题快折磨死我了!rn我做了个权限管理rn前台为rn姓名 权限1 权限2 rn张三 1 1 (1代表无权限,0有无权限)rn李四 0 0rnrn问题是我如果在页面设置权限1或权限2为相反(1变0,0变1),数据库里改变了!但是当我以另一个用户名登陆这时数据库里为rn姓名 权限1 权限2rn张三 0 0 rn李四 1 1rnrn但是jsp页面仍然是rn姓名 权限1 权限2 rn张三 1 1 (1代表无权限,0有无权限)rn李四 0 0rnrn经过好多次刷新就偶尔会和数据库一致rnrn姓名 权限1 权限2rn张三 0 0 rn李四 1 1rnrn权限我在页面用checkbox实现 如果为0就打勾,如果为1就不打勾rn具体代码rn rn rn IDrn USERNAMErn EDITrn ROLE-INrn ROLE-SYSrn DELETErn rn <%rn List staffs = (List)request.getAttribute("staffs");rn%>rn <%rn if(staffs != null)rn rn for(int i = 0; i< staffs.size(); i++)rn rn StaffEx staff1 = (StaffEx)staffs.get(i);rn %>rn rn <%=staff1.getId() %>rn <%=staff1.getName() %>rn Editrn rn <%if(staff1.isIsExist()==true)%>rn rn <% else if(staff1.isIsExist()==false) %>rn rn <%%> rn rn <%if(staff1.getRolesys().equals("0"))%>rn rn <% else if(staff1.getRolesys().equals("1"))%>rn rn <%%> rn Deletern rn <%rn rn rn %>rn
求教:Connection reset by peer: socket write error,怎么解决?
请教一下rn我的web服务器和数据库服务器在两台机子上,使用tomcat连接池,rn如果数据库服务器重新启动的话会出现java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write error错误,请问一下用什麽方法可以解决呢?rn是不是要重新启动一下tomcat啊,rn还有别的好方法吗?敬请指教
java.net.SocketException:Connection reset by peer: socket write error,500分
服务端和客户端在同一台计算机上 rn服务端用Java开发的,客户端用VC开发的,一般情况下运行正常,可是期间时不时的来一个客户端recv出错,几率很小,客户端错误代码10053 Software caused connection abort(软件原因导致连接中断)。而对应的Java服务端也会出错,错误代码Connection reset by peer(连接被对方复位)。 rnrn各位大侠,出这种错误的原因到底在哪?好像特别不好确定错误原因? rnrnrn解决了我另开贴给足500分!!
"Connection reset by peer: socket write error"到底是因为什么?
javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write errorrn
出现java.sql.SQLException: Io 异常: Connection reset by peer: socket write error
数据库执行代码如下:rn[code=Java] try rn if (db == null)rn rn db = new DbConn();rn db.beginTrans();rn rn sql.delete(0, sql.length() -1 );rn sql.append("update ");rn sql.append(table);rn sql.append(" set status='");rn sql.append(rpt.sta);rn sql.append("' where rsq='");rn sql.append(rpt.seq);rn sql.append("' and mid='");rn sql.append(rpt.mid);rn sql.append("' ");rn rn result = db.executeUpdate(sql.toString());rn rpt.dealCount ++;rn catch (SQLException e) rn log.error("getErrorCode=" + e.getErrorCode() ,e);rn if (db != null)rn rn db.rollback();rn db.close();rn db = null;rn nUpdatedReportCount -= nCount;rn nCount = 0;rn rn [/code]rnrn最近老是出现java.sql.SQLException: Io 异常: Connection reset by peer: socket write error异常,数据更新经常失败。错误代码为:12700.rnrn[code=Java]java.sql.SQLException: Io 异常: Connection reset by peer: socket write errorrn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)rn at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)rn at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:562)rn at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2786)rn at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)rn at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:684)rn at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:585)rn at org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)rn at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)rn at oracle.jdbc.internal.OracleStatement$$EnhancerByProxool$$59486b3f.execute()rn[/code]rn请教如何对代码进行改进,提高系统的稳定性。
SqlServer2000出现Connection reset by peer: socket write error
真的很纠结唉,吓个半死。rn 事情是这样的,今天在系统中发现与另外一套数据库交互的功能不能用了,程序是使用了两个数据库,一个Oracle,一个SqlServer2000,数据源是配置在tomcat中的,经过查证发现报Connection reset by peer: socket write error这个错误,去网上查询了一下,发现“服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉”,这个问题比较符合问题原因,现在就想问下大家,大家觉得是不是这个问题呢?如果是这个问题如何解决呢,如果下次再有超过承载量的时候万一再把tomcat中的数据连接给Down掉了,不就又会出现这个问题了么?请问大家觉得如何解决呢。。。rn 还有,不知道这里面的兄弟有没有做java的,出现上面这个问题之后,我就发现tomcat中的关闭和启动都是一闪而过,我直接把tomcat窗口给关闭了,结果就不能启动了阿,log中什么也没存,吓死了,最后重启服务器就好了,有知道这是啥原因的吗?rn 谢谢各位咯。
weblogic经常连接池重建,socket write error: Connection reset by peer
为什么我的weblogic过一段时间就会将连接池全部重建,导致所有客户端访问卡死(十几二十秒)。rn有三台应用服务器,连一个数据库,三台应用服务器都有这现象,但不是同时发生(某一台应用服务器连接池全部重建,导致卡死的时候,其他两台应用服务器访问正常。)rnrn应用服务器操作系统:Windows Server 2003 R2 Standard Edition SP2 rn数据库服务器操作系统:Windows Server 2003 R2 Enterprise X64 Edition SP2rn内存、cpu资源都没有耗尽,应用和数据库服务器cpu使用率都较低,应用服务器内存占用50%左右,数据库服务器内存占用75%左右。rnrn[b]weblogic版本:[/b]rnConsole Release Buildrn8.1.6.0rnServer Release Buildrn8.1.6.0rnServer BuildWebLogic Server rn8.1 SP6 Wed Jun 21 08:18:55 PDT 2006 781680 rnAll Server Product VersionsrnWebLogic Server 8.1 SP6 Wed Jun 21 08:18:55 PDT 2006 781680 rnWebLogic XMLX Module 8.1 SP6 Wed Jun 21 08:18:55 PDT 2006 781680 rnrn[b]Sqlserver数据库版本:[/b]rnMicrosoft SQL Server Management Studio 9.00.5000.00rnMicrosoft Analysis Services 客户端工具 2005.090.5000.00rnMicrosoft 数据访问组件 (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710)rnMicrosoft MSXML 2.6 3.0 6.0 rnMicrosoft Internet Explorer 6.0.3790.3959rnMicrosoft .NET Framework 2.0.50727.42rn操作系统 5.2.3790rnrn[b]日志:[/b]rnrn####<2011-12-3 上午09时48分10秒 CST> <> <> <[ServletContext(id=2723444,name=defaultroot,context-path=/defaultroot)] Root cause of ServletException.rnjavax.servlet.jsp.JspException: Input/output error: java.net.SocketException: socket write error: Connection reset by peer.rnat org.apache.struts.util.ResponseUtils.writePrevious(ResponseUtils.java:186)rnat org.apache.struts.taglib.logic.IterateTag.doAfterBody(IterateTag.java:400)rnat jsp_servlet._comm_mail.__mail_innermailsearch._jspService(__mail_innermailsearch.java:1353)rnat weblogic.servlet.jsp.JspBase.service(JspBase.java:33)rnat weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)rnat weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:370)rnat weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)rnat weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:107)rnat org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)rnat org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)rnat org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:225)rnat org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)rnat org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:760)rnat javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rnat weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1077)rnat weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)rnat weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)rnat weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)rnat com.whir.common.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:93)rnat weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)rnat weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:7049)rnat weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)rnat weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)rnat weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3732)rnat weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2773)rnat weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)rnat weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)rn> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> rn####<2011-12-3 上午09时48分10秒 CST> <> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> <> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> <> <> rn####<2011-12-3 上午09时48分10秒 CST> <> rn####<2011-12-3 上午09时48分10秒 CST> <> rn####<2011-12-3 上午09时48分10秒 CST> <> rn####<2011-12-3 上午09时48分10秒 CST> <> rn
关闭浏览器子窗口之后引起的Connection reset by peer: socket write error
我实现了系统在超时的时候,返回登录页面,我在登录页面做了一些判断,当超时时点开的是子窗口,让父窗口返回登录页面,子窗口关闭,我的登录页面的判断代码如下:rn[code=JScript]rn window.frameElement && window.parent.location.replace('$ctx/login.jsp');rn if(window.opener!=null)rn window.opener.location.replace('$ctx/login.jsp');rn window.close();rn rn[/code]rn这样可以实现需求,但是在ie后台会报错[ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error],但是不影响实现,而在火狐跟谷歌浏览器操作时候不会报错,请问应该怎么才能解决在ie下也不报错。
java 下载connection reset by peer:socket write error
点击下载Excel时,弹出”Internet站点无效“错误信息,后台java显示connection reset by peer:socket write error错误,请问这是什么原因?rn前台使用window.locaton.href转发下载链接,但是使用window.locaton.open,也是同样的错误。
关于Connection reset by peer: socket write error 的问题
在web 开发中,为了防止某文件资源没有找到,服务器要报404错误,我在web.xml 中配置了rn rn java.lang.NullPointerException rn /notFileFound.jsp rn rnrn rn 404 rn /notFileFound.jsp rn rnrn可以正常跳转到notFileFound.jsp 可以正常操作,rn但会出现异常:如下:rn2008-4-10 17:35:57 org.apache.catalina.core.StandardHostValve statusrn警告: Exception Processing ErrorPage[errorCode=404, location=/notFileFound.jsp]rnClientAbortException: java.net.SocketException: Connection reset by peer: socket write errorrn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:366)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:403)rn at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:311)rn at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:293)rn at org.apache.catalina.connector.Response.flushBuffer(Response.java:534)rn at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:285)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)rn at java.lang.Thread.run(Thread.java:595)rn
关于java.net.SocketException: Connection reset by peer: socket write error的问题请教!
大家好,本人在开发首页的地图导航显示数据时,遇到一些关于 rnException Processing ErrorPage[errorCode=404, location=/building.jsp]rnClientAbortException: java.net.SocketException: Connection reset by peer: socket write error的问题。rn本功能大概是:在鼠标移动到某个城市时,将显示一个从数据库读取的城市生产总额和项目数等信息。rn本人用了AJAX进行异步交互读取数据来显示。虽然能成功显示,但是在ECLIPSE的窗口总是会出现错误如上所示,经上网查后发现是可能自己在客户端做测试时用鼠标移动到下个城市太快的缘故吧,导致客户端不停刷新,造成无用的进程,虽然数据能正常显示,但我想请教各位高手有什么好的解决方案使后台不会有Connection reset by peer: socket write error提示出现,谢谢!rnrn以下是我写的一些代码:rnindex.jsp:rn//执行请求发送rnfunction send_request(url,strsearchoose) rn if (url != "") rn // 获取一个XMLHttpRequest实例rn var req = newXMLHttpRequest();rn //alert(req);rn // 设置用来 从请求对象 接收回调通知 的句柄函数 rn var handlerFunction = processRequest(req,strsearchoose);rn req.onreadystatechange = handlerFunction;rn // 打开一个联接到XXXservlet的HTTP POST联接rn // 第三个参数表示请求是异步的rn req.open("GET", url, true);rn // 指示请求体包含form数据rnreq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");rn req.send(null);rn else rn alert("");rn rn rn/*初始化对象并发出XMLHttpRequest请求*/rnfunction newXMLHttpRequest() rn var xmlreq = false;rn if (window.XMLHttpRequest) rn // 在非Microsoft浏览器中创建XMLHttpRequest对象rn xmlreq = new XMLHttpRequest();rn else rn if (window.ActiveXObject) rn //通过MS ActiveX创建XMLHttpRequestrn try rn // 尝试按新版InternetExplorer方法创建rn xmlreq = new ActiveXObject("Msxml2.XMLHTTP");rn rn catch (e1) rn // 创建请求的ActiveX对象失败rn try rn // 尝试按老版InternetExplorer方法创建rn xmlreq = new ActiveXObject("Microsoft.XMLHTTP");rn rn catch (e2) rn // 不能通过ActiveX创建XMLHttpRequestrn rn rn rn rn return xmlreq;rnrnfunction processRequest(req,strsearchoose) rn return function () rn // 如果请求的状态是“完成”rn if (req.readyState == 4) rn // 检查是否成功接收了服务器响应rn if (req.status == 200) rn // 将载有响应信息的XML传递到处理函数rn //responseXmlHandler(req.responseXML);rn //将传回的信息当字符串使用rnif(strsearchoose=="0")rn document.getElementById("report").innerHTML = req.responseText;rn //alert(req);rn elsern document.getElementById("projectlist").innerHTML = req.responseText;rn rn else rn // 有HTTP问题发生rn alert("" + req.status);rn return false;rn rn rn ;rnrnrnfunction showreport(id,name)//使用此方法来调用AJAX框架进行发送请求rn var strid=id;rn var strname=name;rn var stryear=document.getElementById("year").value;rn var strmonth=document.getElementById("month").value;rn var strsearchoose=0;rn //alert(strid+"--"+name+"--"+stryear+"--"+strmonth);rnvar url="ajaxsearch.jsp?searchoose="+strsearchoose+"&statareaid="+strid+"&statareaname="+escape(encodeURI(strname))+"&year="+stryear+"&month="+strmonth;rn //alert(url);rn send_request(url,strsearchoose);//调用上面的请求方法rn rnajaxsearch.jsp:rn<% rn String strReportHtml = ""; //生成的数据显示内容rn String strsearchoose=request.getParameter("searchoose");rn if(strsearchoose.equals("0")) rn//列如:省id:001001001001 : 广东省 城市id:001001001001001 : 广州市rn String strOrganiseNo = request.getParameter("statareaid");rnif (strOrganiseNo == null || (strOrganiseNo + "A").equals("A")) rn//判断传递过来的统计地区编号是否存在rnout.println("index.jsp文件的参数传递错误! statareaid ,请与管理员联系!");rn return;rn rn//列如:地名:广州市 地区名:天河区rnString strOrganiseName = request.getParameter("statareaname"); //统计的地区名称rnstrOrganiseName = (strOrganiseName == null) ? "": strOrganiseName;rn try rn if (!strOrganiseName.equals("")) rn strOrganiseName = JavaScriptEncode.unescape(strOrganiseName);rn //解决中文乱码问题rn strOrganiseName = new String(strOrganiseNamern .getBytes("ISO-8859-1"), "UTF-8");rn rn catch (Exception e) rn e.printStackTrace();rn rn //列如:时间:获取首页的时间rn String strYear = request.getParameter("year");rn String strMonth = request.getParameter("month");rn String strDate=strYear+"年 1~"+strMonth+"月";rn rn //组合成查询条件for rstrConditionrn String strCondition = ""; //统计条件rn if(strMonth=="12")rn strCondition = "where 1=1 and organiseno like '"+strOrganiseNo+"%' and printdate>=to_date('"+strYear+"-01-01','yyyy-mm-dd') and printdate<=to_date('"+strYear+"-12-30','yyyy-mm-dd')";rn elsern strCondition = "where 1=1 and organiseno like '"+strOrganiseNo+"%' and printdate>=to_date('"+strYear+"-01-01','yyyy-mm-dd') and printdate<=to_date('"+strYear+"-"+strMonth+"-30','yyyy-mm-dd')";rn rn String strStatisType = "0";//0:表示按原始备案统计rn strCondition = strCondition + " and RecordSign = '"+ strStatisType + "' "; //是按原始备案统计还是按变更后统计rn rn ReportConf rc = new ReportConf();rn strReportHtml = rc.getReportajax(strCondition, strOrganiseNo, strOrganiseName,strDate);rn /* getReportajax方法把条件进行组合成SQL语句,调用executeQuery方法进行查询返回组合成HTML的数据表格(里面包括了城市的生产总额和项目数等信息)rn */rn out.println(strReportHtml);rn %>
请问这是什么错误:Connection reset by peer: socket write error
请问这是什么错误:Connection reset by peer: socket write error ,请高手帮忙解释一下
出现Connection reset by peer: socket write error后就无法连接
web服务tomcat+sql2000标准版rn并发人数15左右rn以前半年运行没有什么问题,现在这几天经常打不开页面,发现sql有阻塞,还发下有[size=18px][color=#FF0000]”[Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write error“。[/color][/size]这段话是怎么引起的?
tomcat 报 Connection reset by peer: socket write error
最近开发android调用web服务端, android 连接路由器,路由器与电脑,这个错误不是每天都有的,只是偶尔会出现一次rn但是出现一次之后就一直报这个错,关闭tomcat,重启电脑都没有用,这个错误在下一次tomcat启动起来依然报错,除非断网重启,路由器重启,这个错误就解决了.rnrn关键是这个错误不是常见,不能调试,出现的次数很少,但是一旦出现就一直报错.rn日志疯长.rn如何捕捉这个异常,以及这个异常是怎样产生的,rn首先说一下,一下几种没有可能:rn1.服务器响应了,客户端防火墙拦截了rn2.服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉; rnrn
[急]java.net.SocketException: Connection reset by peer: socket write error
要从一个被屏蔽的网站上下载一些东西,于是写了一个Servlet,将它传到了一台境外的服务器上.rn让这台服务器去下载指定的资源,然后再回传给我.相当于一个代理吧.rnrn[code=Java]public void doGet(HttpServletRequest request, HttpServletResponse response)rn throws ServletException, IOException rn String url = request.getParameter("url"); //得到要下载的资源的URL.rnrn if (!StringUtils.isNullOrEmpty(url)) rn System.out.println(url);rn URL u = new URL(url);rn URLConnection conn = u.openConnection();rnrn try ///把响应头设置成一样的.rn for (Map.Entry> m : conn.getHeaderFields()rn .entrySet()) rn if (m != null && m.getKey() != null && m.getValue() != nullrn && m.getValue().size() > 0) rn response.setHeader(m.getKey(), m.getValue().get(0));rn rn rn catch (Exception e) rn // TODO: handle exceptionrn e.printStackTrace();rn CommonLog.log.warn(e);rn rnrn InputStream in = conn.getInputStream(); //从 connection得到inputstreamrn OutputStream out = response.getOutputStream(); //得到向客户端的输出流rn try rn IOUtilsrn .write(conn.getInputStream(), responsern .getOutputStream()); //写数据.rn catch (Exception e) rn e.printStackTrace();rn // TODO: handle exceptionrn CommonLog.log.warn(e);rn if (in != null) rn in.close();rn rn if (out != null) rn out.close();rn rn rn rn [/code]rnrnIOUtils.write()代码如下:rnrn[code=Java] /**rn * 从input里面读取数据然后写入output,读完后自动关闭流。rn * @param input inputStreamrn * @param output outputStreamrn * */rn public static void write(InputStream input, OutputStream output)rn throws IOException rn write(input,output,true);rn rnrn /**rn * 自动从inputstream里面读数据,然后写到outputstream里面去。rn * @param input inputstreamrn * @param output outputstreamrn * @param close 读完后是否自动关闭流。rn * */rn public static void write(InputStream input, OutputStream output,boolean close)rn throws IOException rn byte[] b = new byte[1024];rn int len = input.read(b);rn while (len != -1) rn output.write(b, 0, len);rn len = input.read(b);rn rn rn output.flush();rn if (close) rn input.close(); rn output.close();rn rn [/code]rnrn将程序传到服务器上以后,在服务器上访问rnhttp://localhost:8080/test/down?url=http://www.xxx.com/z.ziprn可以下载成功.rnrn但是当远程访问的时候,就会出现rnjava.net.SocketException: Connection reset by peer: socket write errorrnrn假设服务器IP是2.2.2.2吧.rnrn访问rnhttp://2.2.2.2:8080/test/down?url=http://www.xxx.com/z.ziprn就会出现上面的那个错误.rn注意,我并没有关闭浏览器或者按停止按钮.只要一打上那个地址就会出错.rnrnrn错误发生在:rnrn[code=Java]output.write(b, 0, len);//执行这行代码的时候.[/code]rnrn具体的错误信息如下:rnrnrn[code=Java]ClientAbortException: java.net.SocketException: Connection reset by peer: socket write errorrn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:366)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392)rn at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)rn at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)rn at com.joejoe.utils.IOUtils.write(IOUtils.java:62)rn at com.joejoe.utils.IOUtils.write(IOUtils.java:48)rn at com.tqsoft.wdys.other.getMegavideo.doGet(getMegavideo.java:79)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at com.joejoe.utils.web.CharSetFilter.doFilter(CharSetFilter.java:39)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)rn at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)rn at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)rn at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)rn at java.lang.Thread.run(Unknown Source)rnCaused by: java.net.SocketException: Connection reset by peer: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(Unknown Source)rn at java.net.SocketOutputStream.write(Unknown Source)rn at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:750)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:773)rn at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:583)rn at org.apache.coyote.Response.doWrite(Response.java:560)rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:361)rn ... 27 more[/code]rnrn请问如何解决.谢谢.rn
strtus2 下载文件报Connection reset by peer: socket write error错误
使用Struts2自带的下载功能实现文件下载的时候rn可以正确的弹出对话框rn如果点击保存按钮下载文件rn那么就可以正常的下载rn不会报错rn但是如果点击取消按钮rn取消下载rn就会报Connection reset by peer: socket write error错误rn不知道这个问题该如何解决rn因为这个是Struts2在处理下载请求的时候弹出来的信息rn在哪里进行捕获以及进行处理都不知道
下载功能出现java.net.SocketException: Connection reset by peer: socket write error
java.net.SocketException: Connection reset by peer: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)rn at java.net.SocketOutputStream.write(SocketOutputStream.java:136)rn at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:760)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:347)rn at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:784)rn at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:124)rn at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:593)rn at org.apache.coyote.Response.doWrite(Response.java:560)rn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:353)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:432)rn at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:309)rn at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:273)rn at org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:104)rn at com.opensymphony.webwork.dispatcher.StreamResult.doExecute(StreamResult.java:211)rn at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:143)rn at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:313)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:208)rn at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:175)rn at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:116)rn at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:174)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.webwork.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:169)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186)rn at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)rn at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)rn at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:274)rn at com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)rn at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:595)rn使用的是webworkrnrnjava代码:rn[code=Java]rnpublic String downloadArticleFile()rn Long articleId = Long.parseLong(getRequest().getParameter("id"));rn HttpServletRequest request=(HttpServletRequest)ActionContext.getContext().get(rn ServletActionContext.HTTP_REQUEST);rn String path=request.getSession().getServletContext().getRealPath("/fujian");rn File file = new File(path+"/"+articleId+".pdf");rn contentType="application/octet-stream;charset=UTF-8";rn try rn inputStream= new FileInputStream(file);rn catch (FileNotFoundException e) rn e.printStackTrace();rn rn fileName=articleId+".pdf";rn return "downloadFile";rn rn[/code]rnxwork.xml:rn[code=XML]rnrnrn rn rn rn rn rn rn inputStreamrn $contentTypern attachment;filename="$fileName"rn 2048rn rn rn rnrn[/code]
JAVA求助: connection reset by peer:socket write error
是这样的 我的client端程序如下(节选)rnFileInputStream fis = new FileInputStream(fileName);rn int data;rn while ( -1 != ( data = fis.read( ) ) )rn rn os.write( data );rn rn rn System.out.println( "send file success!!" );rn rn在client端设备上执行后 只从文件发送了一个字节 发送到server端后,程序便出错退出了(server收到了此字节)rn出错在: os.write( data ); 这一行 好象是超时后报错 rnprintStackTrace()错误提示如下 :rnjava.net:SocketException: connection reset by peer :socket write errorrn......................rn......................rnrn奇怪的是 :rn 程序退出后 网络居然不通了??!! 需要拔下网线 再插上网线等一会网络才能ping通 真郁闷呀!!!rnrn各位前辈 多指教 谁遇到过这种问题 rn主要两个问题rn1:程序怎么会执行不下去 只发了一个字节就connection reset by peer :socket write error中断??rn2:网络居然不通了??!!rn
如何解决 connection reset by peer:socket write error 问题??
是这样的 我的client端程序如下(节选)rnFileInputStream fis = new FileInputStream(fileName);rn int data;rn while ( -1 != ( data = fis.read( ) ) )rn rn os.write( data );rn rn rn System.out.println( "send file success!!" );rn rn在client端设备上执行后 只从文件读了一个字节 发送到server端后,程序便出错退出了(server收到了此字节)rnprintStackTrace()错误提示如下 :rnjava.net:SocketException: connection reset by peer :socket write errorrn......................rn......................rnrn奇怪的是 :rn 程序退出后 网络居然不通了??!! 需要拔下网线 再插上网线等一会网络才能ping通 真郁闷呀!!!rnrn各位前辈 多指教 谁遇到过这种问题 rn主要两个问题rn1:程序怎么会执行不下去 只读了一个字节就connection reset by peer :socket write error中断??rn2:网络居然不通了??!!
java.sql.SQLException: Io 异常: Connection reset by peer: socket write error
系统运行一段时间后,登陆系统,出现连接不上数据库的错误rnrnjava.sql.SQLException: Io 异常: Connection reset by peer: socket write errorrnat oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)rnat oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)rnat oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)rnat oracle.jdbc.driver.OracleStatement.(OracleStatement.java:389)rnat oracle.jdbc.driver.OracleConnection.privateCreateStatement(OracleConnection.java:772)rnat oracle.jdbc.driver.OracleConnection.createStatement(OracleConnection.java:712)rnat oracle.jdbc.driver.OracleConnection.setTransactionIsolation(OracleConnection.java:1626)rnat weblogic.jdbc.pool.Connection.setTransactionIsolation(Connection.java:277)rnat weblogic.jdbc.rmi.internal.ConnectionImpl.setTransactionIsolation(ConnectionImpl.java:280)rnat weblogic.jdbc.rmi.SerialConnection.setTransactionIsolation(SerialConnection.java:347)rnat com.company.util.dbservice.DBService.getConnection(DBService.java:41)rnat com.company.usermanagement.VerifyManagement.initConnection(VerifyManagement.java:43)rnat com.company.usermanagement.VerifyManagement.isValidUser(VerifyManagement.java:162)rnat jsp_servlet.__login._jspService(__login.java:134)rnat weblogic.servlet.jsp.JspBase.service(JspBase.java:27)rnat weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)rnat weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)rnat weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)rnat weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)rnat weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)rnat weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)rnat weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)rnat weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)rnat weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)rnrnrnrn我用的数据库是SQLSERVER2000,出现错误以后,不能访问数据库了,重启tomcat就没事了,请问是什么原因?是设置引起的吗?请高手指点。rn
再谈:java.net.SocketException: Connection reset by peer: socket write error
<%@ page contentType="text/html; charset=gb2312" %>rn<%@ page import="java.sql.*"%>rnrnrn rn信息录入rnrn rn rnrnrn rn 参数错误,请查证! rn<%rntryrnrnString strTableName=request.getParameter("name");rnString strTableID="";rnString tmp = "";rn try rn byte[] by = strTableName.getBytes("ISO-8859-1");rn tmp = new String(by);rn rn catch (Exception e) rn rn strTableName=tmp;rn DbConn db=new DbConn();rn Connection cn=db.getConnection();rn Statement stm=cn.createStatement();rn ResultSet rst_ID=stm.executeQuery("select tableID from tblgovTableName where TableName='"+strTableName+"'");rn if(rst_ID.next())rn rn strTableID=rst_ID.getString("TableID");rn buff.addTable(strTableID);rn rn elsern rn out.println("");rn rn tryrn rn rst_ID.close();rn rst_ID=null;rn stm.close();rn stm=null;rn cn.close();rn cn=null;rn catch(Exception e) rnrn int pageCount=0;rn int curPageIndex=0;rn String pageString="";rn if(request.getParameter("Page")==null)rn rn curPageIndex=1;rn rn elsern rn curPageIndex=Integer.parseInt(request.getParameter("Page"));rn rn if(request.getParameter("PageCount")!=null)rn rn pageCount=Integer.parseInt(request.getParameter("PageCount"));rn rn if(curPageIndex>pageCount)rn rn curPageIndex=pageCount;rn rn if(curPageIndex<1)rn rn curPageIndex=1;rn rn ResultSet rst_Page=null;rn Connection conn=db.getConnection();rn Statement stmt=conn.createStatement();rn String sql_Page="exec spGetInfoPage '"+strTableID+"','"+curPageIndex+"'";rn rst_Page=stmt.executeQuery(sql_Page);rn while(rst_Page.next())rn rn /**rn * Find out the all Fields of current main Table .rn */rn pageCount=rst_Page.getInt("PageCount");rn pageString=rst_Page.getString("PageString");rn rn //Close the rst_Tablern tryrn rn rst_Page.close();rn rst_Page=null;rn stmt.close();rn stmt=null;rn conn.close();rn conn=null;rn catch(Exception ex) rn if(pageCount!=0)rn rn String[] PerPage=pageString.split(",");rn String curSelectNumber=PerPage[curPageIndex-1];rnrn ResultSet rst_Field=null;rn String sql_Field="";rn if(curSelectNumber.length()<5) //the number 5 can use any other,but must more than maxDisplay Page Length.rn rn sql_Field="exec spGetInfoResult '"+strTableID+"','"+curSelectNumber+"'";rn rn elsern rn //strTableID=curSelectNumber;rn sql_Field="exec spGetInfoResult '','"+curSelectNumber+"'";rn rn rst_Field=db.ExecQueryNewTwo(sql_Field);rn out.println(strTableName+"");rn int i=0;rn /**rn * 在此对数据进行分页处理,分页显示数据,rst_Field是当前页将要显示的数据rn */rn %>rn rn <%rn while(rst_Field.next())rn rn /**rn *rn *Display the all Feilds of Current Result .rn */rn i++;rn String FID=rst_Field.getString("FieldID").trim();rn String FName=rst_Field.getString("F_Name").trim();rn String FType=rst_Field.getString("F_Type").trim();rn String CodeSetID=rst_Field.getString("CodesetID").trim();rn int DW=Integer.parseInt(rst_Field.getString("DisplayWidth").trim());rn int Len=Integer.parseInt(rst_Field.getString("F_Len").trim());rn //out.println(FName+" "+FType+" "+CodeSetID);rn %>rn rn <%=FName%>rn rn rn <%rn if (Len>50 && FType=="A")rn rn %>rn yes.............rn <%rn rn elsern rn %>rn oh,no...........rn <%rn rn %>rn rn <%rn if (i%2==0)rn rn %>rn rn <%rn rn rn //Close the rst_Fieldrn tryrn rn rst_Field.close();rn rst_Field=null;rn catch(Exception ed) rn rn elsern rn // ERROR OR EMPTY.rn out.println("警告:没有任何数据,请查证!");rn rnrn%>rnrn rn rn rn 共<%=pageCount%>步 第<%=curPageIndex%>步 rn <%if (curPageIndex > 1) %>rn rn <%rn rn %>rn rn <%rn if (curPageIndex < pageCount) rn %>rn rn <%rn rn %>rn rn rn rn rn rn rn rn rn rn <%rncatch(Exception ee) out.println(ee.getMessage());rn %>rnrnrnrnrn以下错误信息,在浏览这个页面的时候,偶尔会出现这个错误,有时它又不出错,为什么???rn信息如下:rnrn
紧急求救:java.net.SocketException: Connection reset by peer: socket write error
网站以前正常运行很长时间了,最近也没有动过。但是今天突然访问速度很慢了,重启Tomcat后可以正常访问,但是一会儿之后就又非常慢了,而且catalina.2006-06-13.log文件能到上百兆!!!rn环境为:windows+tomcat5.5+iis,我将iis和tomcat集成起来了。rnrncatalina.2006-06-13.log文件中的错误为:rnrn2006-6-13 15:48:54 org.apache.jk.core.MsgContext actionrn警告: Error sending end packetrnjava.net.SocketException: Connection reset by peer: socket write errorrn at java.net.SocketOutputStream.socketWrite0(Native Method)rn at java.net.SocketOutputStream.socketWrite(Unknown Source)rn at java.net.SocketOutputStream.write(Unknown Source)rn at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:508)rn at org.apache.jk.common.JkInputStream.endMessage(JkInputStream.java:112)rn at org.apache.jk.core.MsgContext.action(MsgContext.java:293)rn at org.apache.coyote.Response.action(Response.java:182)rn at org.apache.coyote.Response.finish(Response.java:304)rn at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:204)rn at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)rn at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:744)rn at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:674)rn at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:866)rn at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)rn at java.lang.Thread.run(Unknown Source)rn2006-6-13 15:48:54 org.apache.jk.common.ChannelSocket processConnectionrn警告: processCallbacks status 2
Socket Error # 10054 Connection reset by peer
rnrn我开启定时器用 idhttp.get('http://www.5sf.com/index.asp');rnrn代码是这样的rn[code=Delphi(Pascal)]procedure TForm1.Button3Click(Sender: TObject);rnVarrnH:string;rnbeginrn If Edit4.Text<>'' Thenrn beginrn H:=idhttp2.Get('http://www.5sf.com/index.asp');rn Memo3.Clear;rn Memo3.Lines.Add(H);rn Memo3.Lines.SaveToFile(Edit3.text);rn ClearMemory;rn endrn Elsern beginrn MessageBox(Handle,'请先设置生成静态的时间间隔','注意',MB_ICONWARNING);rn Edit4.SetFocus;rn Edit4.Color:=Clred;rn End;rnend;[/code]rnrn过一会就会出现Socket Error # 10054 Connection reset by peerrnrn请问该如何解决?我是超新手,刚学没几天....
相关热词 c# login 居中 c# 考试软件 c# 自然语言分析 c# 分段读取文件 c# 泛型反射 c#打断点 c# 时间转多少秒 c# 线程函数加参数 c# modbus 读取 c#查询集合表