urllib2.URLError: <urlopen error [Errno 104] Connection reset by peer>

python爬虫使用mechanize模拟登陆出现,求解决方法,没有在代码中添加代理ip,不知到如何解决,已经困扰我一上午了,不知道哪位大侠可以帮忙啊!

1个回答

可能是对方禁止你爬,检测到你是爬虫

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
write error: connection reset by peer
在linux下用C写网络通讯时rnwrite error: connection reset by peerrn这个是什么错误,什么的原因引起的rn解决方案是什么?
java.net.SocketException: Connection reset by peer: Connection reset by peer
java.net.SocketException: Connection reset by peer: Connection reset by peer 这个异常是怎么引起的?
帮忙 错误代码[104] 错误信息[Connection reset by peer]
RecvSocketNoSync 读取数据错误 错误代码[104] 错误信息[Connection reset by peer]
Linux下客户端提示104,Connection reset by peer
我在linux下编写了一个linux客户端程序,连接windows服务器的时候经常出现错误号104,Connection reset by peer。再次发送的时候提示:错误号:32,Broken pipe。rn 而此时服务器端的连接还是存在的,根本没有检测到断开的信号。rn 麻烦大家帮帮忙。谢谢。代码如下:rnrnint len=0;rn char szbuff[1024]=0;rn int count = 0;rn int nNetTimeout=8000;rn int nRevTimeout=8000;rn string strBuff;rn // GetFileBuff(fileName,strBuff);rn int ret = 0;rn struct sockaddr_in addr;rnrn SOCKET data_s = socket(AF_INET,SOCK_STREAM,0);rn addr.sin_family = AF_INET;rn addr.sin_port = htons(g_iPort);rn addr.sin_addr.s_addr = inet_addr(g_cServerIp);rn ret = connect(data_s,(SOCKADDR*)&addr,sizeof(addr));rn if (ret!=0)rn rn printf("[%s %s] connect file Port falied\n",GetDate().c_str(),GetTime().c_str());rn ::close(data_s);rn ////closesocket(pCtx->control_s);rn exit(0) ;rn rnrn while(1)rn rn sleep(1);rn rn int ret = send(data_s,"1111111111111111111111111111111111111111111111111111111",100,0);rn //int ret = send(data_s,"1234567890",10,0);rn printf("[%s %s]send %d,%d,%s\n",GetDate().c_str(),GetTime().c_str(),ret,errno,strerror(errno));rn if (ret !=100)rn rn //close(data_s);rn //exit(0);rn rn rn shutdown(data_s,0);rn sleep(1);rn ::close(data_s);
libuv:connection reset by peer
https://blog.csdn.net/smilingleo/article/details/133904rn这个搜到解决不了。rn这个问题网上有过其他类型的解答,不过没作用,有大佬遇到这种问题的不?rn
idhttp:connection reset by peer !!!
用idhttp下载文件:rn varrn DownLoadFile:TFileStream;rn beginrn idhttp1.Request.ProxyServer:='144.20.80.101';rn idhttp1.Request.ProxyPort:=808;rn DownLoadFile:=TFileStream.Create('f:\aadda.exe',fmCreate);rn IdHTTP1.Get('http://www.datanew.com/products/car/download/zkb1080.exe',DownLoadFile);rn DownLoadFile.Free;rnrnrn第一次下载成功,再试一次总是提示“socket error...connection reset by peer ”,原因是什么?rn如何彻底解决?rnrn 下载完毕后加上 idhttp1.DisconnectSocket;也不行的。
Connection reset by peer 求助
本人的java程序部署在weblogic中,数据库为oracle9i,非常的简单,就是提供了一个接口供别人调用后然后更新某表的一个字段值,但现在发生了如下的问题,即在执行更新操作时,偶尔会出现“Io 异常: Connection reset by peer.”这样的异常,更新语句非常非常的简单,就是最普通的UPDATE语句,使用的是JDBC连接池,出现的概率也不是很大,请问大家能彻底解决这样的问题吗?比如通过修改weblogic相关配置什么的。
connection reset by peer?
上位机(客户端)定时给下位机(服务端)发查询命令.rn服务端去查询,数据库,如果有新数据,返回给客户端,如果没,告诉客户端没有新数据.rn运行了,10个小时左右,rn提示,connectiong reset by peerrn这个错误,一般是什么情况下给出的。rn大家,是否遇到过这类问题.后来怎么解决的.
Connection reset by peer
服务端和客户端都是用idUDPServer;服务端的ThreadEven为Truernrn为何运行一段时间(接收数据一段时间)后,会出现:如下错误rnConnection reset by peer.rnSocket Error # 10054
java.net.SocketException: Connection reset by peer
socket客户端总异常,不知道怎么解决
Connection reset by peer?
今天我连接一个服务端rnbttrack.9you.comrn6969rnconnect成功了 但是刚开始接收数据就出现Connection reset by peer错误,接收recv反回-1rn请问这是怎么回事情.rnrnps.服务端是www.9you.com游戏公司的提供下载游戏的 rn
java.io.IOException: Connection reset by peer
java.io.IOException: Connection reset by peerrn at sun.nio.ch.FileDispatcher.read0(Native Method)rn at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:21)rn at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:233)rn at sun.nio.ch.IOUtil.read(IOUtil.java:206)rn at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)rn at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:179)rn at org.apache.mina.transport.socket.nio.NioProcessor.read(NioProcessor.java:41)rn at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:585)rn at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:563)rn at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:552)rn at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:56)rn at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:891)rn at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)rn at java.lang.Thread.run(Thread.java:595)rn 请教高手,这个错误是如何引起的,如何解决?不甚感激!
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]
Connection reset by peer: socket write error
我做的一个下载功能,可以正常下载文件,可是多次单击下载链接,后台就报这种bug 是怎么回事!求高手指教rnrnrnClientAbortException: java.net.SocketException: Connection reset by peer: socket write errorrn at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:369)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:354)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 FileName.DownFileBean.setFileName(DownFileBean.java:40)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 org.apache.jasper.runtime.JspRuntimeLibrary.handleSetProperty(JspRuntimeLibrary.java:665)rn at org.apache.jsp.down_jsp._jspService(down_jsp.java:96)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)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:291)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)
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有没有办法避免这种异常的发生呢?
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请问该如何解决?我是超新手,刚学没几天....
分析一下java.net.SocketException: Connection reset by peer: Connection reset by peer
使用jakarta-common-net编写了一个ftp客户端上传程序。rnrn运行一段时间后,会抛出上述异常。rn查看API文档后发现是由与setSoTimeout方法引起,该方法实际使用的是java.net.Socket的setSoTimeout,但是我还是不能确定产生异常的确切原因,rnSocketException - if there is an error in the underlying protocol, such as a TCP error.rn请大家帮忙分析一下。谢谢!
关于connection reset by peer的错误
我们开发了一套系统。在使用过程中总是出现connection reset by peer这个错误。是什么原因造成的。怎么解决呢!!rnrn
connection reset by peer 是怎么回事?
我的jsp程序在运行时老是在tomcat中出现“connection reset by peer socket write error” 是怎么回事阿?还有我的程序虽然出现这种问题,但是有正常结果出来,请各位仁兄指点。rn 而且,程序在刷新是老是出现空指针异常(我的程序中进行了数据库访问),不知道与这有没有关系?rn 谢谢有能力的大侠指点
Linux下C++经常出现错误号104,Connection reset by peer
我在linux下编写了一个linux客户端程序,连接windows服务器的时候经常出现错误号104,Connection reset by peer。再次发送的时候提示:错误号:32,Broken pipe。rn 而此时服务器端的连接还是存在的,根本没有检测到断开的信号。rn 麻烦大家帮帮忙。谢谢。代码如下:rnrnint len=0;rn char szbuff[1024]=0;rn int count = 0;rn int nNetTimeout=8000;rn int nRevTimeout=8000;rn string strBuff;rn // GetFileBuff(fileName,strBuff);rn int ret = 0;rn struct sockaddr_in addr;rnrn SOCKET data_s = socket(AF_INET,SOCK_STREAM,0);rn addr.sin_family = AF_INET;rn addr.sin_port = htons(g_iPort);rn addr.sin_addr.s_addr = inet_addr(g_cServerIp);rn ret = connect(data_s,(SOCKADDR*)&addr,sizeof(addr));rn if (ret!=0)rn rn printf("[%s %s] connect file Port falied\n",GetDate().c_str(),GetTime().c_str());rn ::close(data_s);rn ////closesocket(pCtx->control_s);rn exit(0) ;rn rnrn while(1)rn rn sleep(1);rnrn int ret = send(data_s,"1111111111111111111111111111111111111111111111111111111",100,0);rn //int ret = send(data_s,"1234567890",10,0);rn printf("[%s %s]send %d,%d,%s\n",GetDate().c_str(),GetTime().c_str(),ret,errno,strerror(errno));rn if (ret !=100)rn rn //close(data_s);rn //exit(0);rn rn rn shutdown(data_s,0);rn sleep(1);rn ::close(data_s); rnrnrn日志如下:rn[0715 10:05:45 894261]send 100,0,Successrn [0715 10:05:45 894342]send 100,0,Successrn [0715 10:05:45 894367]send 100,0,Successrn [0715 10:05:45 894374]send 100,0,Successrn [0715 10:05:45 894376]send -1,104,Connection reset by peerrn谢谢大家。 rnrn[0715 10:05:45 894261]send 100,0,Success 成功的次数不固定。
SQL SERVER7 Connection reset by peer
我使用SQL SERVER7,用JDBC连接使用一段时间后出现 rn10054 Connection reset by peer 错误,请问这是我的哪儿的配置有问题 rn我看了MICROSOFT的在线帮助,只是说在服务器上的错误(Connecting to SQL Server from TCP/IP Sockets Clients rn),具体没说明,请各位 rn帮助。谢
connection reset by peer 10054错误
使用IDDY10的idtcpClient:rn程序中,使用一个计时器,检查idTcpClient的状态,代码如下:rntryrn if not idTcpClient.Connected thenrn beginrn idTcpClient1.connect('127.0.0.1',9099);rn end;rnexceptrn //rnend;rn当服务器强制断开,就出现如题所示的错误信息。rn我在Except中却无法获取。rnrn问,怎么才能不出现这样的错误提示。
socket error#10054 connection reset by peer
客户端和服务器连接的时候就出现以上问题。。在本机上的客户端连接本机运行的服务器没有问题,但是在其他机器上的客户端连接就出问题了。。rn rn客户端rnrnunit UnitLogin;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs, StdCtrls,HttpApp,inifiles, ScktComp, IdBaseComponent,rn IdComponent, IdIPWatch, Menus, Sockets, IdTCPConnection, IdTCPClient,rn ExtCtrls, IdAntiFreezeBase, IdAntiFreeze;rntypern User_Info=recordrn User_Number:String[8];//登录的JJ号rn User_Password:String[12];//登录密码rn User_IpAddress:String[15];//用户的IP地址rnend;rntypern TFormlogin = class(TForm)rn LabelLoginName: TLabel;rn LabelPassword: TLabel;rn EditPassword: TEdit;rn ButtonLogin: TButton;rn ComboBoxLoginName: TComboBox;rn ButtonSet: TButton;rn Button1: TButton;rn IdIPWatch1: TIdIPWatch;rn IdTCPClient1: TIdTCPClient;rn Timer1: TTimer;rn IdAntiFreeze1: TIdAntiFreeze;rn procedure ComboBoxLoginNameKeyPress(Sender: TObject; var Key: Char);rn procedure EditPasswordKeyPress(Sender: TObject; var Key: Char);rn procedure ButtonLoginClick(Sender: TObject);rn procedure ButtonSetClick(Sender: TObject);rn procedure FormShow(Sender: TObject);rn procedure FormCreate(Sender: TObject);rn procedure Button1Click(Sender: TObject);rn procedure IdTCPClient1Disconnected(Sender: TObject);rn procedure IdTCPClient1Connected(Sender: TObject);rn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn Formlogin: TFormlogin;rn info:user_info;rn Str:String;rn td:DWORD;rn doConnect:Boolean;rnimplementationrnrnuses UnitSet, UnitChat, server;rnrn$R *.dfmrnprocedure readthread;rnvarrn s:String;rnbeginrn while doConnect dorn beginrn s:=FormLogin.IdTCPClient1.ReadLn;rn sleep(100);rn end;rnend;rnrnprocedure TFormlogin.ComboBoxLoginNameKeyPress(Sender: TObject;rn var Key: Char);rnbeginrn case Key ofrn '0'..'9',#8:;rn #27:ComboBoxLoginName.Text:='';rn #13:self.EditPassword.SetFocus;rn else Key:=#0;rn end;rnend;rnrnprocedure TFormlogin.EditPasswordKeyPress(Sender: TObject; var Key: Char);rnbeginrn case Key ofrn '0'..'9','a'..'z','A'..'Z',#8:;rn #27:EditPassword.Text:='';rn #13:self.ButtonLoginClick(self);rn else Key:=#0;rn end;rnend;rnrnprocedure TFormlogin.ButtonLoginClick(Sender: TObject);rnvarrn recInfo:String;rnbeginrn //CreateThread(nil,0,@ReadThread,nil,0,td);rn if self.IdTCPClient1.Connected thenrn idtcpclient1.Disconnect;rn if (self.ComboBoxLoginName.Text<>'') and (self.EditPassword.Text<>'') thenrn beginrn IdTCPClient1.Host:=intToStr(ini.ReadInteger('config','ip0',192))+'.'+intToStr(ini.ReadInteger('config','ip1',168))+'.'+intToStr(ini.ReadInteger('config','ip2',0))+'.'+intToStr(ini.ReadInteger('config','ip3',87));rn IdTCPClient1.Port:=8088;rn IdTCPClient1.Connect;rn info.User_Number:=comboboxLoginName.Text;rn info.User_Password:=EditPassword.Text;rn info.User_IpAddress:=IdIPWatch1.LocalIP;rn IdTCPClient1.WriteBuffer(info,sizeof(info),true);rn recinfo:=IdTCPClient1.ReadLn;rn if recInfo='ls' thenrn beginrn showmessage('登陆成功');rn self.Hide;rn formchat.Show;rn endrn elsern beginrn showmessage('登录失败');rn idtcpclient1.Disconnect;rn end;rn endrn elsern beginrn showmessage('用户名或密码不能为空');rn end;rnend;rnprocedure TFormlogin.ButtonSetClick(Sender: TObject);rnrnbeginrn formSet.Show;rn ButtonSet.Enabled:=false;rnend;rnrnprocedure TFormlogin.FormShow(Sender: TObject);rnbeginrn ComboboxLoginName.SetFocus();rnend;rnrnprocedure TFormlogin.FormCreate(Sender: TObject);rnbeginrn showmessage('本机的IP地址为'+self.IdIPWatch1.LocalIP);rn inifileName:=Extractfilepath(application.ExeName)+'ip.ini';rn ini:=TiniFile.Create(iniFileName);rnend;rnrnprocedure TFormlogin.Button1Click(Sender: TObject);rnbeginrn formServer.show;rnend;rnprocedure TFormlogin.IdTCPClient1Disconnected(Sender: TObject);rnbeginrn formserver.StatusBar1.Panels[0].Text:='客户端'+IdIPWatch1.LocalIP+'断开连接';rnend;rnrnprocedure TFormlogin.IdTCPClient1Connected(Sender: TObject);rnbeginrn formserver.StatusBar1.Panels[0].Text:='客户端'+IdIPWatch1.LocalIP+'已经连接';rnend;rnrnend.rn--------------------------------------------------------------------------------------------------------------rn--------------------------------------------------------------------------------------------------------------rn-----------------------------------------服务器端-------------------------------------------------------------rnrnrnunit server;rnrninterfacernrnusesrn Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,rn Dialogs, ExtCtrls, ScktComp, ToolWin, ComCtrls, StdCtrls, FileCtrl, Menus,rn DB, ADODB, IdBaseComponent, IdComponent, IdTCPServer;rnrnconstrn CMax=10;rnrntypern User_Info1=recordrn User_Number:String[8];//登录的JJ号rn User_Password:String[12];//登录密码rn User_IpAddress:String[15];//用户的IP地址rnend;rnrntypern TformServer = class(TForm)rn ControlBar1: TControlBar;rn ToolBar1: TToolBar;rn ButtonConnect: TButton;rn ButtonBreak: TButton;rn ButtonClose: TButton;rn StatusBar1: TStatusBar;rn Memo1: TMemo;rn Edit1: TEdit;rn ListBox1: TListBox;rn ADOConnection1: TADOConnection;rn ADOQuery1: TADOQuery;rn IdTCPServer1: TIdTCPServer;rnrn procedure ButtonCloseClick(Sender: TObject);rn procedure FormClose(Sender: TObject; var Action: TCloseAction);rn procedure IdTCPServer1Connect(AThread: TIdPeerThread);rn procedure ButtonConnectClick(Sender: TObject);rn procedure IdTCPServer1Exception(AThread: TIdPeerThread;rn AException: Exception);rn procedure IdTCPServer1Status(ASender: TObject;rn const AStatus: TIdStatus; const AStatusText: String);rn procedure IdTCPServer1Execute(AThread: TIdPeerThread);rn procedure ButtonBreakClick(Sender: TObject);rnrn privatern Private declarations rn publicrn Public declarations rn end;rnrnvarrn formServer: TformServer;rn info1:User_Info1;rnimplementationrnrnuses UnitLogin;rnrn$R *.dfmrnrnprocedure TformServer.ButtonCloseClick(Sender: TObject);rnbeginrn close;rn IdTCPServer1.Destroy;rn self.IdTCPServer1.Active:=false;rn self.StatusBar1.Panels[0].Text:='服务器已关闭';rnend;rnrnprocedure TformServer.FormClose(Sender: TObject; var Action: TCloseAction);rnbeginrn self.ADOQuery1.Free;rn self.ADOConnection1.Free;rn IdTCPServer1.Destroy;rn if formlogin.IdTCPClient1.connected thenrn formLogin.IdTCPClient1.Disconnect;rnend;rnrnrnprocedure TformServer.IdTCPServer1Connect(AThread: TIdPeerThread);rnbeginrn Athread.Connection.ReadBuffer(info1,sizeof(info1));rn self.ADOQuery1.SQL.Clear;rn self.ADOQuery1.SQL.Add('select * from users where user_Number='+info1.User_Number+' and user_password="'+info1.User_Password+'"');rn self.ADOQuery1.Open;rn if not ADOQuery1.IsEmpty thenrn beginrn Athread.Connection.WriteLn('ls');rn endrn elsern beginrn athread.Connection.WriteLn('lf');rn end;rn ADOQuery1.Close;rnrnend;rnrnprocedure TformServer.ButtonConnectClick(Sender: TObject);rnbeginrn IdTCPServer1.Active:=true;rn self.IdTCPServer1.DefaultPort:=8088;rn self.StatusBar1.Panels[0].Text:='服务器已开启';rnend;rnrnprocedure TformServer.IdTCPServer1Exception(AThread: TIdPeerThread;rn AException: Exception);rnbeginrn showmessage(Athread.Connection.Socket.Binding.PeerIP+Aexception.Message);rnend;rnrnprocedure TformServer.IdTCPServer1Status(ASender: TObject;rn const AStatus: TIdStatus; const AStatusText: String);rnbeginrn showmessage('这是状态选项里的文本'+AStatusText);rnend;rnrnprocedure TformServer.IdTCPServer1Execute(AThread: TIdPeerThread);rnbeginrn // Athread.FreeOnTerminate:=true;rnrnend;rnrnprocedure TformServer.ButtonBreakClick(Sender: TObject);rnbeginrn self.IdTCPServer1.Active:=false;rn self.StatusBar1.Panels[0].Text:='服务器已关闭';rnend;rnrnend.
502 Connection reset by peer错误
VMWare中安装了虚拟机ubuntu 16.04,虚拟网路使用的NAT模式,rn因为在公司访问外网需要有代理,所以将/etc/apt/apt.conf配置了如下内容,rnAcquire::http::proxy "http://username:passwd@proxy.*****.com:8080/";rnAcquire::https::proxy "https://username:passwd@proxy.*****.com:8080/";rnAcquire::ftp::proxy "ftp://username:passwd@proxy.*****.com:8080/";rnAcquire::socks::proxy "socks://username:passwd@proxy.*****.com:8080/";rn但是执行sudo apt install vim后,点击Y后,还是会在显示0%rn[Waiting for headers]一会后,显示502 Connection reset by peer错误,需要注意的是502,网上找不到相关的解决办法,我也参考着试了好多办法都不行。特别的是打开火狐浏览器后,输入代理用户/密码,可以取得apt命令中无法下载的package。求大神拯救我,上火了都~~
thrift异常 Connection reset by peer
代码如下,并发量大时几秒就会出现这么个异常:rn [ Thread-0:5281012 ] - [ WARN ] Got an IOException in internalRead!rnjava.io.IOException: Connection reset by peerrn at sun.nio.ch.FileDispatcherImpl.read0(Native Method)rn at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)rn at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)rn at sun.nio.ch.IOUtil.read(IOUtil.java:197)rn at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:379)rn at org.apache.thrift.transport.TNonblockingSocket.read(TNonblockingSocket.java:141)rn at org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.internalRead(AbstractNonblockingServer.java:515)rn at org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer.read(AbstractNonblockingServer.java:305)rn at org.apache.thrift.server.AbstractNonblockingServer$AbstractSelectThread.handleRead(AbstractNonblockingServer.java:202)rn at org.apache.thrift.server.TThreadedSelectorServer$SelectorThread.select(TThreadedSelectorServer.java:576)rn at org.apache.thrift.server.TThreadedSelectorServer$SelectorThread.run(TThreadedSelectorServer.java:536)rnrn服务端运行时发生的异常,是什么原因造成的?rn服务端代码:rn TNonblockingServerSocket socket = new TNonblockingServerSocket(servicePort); rn final TDistinct.Processor processor = new TDistinct.Processor(new TDistinctImpl()); rn TThreadedSelectorServer.Args args = new TThreadedSelectorServer.Args(socket);rn args.protocolFactory(new TCompactProtocol.Factory());rn args.transportFactory(new TFramedTransport.Factory()); rn args.processorFactory(new TProcessorFactory(processor));rn TServer server = new TThreadedSelectorServer(args.selectorThreads(60).workerThreads(20));rn server.serve();rn客户端也在使用过TTransport后关闭了,哪位遇到这种问题,求解!
求助:java.net.sockenexception:connection reset by peer
在android模拟器上使用EDGE网络往服务端发送数据。报这个错误。rn而不设定网络类型不报任何异常,能正常运行。rn谢谢
Connection reset by peer: getsockname的问题
我用php写了一个论坛,apache做web服务器。rnapache的error_log中有些时候,一般是1,2天一次,突然出现下面的报错信息:rn[Fri Jan 25 16:02:15 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:24 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:24 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:25 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:25 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:26 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:26 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:34 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:34 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:35 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:35 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:35 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:35 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:35 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:35 2002] [error] (54)Connection reset by peer: getsocknamern[Fri Jan 25 16:02:36 2002] [error] (54)Connection reset by peer: getsocknamernrn然后这个机器的服务就停止了,也不能远程登录了,只能够重起。但是能ping通这个机器。重起后服务一切正常。。。。。。rn请问大家,这个error的来源是什么?rn谢谢
errno 104
我做linux下C++的socket程序,遇到问题:recv函数调用后返回-1 ,查看errno是104,请问这是什么原因,怎么解决?
关于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
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法