maven Connection reset 问题

图片说明

3个回答

关闭Idea, 如下图找到.m2 repository,删除其中的内容。
然后打开Idea,重新更新Maven工程。

图片说明

fight_in_dl
战在春秋 用心回答每个问题,如果对您有帮助,请采纳答案好吗,谢谢!
2 年多之前 回复

重新更新Maven工程不就行了

谢谢,不知道是哪里除了问题,maven也不挡包,重装系统后一切就OK了,哈哈

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Connection reset 问题
javax.servlet.ServletException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset 我在连接数据库时出现这个错误,哪位高手能说说这是什么意思?rnrn跟这个有什么关系:con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);rnrn在网上没找到答案!!!rnrn
Connection reset
ChatServer.javarn[code=Java]rnimport java.io.DataInputStream;rnimport java.io.DataOutputStream;rnimport java.io.EOFException;rnimport java.io.IOException;rnimport java.net.BindException;rnimport java.net.ServerSocket;rnimport java.net.Socket;rnimport java.util.ArrayList;rnimport java.util.List;rnrnpublic class ChatServer rn /**rn * @param argsrn */rn public static ServerSocket serverSocket = null;rn public static boolean b = false;rn List clients=new ArrayList();rnrn public static void main(String[] args) rnrn new ChatServer().start();rn rnrn public void start()rn rn try rn serverSocket = new ServerSocket(8888);// 创建绑定到特定端口的服务器套接字。rn b = true;rn catch (BindException e) rn System.out.println("端口使用中");rn System.exit(0);// ////开两个服务器就关掉rn catch (IOException e) rn e.printStackTrace();rn rn try rn while (b) rn Socket socket = serverSocket.accept();// 侦听并接受到此套接字的连接。//堵塞//监听在8888端口rn Client c=new Client(socket);rn clients.add(c);rn new Thread(c).start();rn System.out.println("a Client connect");rn rn catch (IOException e) rn e.printStackTrace();rn rn finallyrn rn try rn serverSocket.close();rn catch (IOException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn rn rn rn rn rn class Client implements Runnable rn private Socket socket = null;rn private DataInputStream dataInputStream = null;rn private DataOutputStream dataOutputStream = null; rn String str=null;rn public Client(Socket socket) rn super();rn this.socket = socket;rn try rn dataOutputStream=new DataOutputStream(socket.getOutputStream());rn dataInputStream = new DataInputStream(socket.getInputStream());rn catch (IOException e) rn e.printStackTrace();rn rn rn rn private void send() rn try rn dataOutputStream.writeUTF(str);rn catch (IOException e) rn e.printStackTrace(); rn rn rn rn public void run() rn try rn while (true) rn str = dataInputStream.readUTF();// 从包含的输入流中读取此操作需要的字节。rnSystem.out.println(str);rn for(Client client:clients)rn rn client.send();rn rn rn catch (EOFException e) rn System.out.println("Client Closed");rn catch (IOException e) rn // TODO Auto-generated catch blockrn e.printStackTrace();rn finally rn try rn if (dataInputStream != null)rn dataInputStream.close();rn if (dataOutputStream != null)rn dataOutputStream.close();rn if (socket != null)rn socket.close();rn catch (IOException e) rn e.printStackTrace();rn rnrn rnrn rnrn rnrn rnrnrn[/code]rnChatClient.javarn[code=Java]rnimport java.awt.BorderLayout;rnimport java.awt.Frame;rnimport java.awt.TextArea;rnimport java.awt.TextField;rnimport java.awt.event.ActionEvent;rnimport java.awt.event.ActionListener;rnimport java.awt.event.WindowAdapter;rnimport java.awt.event.WindowEvent;rnimport java.io.DataInputStream;rnimport java.io.DataOutputStream;rnimport java.io.IOException;rnimport java.net.Socket;rnimport java.net.UnknownHostException;rnrnrnpublic class ChatClient extends Frame rn private TextArea area=new TextArea();rn private TextField field=new TextField();rn Socket socket=null;rn private boolean b=false;rn DataOutputStream dataOutputStream=null;rn DataInputStream dataInputStream=null;rn Thread t=new Thread(new ReceThread());rnrn public ChatClient() rn this.setBounds(100, 100, 300, 300);rn this.setVisible(true);rn this .add(field,BorderLayout.SOUTH);rn this.add(area,BorderLayout.NORTH);rn field.addActionListener(new ActionMonitor());rn this.addWindowListener(new WindowAdapter() rn public void windowClosing(WindowEvent e)rn rn disConnect();rn System.exit(0);rn rn );rn connect();rn t.start();rn rn public void connect()rn rn try rn socket=new Socket("127.0.0.1",8888);// 创建一个流套接字并将其连接到指定 IP 地址的指定端口号。rn b=true;rn dataOutputStream=new DataOutputStream(socket.getOutputStream());///也可以BufferedOutputStream///返回此套接字的输出流。rn dataInputStream=new DataInputStream(socket.getInputStream());rn System.out.println("connect()");rn catch (UnknownHostException e) rn e.printStackTrace();rn catch (IOException e) rn e.printStackTrace();rn rn rn rn public void disConnect ()rn rn try rn socket.close(); rn dataOutputStream.close();rn catch (IOException e) rn e.printStackTrace();rn rn rn public static void main(String[] args) rn new ChatClient();rn rn rn rn class ActionMonitor implements ActionListenerrn rn public void actionPerformed(ActionEvent e) rn String s=field.getText().trim();rn area.setText(s);rn field.setText("");rn rn try rn dataOutputStream.writeUTF(s);// 以与机器无关方式使用 UTF-8 修改版编码将一个字符串写入基础输出流。rn dataOutputStream.flush();rn rn catch (IOException e1) rn e1.printStackTrace();rn rn rn rn rnrn rn class ReceThread implements Runnablern rn public void run() rn try rn while(b)rn rn String str=dataInputStream.readUTF();rnSystem.out.println(str);rn rn catch (IOException e) rn e.printStackTrace();rn rn rn rn rnrnrn[/code]rnrn为什么编译的时候会出错rnconnect()rnjava.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:168)rn at java.net.SocketInputStream.read(SocketInputStream.java:182)rn at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:320)rn at java.io.DataInputStream.readUTF(DataInputStream.java:572)rn at java.io.DataInputStream.readUTF(DataInputStream.java:547)rn at ChatClient$ReceThread.run(ChatClient.java:95)rn at java.lang.Thread.run(Thread.java:619)rnrn
java.net.SocketException: Connection reset by peer: Connection reset by peer
java.net.SocketException: Connection reset by peer: Connection reset by peer 这个异常是怎么引起的?
java.net.SocketException: Connection reset问题
java.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:168)rn at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)rn at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)rn at java.io.BufferedInputStream.read(BufferedInputStream.java:317)rn at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)rn at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)rn at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:652)rn at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)rn一开始用Apache的httpClient包来做的,遇到这个异常,搞不懂怎么回事,就换了原始的url.openConnection()来建立连接,还没几天就又坏了。而且不是偶然,每次都报这个异常了。而且,Connection reset的意思该怎么理解呢?rn搜索这个异常比较多是这么说 的:rna。maybe:rn1,网络编程时未正确捕获java.net.SocketException, 客户端先关闭就会报这个异常;rn2,数据库和应用服务器的网段不同.rnrnb。好像说防火墙的比较多。。。。rn大部分是网络的原因。提交post的东西多,然后服务器接收就超时了。。。 rn后面扯到WebLogic的就不贴了,我这是纯Java 的。rn贴一下我建立连接的这段代码:rn[code=Java]rnWebUtil webUtil = WebUtil.getInstance();rn URL url = webUtil.getUrlByString(searchUrl);rn rn tryrn URLConnection conn = url.openConnection();rn conn.setRequestProperty("accept", "*/*");rn conn.setRequestProperty("connection", "Keep-Alive");rn conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)");rn conn.setRequestProperty("Referer", Constants.INDEX);rn conn.setDoInput(true);rn conn.setDoOutput(true);rn conn.connect();rn rn BufferedReader reader = new BufferedReader(new InputStreamReader(rn conn.getInputStream(), "GBK"));//这里抛的异常rn while((line = reader.readLine()) != null)rn if(count > START_COUNT)rn html.add(line);rn elsern count++;rn rn rn reader.close();rn catch(Exception e)rn log.error("获取网页代码出错", e);rn return null;rn rn[/code]rn另一方面 的怀疑就是,我访问的目标网站是不是有保护,根据IP的访问量到一定程度就屏蔽我了?但我过段时间再重新运行,又能采到的。rn第一次做这方面的程序,没什么经验,请各位前辈帮忙,指点!非常感谢!
Socket问题 Connection reset?
顶起。我也有差不多的问题的。不过我的从服务器接收客户端的消息接受一切正常,当我关闭客户端是。程序就报异常。说Connection reset ?为什么啊?希望高手给我看看。下面我代码:rnpublic class ServerConClientThread extends Thread rn Socket s;rnrn public ServerConClientThread(Socket s) rn this.s = s;rnrn rnrn public void run() rn rn // TODO Auto-generated method stubrn while (true) rn rn try rn ObjectInputStream ois = new ObjectInputStream(s.getInputStream());rn Message m = (Message) ois.readObject();rn // 打印服务器受到的一方客户端的消息rn System.out.println(m.getSender() + "给" + m.getGetter() + "说"+ m.getContent());rn catch (Exception e) rn // TODO Auto-generated catch blockrn rn e.printStackTrace();rn rnrn rnrn rnrnrn报异常:rnjava.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:113)rn at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2266)rn at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2279)rn at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2750)rn at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:780)rn at java.io.ObjectInputStream.(ObjectInputStream.java:280)rn at com.qq.server.model.ServerConClientThread.run(ServerConClientThread.java:26)rnrnrn26行就是 ObjectInputStream ois = new ObjectInputStream(s.getInputStream());rn
Connection reset问题
在日志中有很多这种异常,是什么原因造成的?rnrn2005-12-19 10:36:30 ErrorDispatcherValve[localhost]: Remote Client Aborted Request, IOException: Connection resetrn2005-12-19 10:37:06 StandardWrapperValve[default]: Servlet.service() for servlet default threw exceptionrnClientAbortException: java.net.SocketException: Connection resetrn at org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:410)rn at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:436)rn at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:356)rn at org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:438)rn at org.apache.coyote.tomcat4.OutputBuffer.write(OutputBuffer.java:425)rn at org.apache.coyote.tomcat4.CoyoteOutputStream.write(CoyoteOutputStream.java:108)rn at org.apache.catalina.servlets.DefaultServlet.copyRange(DefaultServlet.java:2014)rn at org.apache.catalina.servlets.DefaultServlet.copy(DefaultServlet.java:1763)rn at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1091)rn at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:518)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(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(Thread.java:534)rn
windows下 socket connection reset 问题
我的程序中,C/S都放在一台Windows主机上,并通过socket 进行通讯。在服务端获取到客户端的请求并调用send方法将应答发送出去的时候,send方法返回正确。但客户端概率性的出现了connection reset异常。这个时候将send后面的close去掉就没有这个问题了。rnrn当时在网上找到了两个解决方案:rn1.设置SO_Linger,可以解决该问题。rn2.使用shutdown,进行半关闭。这里就出现了问题,当我使用shutdown的时候,客户端仍然出现异常。这是为什么呢?rnrn在这里我有两个疑问:rn1.当时看到close方法默认会将缓冲区没有发送完成的数据都发送出去再关闭,这里为什么没有等数据发出就关闭呢?rn2.为什么shutdown半关闭不能够实现呢?是操作系统的问题吗?然后,如果shutdown能够调用成功的话,后面还会不会跟close呢?rnrn最后还有一个问题,就是,我将CS放在两台不同的Windows主机上,客户端不管怎样都不会出现问题,这跟本地socket有关吗?因为客户端是java,服务端是c。这又是为什么呢?rnrn谢谢大家解答一下。
一个郁闷的问题:Connection reset
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection resetrn com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)rn com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)rn com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)rn com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)rn com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source)rn com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source)rn com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)rn com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)rn java.sql.DriverManager.getConnection(DriverManager.java:525)rn java.sql.DriverManager.getConnection(DriverManager.java:171)rn com.web.logic.CostLogic.ExecQuery(CostLogic.java:48)rn com.web.logic.CostLogic.getAllFilialeProdCodes(CostLogic.java:156)rn com.web.action.province.CountAction.execute(CountAction.java:52)rn org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)rn org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)rn org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)rn org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:689)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:802)rnrn这是报告的错误!rn由于这个应用访问量不大,所以采取的是直连:rn Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();rn String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=***"; rn String user="***"; rn String password="***";rn Connection conn= DriverManager.getConnection(url,user,password); rn Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);rnrn但有时候总是报这个错误。有时报有时不报。即使是将用户输入的登陆信息拿到库中比较,有时都会出这个错误,导致用户不能正常登陆。而且查询的速度非常慢。可能是程序有些问题,但我想是与数据库的连接的问题可能更大一些。各位英雄有没有遇到这样的问题??rn上网查了查,没有查到相关的信息。郁闷啊~~~~~~~~有一个说在URL中加上SelectMethod=cursor;我试了,没什么大的变化。该慢还是慢,该进不去还是进不去。英雄们~~~救救小弟吧!
关于Socket Connection reset 问题
[size=14px]之前接触socket较少、有个问题想咨询大家一下 谢谢、rn异常信息:rnjava.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:168)rn at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)rn at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)rn at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)rn at java.io.InputStreamReader.read(InputStreamReader.java:167)rn at java.io.BufferedReader.fill(BufferedReader.java:136)rn at java.io.BufferedReader.readLine(BufferedReader.java:299)rn at java.io.BufferedReader.readLine(BufferedReader.java:362)rn at obi.youyou.utils.Chat.run(Chat.java:41)[/size]rnrn相关代码:rn[code=java]public class Chat extends Thread rn private Socket socket;rnrn public Chat(int count, Socket socket, List socketList) rn this.socket = socket;rn rnrn public void run() rn BufferedReader reader = null;rn PrintWriter writer = null;rn try rn reader = new BufferedReader(new InputStreamReader(rn socket.getInputStream()));rn String message = "";rn SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");rn //socket.setSoTimeout(10000);rn while (true) rn message = reader.readLine(); [color=#FF0000] ========此处为41行=======[/color]rn // 接收到客户端的bye信息,客户端即将退出,并将bye写入到该客户端rn if (null==message) rn SocketTest3Server.count--;rn System.out.println( SocketTest3Server.count+ " null下线 " );rn SocketTest3Server.socketList.remove(socket);rn //new Chat(count, socket, socketList).run();rn break;rn rn // 向所有的客户端发送接收到信息,实现群聊rn for (int i = 0; i < SocketTest3Server.socketList.size(); i++) rn writer = new PrintWriter(SocketTest3Server.socketList.get(i).getOutputStream());rn String username=message.substring(0,message.indexOf("#$*"));rn String messages=message.substring(message.indexOf("#$*")+3,message.length());rn messages=SensitiveUtils.doFilter(messages);rn writer.println("\"talk\":\"username\":\""+username +"\",\"time\":\""+df.format(new Date())+ "\",\"message\":\"" + messages+"\",\"image\":[]");rn //System.out.println("\"talk\":\"username\":\""+username +"\",\"time\":\""+df.format(new Date())+ "\",\"message\":\"" + messages+"\",\"image\":[]");rn writer.flush();rn rn rn rn catch (Exception e) rn SocketTest3Server.count--;rn System.out.println( SocketTest3Server.count+ " Exception下线 " );rn SocketTest3Server.socketList.remove(socket);rn //new Chat(SocketTest3Server.count, socket, SocketTest3Server.socketList).run();rn e.printStackTrace();rn rn rnrn[/code]
关于socket Connection reset的问题
rn一个通过socket传输程序,传输一些文件和照片之类的东西。rnrn前段时间一直是跑得好好的,突然一天就出现了问题,一直报Connection reset错误,具体错误信息为:rnrnjava.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:113)rn at java.io.DataInputStream.readFully(DataInputStream.java:266)rn at java.io.DataInputStream.readFully(DataInputStream.java:242)rn at suncfs.etransserver.SocketTransService.bRecieveData(SocketTransService.java:359)rn at suncfs.etransserver.SocketTransService.RecieveMessage(SocketTransService.java:398)rn at suncfs.etransserver.SocketProcessService.HandleConnection(SocketProcessService.java:475)rn at suncfs.etransserver.SocketProcessService.run(SocketProcessService.java:354)rnrn===========================================================rnrn出现这个错误的过程中,我调整了每次发包大小的buffer参数,在此参数很小的情况下,发送小的文件,有时候能成功,有时候还是会出现错误。rnrn代码里是rnvoid readFully(byte[] b)throws IOException 这个方法出现了问题。rnrn=====================================================================rnrnreadFullyrnvoid readFully(byte[] b)rn throws IOException从输入流中读取一些字节,并将它们存储到缓冲区数组 b 中。读取的字节数等于 b 的长度。 rn在出现以下条件之一前,此方法将阻塞:rnrnrn输入数据的 b.length 个字节是可用的,在这种情况下,正常返回。 rn检测到文件末尾,在这种情况下,抛出 EOFException。 rn发生 I/O 错误,在这种情况下,将抛出 IOException,而不是 EOFException。 rn如果 b 为 null,则抛出 NullPointerException。如果 b.length 为零,则不读取字节。否则,将读取的第一个字节存储到元素 b[0] 中,下一个字节存储到 b[1] 中,依此类推。如果此方法抛出异常,则可能是因为已经用输入流中的数据更新了 b 的某些(但非全部)字节。 rnrnrn参数:rnb - 存储读取数据的缓冲区。 rn抛出: rnEOFException - 如果此流在读取所有字节之前到达末尾。 rnIOException - 如果发生 I/O 错误。rnrn================================rnrn望高人能指导一下,有没有啥办法可以解决这个问题。rnrnrnrnrnrnrnrnrnrnrn
Connection reset 的问题,比较奇怪!
我这边是服务程序,用的是短连接,在服务端写包后就主动关闭连接rn服务端是在windows下的,客户端是UNIXrn有一个交易需要服务端写两个包,客户端在收到第一个包后判断有没有后续包,如果有就继续读第二包rn问题就在这里,UNIX客户端在读第二个包的时候就报Connection reset by peerrnrn网络是intenet rnrn在局域网内部测试没有任何问题,我还写了一个Windows下的客户端测试程序,不管是在局域网还是在rnintenet上也都没有问题,在局域网内部我也写了一个测试程序,sleep 30秒后收第二包也没有问题,rn还请各位大哥帮帮忙啊, rn在说明一下,客户端是C语言写的,windows测试用客户端和服务端是用C++写的
Io exception: Connection reset问题
Io exception: Connection reset; nested exception is java.sql.SQLException: Io exception: Connection resetrn有时候经常会出现这个问题,是什么原因啊?我重新操作又正常了,不定时的会出现这个问题,哪位可以解释一下。
java.net.SocketException: Connection reset异常的问题
我写了个客户端程序连接服务器rnSocket socket = new Socket("xxx.xxx.xxx.xxx", PORT);rnOutputStream os = socket.getOutputStream();rnos.write(buffer);rnInputStream is = socket.getInputStream();rnwhile ((n = is.read())!=-1)rnrn System.out.println(n);rnrnrn在os.write后rnrn就进入循环,读服务器发来的数据rn在is.read()时抛出异常了rnrnjava.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(Unknown Source)rn at java.net.SocketInputStream.read(Unknown Source)rnrn这大概是什么原因?
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谢谢
java.net.SocketException: Connection reset错误
java.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:189)rn at java.net.SocketInputStream.read(SocketInputStream.java:121)rn at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)rn at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)rn at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)rn at java.io.InputStreamReader.read(InputStreamReader.java:184)rn at java.io.BufferedReader.fill(BufferedReader.java:154)rn at java.io.BufferedReader.readLine(BufferedReader.java:317)rn at java.io.BufferedReader.readLine(BufferedReader.java:382)rn at MyClient.doSocket(MyClient.java:41)rn at MyClient.main(MyClient.java:60)rn我向一个指定IP发送报文出现的错误rnpublic class MyClient rn rn public static void doSocket()throws UnknownHostException, IOException rn rn try rn Socket socket=new Socket("127.169.0.0",8888); rn BufferedReader sysin=new BufferedReader(new InputStreamReader(System.in)); rn PrintWriter socket_os=new PrintWriter(socket.getOutputStream()); rn BufferedReader socket_is=new BufferedReader(new InputStreamReader(socket.getInputStream())); rn String readline; rn System.out.print("**Client:"); rn readline=sysin.readLine(); rn System.out.println(""); rn while(!readline.equals("bye")) rn socket_os.println(readline); rn socket_os.flush(); rn System.out.println("**Server:"+socket_is.readLine()); rn System.out.print("**Client:"); rn readline=sysin.readLine(); rn System.out.println(""); rn rn socket_os.close(); rn socket_is.close(); rn socket.close(); rn rn catch (IOException e) rn e.printStackTrace(); rn rn rn rn rnrn public static void main(String[] args) throws UnknownHostException, IOException rn MyClient.doSocket(); rn rn rn rn rn这个是以前在网上找的可用的代码向服务器发送的是rn052060000200006030000000000200702404C030C0rn270000003119070802100006403F39548D09F6A807rnF81B4CBE9594A0CF8C6F57817B0112297BF179EAADrn9F053E54ED5D8B2B8DE8679BC6EFC114B10F9C1246rn8DE8679BC6EFC12B8DE8679EC6EFC199C2E0F892F4rn78FC820CEAC4913232303135393233313233343536rn0A00142212103100311967DE7DA8CE78A215rn本人菜鸟请指点大白话或者代码改哪里~非常感谢[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/1.gif][/img]
java connection reset错误
我写的是一个聊天室程序,但是现在老师出现connection reset这个错误,麻烦哪位高人指点一下。rn客户端程序:rnimport java.awt.*;rnimport java.awt.event.*;rnimport java.io.*;rnimport java.net.*;rnrnpublic class ChatClient extends Framernrn Socket s=null;rn DataOutputStream dos=null;rn DataInputStream dis=null;rn private boolean bconnected=false;rn rn TextField tfText=new TextField();rn TextArea taContent=new TextArea();rn rn public static void main(String[] args)rn rn new ChatClient().lanuchFrame();rn rn public void lanuchFrame()rn rn this.setLocation(400,300);rn this.setSize(300,300);rn this.add(taContent,BorderLayout.NORTH);rn this.add(tfText,BorderLayout.SOUTH);rn this.pack(); rn this.addWindowListener(new WindowAdapter()rn rn public void windowClosing(WindowEvent e)rn rn disconnect();rn System.exit(0);rn rn );rn tfText.addActionListener(new TFListener());rn this.setVisible(true);rn connect();rn new Thread(new RecvThread()).start();rn rn public void connect()rn rn tryrn rn s=new Socket("127.0.0.1",8888);rn System.out.println("connected!");rn dos=new DataOutputStream(s.getOutputStream());rn dis=new DataInputStream(s.getInputStream());rn bconnected=true;rn rn catch (UnknownHostException e)rn rn e.printStackTrace();rn rn catch (IOException e)rn rn e.printStackTrace();rn rn rn public void disconnect()rn rn tryrn rn dos.close();rn dis.close();rn s.close();rn rn catch (IOException e)rn rn e.printStackTrace();rn rn rn rn private class TFListener implements ActionListenerrnrn rn @Overridern public void actionPerformed(ActionEvent e)rn rn String str=tfText.getText().trim();rn tfText.setText("");rn taContent.setText(str);rn tryrn rn dos.writeUTF(str);rn dos.flush();rn rn catch (IOException e1)rn rn e1.printStackTrace();rn rn rn rn rn public class RecvThread implements Runnablern rn public void run()rn rn tryrn rn while(bconnected)rn rn String str=dis.readUTF();rn System.out.println(str);rn rn rn catch(IOException e)rn rn e.printStackTrace();rn rn rn rn rnrnrn服务器端程序:rnmport java.io.*;rnimport java.net.*;rnimport java.util.*;rnrnrnpublic class ChatServerrnrn ServerSocket ss=null; rn boolean started=false;rn rn List clients=new ArrayList();rn rn public static void main(String[] args)rn rn new ChatServer().start();rn rn public void start()rn rn tryrn rn ss=new ServerSocket(8888);rn started=true;rn rn catch(BindException e)rn rn System.out.println("端口使用中....");rn System.out.println("请关掉相关程序,重新运行服务器!");rn System.exit(0);rn rn catch (IOException e)rn rn e.printStackTrace();rn rn tryrn rn while(started)rn rn Socket s=ss.accept();rn System.out.println("a Client connected!");rn Client c=new Client(s); rn new Thread(c).start();rn rn rn catch (IOException e)rn rn e.printStackTrace();rn rn finallyrn rn tryrn rn ss.close();rn rn catch (IOException e)rn rn e.printStackTrace();rn rn rn rn rn class Client implements Runnablern rn private Socket s;rn private DataInputStream dis=null;rn private DataOutputStream dos=null;rn rn private boolean bconnected=false;rn rn public Client(Socket s)rn rn tryrn rn this.s=s;rn dis=new DataInputStream(s.getInputStream());rn dos=new DataOutputStream(s.getOutputStream());rn bconnected=true;rn rn catch (IOException e)rn rn e.printStackTrace();rn rn rn rn public void send(String str)rn rn tryrn rn dos.writeUTF(str);rn rn catch (IOException e)rn rn e.printStackTrace();rn rn rn rn public void run()rn rn tryrn rn while(bconnected)rn rn String str = dis.readUTF();rn System.out.println(str);rn for(int i=0;i it=clients.iterator();it.hasNext();)rn rn Client c=it.next();rn c.send(str);rn rn rn Iterator it=clients.iterator();rn while(it.hasNext())rn rn Client c=it.next();rn c.send(str);rn rn */rn rn rn catch(EOFException e)rn rn System.out.println("Client Closed!");rn rn catch (IOException e)rn rn e.printStackTrace();rn rn finallyrn rn tryrn rn if(dis!=null)rn rn dis.close();rn dis=null;rn rn if(dos!=null)rn rn dos.close();rn dos=null;rn rn if(s!=null)rn rn s.close();rn s=null;rn rn rn catch (IOException e1)rn rn e1.printStackTrace();rn rn rn rn rnrn错误提示:rna Client connected!rna Client connected!rnnihaornjava.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:168)rn at java.net.SocketInputStream.read(SocketInputStream.java:182)rn at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:320)rn at java.io.DataInputStream.readUTF(DataInputStream.java:572)rn at java.io.DataInputStream.readUTF(DataInputStream.java:547)rn at ChatServer$Client.run(ChatServer.java:102)rn at java.lang.Thread.run(Thread.java:662)rn不胜感激!
Connection reset by peer 求助
本人的java程序部署在weblogic中,数据库为oracle9i,非常的简单,就是提供了一个接口供别人调用后然后更新某表的一个字段值,但现在发生了如下的问题,即在执行更新操作时,偶尔会出现“Io 异常: Connection reset by peer.”这样的异常,更新语句非常非常的简单,就是最普通的UPDATE语句,使用的是JDBC连接池,出现的概率也不是很大,请问大家能彻底解决这样的问题吗?比如通过修改weblogic相关配置什么的。
java.net.SocketException: Connection reset
还是以前发过的那个弱弱的聊天小程序。rnrn==TCPServer.java==rnimport java.io.*;rnimport java.net.*;rnpublic class TCPServer rn public static void main(String[] args) rn InputStream in = null;rn OutputStream out = null;rn try rn ServerSocket server = new ServerSocket(8888);rn Socket s = null;rn BufferedReader br = null;rn BufferedReader localBr = null;rn PrintWriter pw = null;rn String line = null;rn while(true) rn s = server.accept();rn System.out.println("A client connected, you can chat now.");rn in = s.getInputStream();rn out = s.getOutputStream();rn br = new BufferedReader(new InputStreamReader(in));rn pw = new PrintWriter(out);rn localBr = new BufferedReader(new InputStreamReader(System.in));rn while(true) rn line = localBr.readLine();rn if(line.equals("bye")) rn break;rn rn System.out.println("Server: " + line);rn pw.println("Server: " + line);rn pw.flush();rn System.out.println(br.readLine());rn rn localBr.close();rn br.close();rn pw.close();rn s.close();rn rn catch (IOException e) rn e.printStackTrace();rn rn rnrnrn==TCPClient.java==rnimport java.io.*;rnimport java.net.*;rnpublic class TCPClient rn public static void main(String[] args) rn InputStream in = null;rn OutputStream out = null;rn try rn Socket s = new Socket("222.91.123.168", 8888);rn in = s.getInputStream();rn out = s.getOutputStream();rn BufferedReader br = new BufferedReader(new InputStreamReader(in));rn PrintWriter pw = new PrintWriter(out);rn BufferedReader localBr = new BufferedReader(new InputStreamReader(System.in));rn String line = null;rn while(true) rn System.out.println(br.readLine());rn line = localBr.readLine();rn if(line.equals("bye")) rn break;rn rn System.out.println("Client: " + line);rn pw.println("Client: " + line);rn pw.flush();rn rn localBr.close();rn br.close();rn pw.close();rn s.close();rn catch (IOException e) rn e.printStackTrace();rn rn rnrnrn第一个Client可以和Server完成聊天。但是双方都bye后,再起一个Client时,就会发生错误。rnrnServer窗口显示如下:rnjava.io.IOException: Stream closedrn at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145rn)rn at java.io.BufferedInputStream.read(BufferedInputStream.java:308)rn at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)rn at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)rn at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)rn at java.io.InputStreamReader.read(InputStreamReader.java:167)rn at java.io.BufferedReader.fill(BufferedReader.java:136)rn at java.io.BufferedReader.readLine(BufferedReader.java:299)rn at java.io.BufferedReader.readLine(BufferedReader.java:362)rn at TCPServer.main(TCPServer.java:23)rnrnClient窗口显示如下:rnjava.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:168)rn at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)rn at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)rn at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)rn at java.io.InputStreamReader.read(InputStreamReader.java:167)rn at java.io.BufferedReader.fill(BufferedReader.java:136)rn at java.io.BufferedReader.readLine(BufferedReader.java:299)rn at java.io.BufferedReader.readLine(BufferedReader.java:362)rn at TCPClient.main(TCPClient.java:16)rnrn请问这是怎么回事?该怎么解决呢?
httpClient Connection reset
为什么我老出现这个错误,原因是什么?rnjava.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(Unknown Source)rn at java.io.BufferedInputStream.fill(Unknown Source)rn at java.io.BufferedInputStream.read(Unknown Source)rn at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)rn at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)rn at org.apache.commons.httpclient.HttpConnection.readLine(HttpConnection.java:1116)rn at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(HttpMethodBase.java:1973)rn at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1735)rn at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1098)rn at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)rn at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)rn at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)rn at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)rn at test_tonight.TestToXXJY.(TestToXXJY.java:26)rn at test_tonight.TestToXXJY.main(TestToXXJY.java:71)rnrn程序应该没错,因为我连接的地址里有可以连通的
connection reset by peer?
上位机(客户端)定时给下位机(服务端)发查询命令.rn服务端去查询,数据库,如果有新数据,返回给客户端,如果没,告诉客户端没有新数据.rn运行了,10个小时左右,rn提示,connectiong reset by peerrn这个错误,一般是什么情况下给出的。rn大家,是否遇到过这类问题.后来怎么解决的.
50分 Connection reset ??
昨天还好好的 rn怎么一下就这样了啊?rnrnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection resetrn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)rnrn
ClientAbortException: java.net.SocketException: Connection reset
ClientAbortException: java.net.SocketException: Connection resetrn at org.apache.coyote.tomcat4.OutputBuffer.doFlush(OutputBuffer.java:368)rn at org.apache.coyote.tomcat4.OutputBuffer.flush(OutputBuffer.java:336)rn at org.apache.coyote.tomcat4.CoyoteResponse.flushBuffer(CoyoteResponse.java:541)rn at org.apache.coyote.tomcat4.CoyoteResponseFacade.flushBuffer(CoyoteResponseFacade.java:225)rn at org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatcherValve.java:329)rn at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:181)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(Thread.java:534)
Caused by: java.net.SocketException: Connection reset
13:50:17,093 WARN com.mchange.v2.resourcepool.BasicResourcePool:1841 - com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@1c7d56b -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (3). Last acquisition attempt exception: rnjava.sql.SQLException: I/O Error: Connection resetrn at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2311)rn at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:603)rn at net.sourceforge.jtds.jdbc.ConnectionJDBC2.(ConnectionJDBC2.java:357)rn at net.sourceforge.jtds.jdbc.ConnectionJDBC3.(ConnectionJDBC3.java:50)rn at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)rn at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)rn at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)rn at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)rn at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)rn at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)rn at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)rn at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)rn at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)rnCaused by: java.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:168)rn at java.io.DataInputStream.readFully(DataInputStream.java:178)rn at java.io.DataInputStream.readFully(DataInputStream.java:152)rn at net.sourceforge.jtds.jdbc.SharedSocket.readPacket(SharedSocket.java:842)rn at net.sourceforge.jtds.jdbc.SharedSocket.getNetPacket(SharedSocket.java:723)rn at net.sourceforge.jtds.jdbc.ResponseStream.getPacket(ResponseStream.java:466)rn at net.sourceforge.jtds.jdbc.ResponseStream.read(ResponseStream.java:103)rn at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2206)rn ... 12 morernrnrn/*-----------------------------------------------------------------------------*/rnrn启动服务器时候。报以上错误。用的是SQL Server数据库。
关于:java.net.SocketException: Connection reset
大家好:rn我写了一个网络交易程序,原理按照ibm的socket教程做的,是服务器端使用ServerSocket建立监听,客户端创建Socket进行连接,客户端发送一条信息给服务器,服务器返回一条信息给客户端,然后断开连接。rn开始一切都很好,但目前出现这个问题,当程序运行一段时间后(可能几个小时或10几个小时),当客户端程序向服务端发送信息时,服务器端一开始提示进行有新的连接建立,然后在读socket时抛出例外java.net.SocketException: Connection reset。rn
java.net.socketexception connection reset
小弟我用java实现了一个联通SGIP发送,接收短信的程序。rn不过在接收过程中,由于联通发送完deliver命令后要间隔16秒才发送unbind命令,此时作为服务器端的我的程序抛出rnjava.net.socketexception connection reset错误!rn因为我在接收数据的时候inputstread.read(bytes[])是一个阻塞函数,如果没有接收到输入流就会阻塞住不动,但是错误的信息应该是socket已经断开。所以让我很奇怪,搞了一周也没有解决这个问题,请大伙帮忙啊!
Web Service Connection reset
使用Web Service 与别的公司进行业务合作,在client 端有经常会出现Connection reset的情况 ,据server端公司反应其它合作公司的client端并没有相同的情况。但这种问题并不会持续很久,一般在几个小时后又会自动恢复正常。在网上找了很多资料发现有不少人有相同的情况,就是没有一个解决方案。rnrn异常详情,其中XXX是 本人项目的具体实现rnrnAxisFaultrn faultCode: http://schemas.xmlsoap.org/soap/envelope/Server.userExceptionrn faultSubcode:rn faultString: java.net.SocketException: Connection resetrn faultActor:rn faultNode:rn faultDetail:rn http://xml.apache.org/axis/stackTrace:java.net.SocketException: Connection resetrn at java.net.SocketInputStream.read(SocketInputStream.java:168)rn at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)rn at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)rn at java.io.BufferedInputStream.read(BufferedInputStream.java:317)rn at java.io.FilterInputStream.read(FilterInputStream.java:116)rn at org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown Source)rn at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)rn at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)rn at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source)rn at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)rn at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)rn at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)rn at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)rn at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)rn at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)rn at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)rn at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)rn at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)rn at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)rn at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)rn at org.apache.axis.client.Call.invokeEngine(Call.java:2784)rn at org.apache.axis.client.Call.invoke(Call.java:2767)rn at org.apache.axis.client.Call.invoke(Call.java:2443)rn at org.apache.axis.client.Call.invoke(Call.java:2366)rn at org.apache.axis.client.Call.invoke(Call.java:1812)rn at XXX.XXX.XXX.XXX.XXX(XXX.java:1458)rn at XXX.XXX.XXX.XXX$XXX.XXX(XXX.java:97)rn at XXX.XXX.XXX.XXX$XXX.XXX(XXX.java:100)rn at java.util.TimerThread.mainLoop(Timer.java:512)rn at java.util.TimerThread.run(Timer.java:462)rnrn http://xml.apache.org/axis/hostname:107
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,急求
程序放到服务器上。重启tomcat后。刚开始可以访问。什么都正常。但是过一段时间就出现Connection reset这个异常。各位大虾。告诉小弟这是怎么回事。
关于JavasocketExcetpion:Connection Reset
块来帮我啊,大哥大姐们。。rn就20分了。分少别见怪啊。rn目前的项目中老出现一种错误,那就是 Connection Reset,,rn不知道该如何解决。rn服务端就是简单的侦听客户端的链接,当有客户端链接,就为客户端起一个线程。然后处理客户端发送过来的数据。rn服务器刚开始运行的一段时间是没问题的,能正常的处理客服端发送的信息,但当服务器运行一段时间(<24Hour)就开始有客户端 链接的时候出现上面那个异常,具体位置就在while ((length = ips.read(bytes, 0, 512))!= -1) 这里;rn不知道这是为什么,文档上说如果不是因为流位于文件末尾而无法读取第一个字节,则抛出 IOException。特别是,如果输入流已关闭,则抛出 IOException。 这里是IOException..可是异常却是socketException。rnread()方法不是阻塞式的吗?没有数据的时候不是一直等待数据的到来吗?rn可是有的客户端刚连上就马上出现下面的异常,,实在搞不明白了,希望有知道的大哥大姐们指教一二。下面给出部分代码。rn但具体输出的错误为:[code=Java]rnjava.net.SokcetException:Connection resetrn at java.net.SokectInputStream.read(SocketInputStream.java:168)rn at com.bjdx.GprsServer.ProSocket.run(ProSocket.java:47)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(TreadPoolExecutor.java:886)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(TreadPoolExecutor.java:908)rn at java.lang.Thread.run(Thread.java:619)rn[/code]rnrnrn[code=Java]rn//run方法rnpublic void run()rnrnrntryrnint length = 0 ;rnbyte[] bytes = new byte[512];rnwhile ((length = ips.read(bytes, 0, 512))!= -1) rnString msg = byte2HexStr(bytes,lengh);//把收到的字节处理成16进制串。rnProMsg(msg);//处理数据。rnrncatch(IOException e)rne.printStackTrace();rnrnrnrn//处理字节的方法rnpublic String byte2HexStr(byte[] bytes,int length)...rn//处理消息的方法rnpublic void ProMsg(String msg)....rn[/code]rnrnrnrn
read0: ioe Connection reset
同样的类,我放到C:\Program Files\Motorola\J2ME SDK v3.1\Emulator7.5\lib和C:\Program Files\Motorola\J2ME SDK v3.1\Emulator7.2\lib里会有一部分出错,我实在没办法了,放在工程文件夹下后出现read0: ioe Connection reset错误,这是个什么错误啊
connection reset异常
各位,小弟目前正开发一个项目,涉及到java后台和前置机(C开发的)间的通讯。rn当数据量不大时(6000B左右)时正常,但当数据超过13000B时,每次java后台接收前置机返回的数据时都抛出connection reset异常(debug时发现为 in.readLine()时异常)。不知真正原因在哪里(下面为java后台相关代码),急盼高人的解答。急,在线等……rn ……rn //建立网络连接rn Socket client;rn tryrn rn client = new Socket(ip, Integer.parseInt(port));rnrn int soTimeOut = Integer.parseInt(timeOut);rnrn if (soTimeOut > 0)rn rn //设置超时毫秒数rn client.setSoTimeout(soTimeOut);rn rnrn BufferedReader in = new BufferedReader(new InputStreamReader(clientrn .getInputStream()));rnrn PrintWriter out = new PrintWriter(client.getOutputStream());rn //增加报头信息 客户现场rn String branch = DataTools.getBranchByIP(ip);rn rn String size = String.valueOf(xmlString.getBytes().length);rn String titleXml = com.neusoft.finance.common.DataTools.leftMendStringLen(size,8,' ');rn String branchXml= com.neusoft.finance.common.DataTools.leftMendStringLen(branch,8,' ');rn rn xmlString = titleXml.concat(branchXml).concat(xmlString);rn log.info("发送的xml:"+xmlString);rn out.println(xmlString);rnrn out.flush();rnrn //前置机返回数据rn returnString = in.readLine(); rn log.info("返回的xml:"+returnString);rn client.close();rn rn catch (NumberFormatException e)rn rn ExcAct.doHandle(e);rn throw new SystemException(e);rn rn catch (UnknownHostException e)rn rn ExcAct.doHandle(e);rn throw new SystemException(e);rn rn catch (IOException e)rn rn ExcAct.doHandle(e);rn throw new SystemException(TradeConstCodeList.CONNECT_TIME_OUT,e,ip);rn rn catch (Exception e)rn ExcAct.doHandle(e);rn throw new SystemException(e);rn rn ……rn
DBComms.receive 操作:Connection reset
之前看到别人也遇到这个问题 但都没给出解决的办法 现在把异常贴出来rnrnJDBC begin failedrncom.microsoft.sqlserver.jdbc.SQLServerException: 使用 DBComms.receive 方法期间发生异常。操作:Connection reset。上下文:(51) [Thread[http-8080-1,5,main], IO:6331d, Dbc:5de82]。PktNum:0。TotalReceived:0。PktSize:4,096。rn at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)rn at com.microsoft.sqlserver.jdbc.DBComms.receive(Unknown Source)rn at com.microsoft.sqlserver.jdbc.DBComms.receive(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.doConnectionCommand(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection$ConnectionCommandRequest.execute(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.setAutoCommit(Unknown Source)rn at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:331)rn at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:317)rn at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:63)rn at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)rn at org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:509)rn at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:377)rn at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)rn at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)rn at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)rn at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)rn at $Proxy30.listTop8ForIndex(Unknown Source)rn at com.drm.web.action.index.IndexBulletinBoardAction.index(IndexBulletinBoardAction.java:30)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:441)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)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:237)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.CookieInterceptor.intercept(CookieInterceptor.java:218)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn at org.apache.struts2.components.ActionComponent.executeAction(ActionComponent.java:289)rn at org.apache.struts2.components.ActionComponent.end(ActionComponent.java:172)rn at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)rn at org.apache.jsp.index_jsp._jspx_meth_s_005faction_005f0(index_jsp.java:344)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:261)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)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.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:389)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.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)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:175)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.Http11AprProcessor.process(Http11AprProcessor.java:856)rn at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:565)rn at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)rn at java.lang.Thread.run(Thread.java:619)rn[DRM] DEBUG [http-8080-1] ConnectionManager.closeConnection(441) | releasing JDBC connection [ (open
com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
public class BindDataDemorn public static void main(String[] args) rn Connection con;rn Statement sql;rn ResultSet rs;rn String url = "com.microsoft.sqlserver.jdbc.SQLServerDriver";rn rn String CONNECTSTR = "jdbc:sqlserver://localhost";rn String user = "ALAN";rn String password = "lijia";rn try rn Class.forName(url);rn catch (ClassNotFoundException e) rn System.out.println("" + e);rn rn try rn con = DriverManager.getConnection(CONNECTSTR, user, password);rn sql = con.createStatement();rn rs = sqlrn .executeQuery("select * from emp");rn while (rs.next()) rn rn System.out.print(rs.getString(1) + " ");rn System.out.print(rs.getString(2) + " ");rn System.out.print(rs.getInt(3) + " ");rn rn System.out.println();rn rn con.close();rn catch (SQLException e1) rn System.out.println("sql语句出错:" + e1);rn rn rnrnrnrnrnrnrnException in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: Connection resetrn at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(Unknown Source)rn at com.microsoft.sqlserver.jdbc.TDSChannel.read(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.Prelogin(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)rn at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at java.sql.DriverManager.getConnection(Unknown Source)rn at cn.alan.jdbc.Base.test(Base.java:19)rn at cn.alan.jdbc.Base.main(Base.java:12)rnrnrnrn急求 : 什么原因a ?
connection reset是什么原因?
我写网络程序时,用TCP方式rn主程序监听,监听到后开一个线程进行数据处理rn在读了一次数据后,产生socketexception rnconnection resetrn这是什么原因?
Connection reset 5天了搞不定
[color=#FF0000]Connection reset[/color]rnjsp 报 Error establishing socketrnSQL Server2000版本:800194rn3个jar SqlServer重装多遍 混合模式 sp3 4 都打过 试验过很多JDBC代码实例rn但是Connection reset 依然rn环境:MyEclipse6.6 ,SQL Server2000,tomcat6rn代码实例之一:rnpublic class Dbconn rn public static void main(String[] args) rn String driverName = "com.microsoft.jdbc.sqlserver.SQLServerDriver";rn String dbURL = "jdbc:microsoft:sqlserver://localhost:1433; DatabaseName=pubs";rn String userName = "sa";rn String userPwd = "";rn Connection dbConn;rnrn try rn Class.forName(driverName);rn dbConn = DriverManager.getConnection(dbURL, userName, userPwd);rn System.out.println("Connection Successful!");rn rn catch (Exception e) rn e.printStackTrace();rn rn rn
SocketException Connection reset
问题描述如下:rn目标地址 221.111.10.1 10010rntelnet 目标端口是通的rnSocket连接目标端口 10010 ,已经连接成功。但是发送信息到目标端口,然后读取返回信息的时候提示 SocketException Connection reset。rnrn环境是unix环境。程序在自己电脑windows好运行是正常的。但是部署到unix环境后就出现上述Connection reset。rnunix环境有两层防火墙,做的策略都是一样的。而且我们测试telnet目标端口都是通过的。rn有没有人,能够提供一下思路,告诉一下我应该怎么定位问题。问题出在哪一步。rn坐等高手,提供检查思路。rn
Connection reset by peer
服务端和客户端都是用idUDPServer;服务端的ThreadEven为Truernrn为何运行一段时间(接收数据一段时间)后,会出现:如下错误rnConnection reset by peer.rnSocket Error # 10054
java.sql.SQLEXception:Connection reset
//这个是我写的servlet~~~rnrnpackage com.onelove;rnrnimport javax.servlet.http.*;rnimport java.sql.*;rnimport java.io.*;rnrnpublic class Wel extends HttpServletrn public void doGet(HttpServletRequest req,HttpServletResponse res)rn Connection con = null;rn PreparedStatement ps = null;rn ResultSet rs = null;rn try rn //处理中文乱码rn res.setContentType("text/html; charset=gbk");rn PrintWriter pw = res.getWriter();rn rn //==================分页功能=====================rn int pageSize=3;//每页显示多少条记录rn int pageNow=1;//希望显示第几页rn int pageCount=0;//一共有多少页(计算)rn int rowCount=0;//一共有多少条记录(查表)rn rn //注册数据库驱动rn Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");rn //得到连接rn con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1434;databaseName=login","sa","sa");rn //创建PreparedStatementrn ps = con.prepareStatement("select count(*) from users");rn rs = ps.executeQuery();rn //得到rowCount的值rn if(rs.next())rn rowCount=rs.getInt(1);rn rn //计算pageCount的值rn if(rowCount%pageSize==0)rn pageCount=rowCount/pageSize;rn elsern pageCount=rowCount/pageSize+1;rn rn //得到Sessionrn HttpSession hs = req.getSession(true);rn hs.setMaxInactiveInterval(20);rn String val = (String)hs.getAttribute("uname");rn if(val==null)rn res.sendRedirect("login");rn rn pw.println("");rn pw.println(" ");rn pw.println("hello,wel 您的用户名:" + val + " ");rn pw.println("返回重新登录 ");rn rn ps = con.prepareStatement("select top "+pageSize+" * from users where userId not in(select top "+(pageNow-1)*pageSize+" userId from users)");rn rs = ps.executeQuery();rn rn pw.println(" ");rn pw.println(" userId userName passwd email grade");rn while(rs.next())rn pw.println(" ");rn pw.println(" "+rs.getInt(1)+"");rn pw.println(" "+rs.getString(2)+"");rn pw.println(" "+rs.getString(3)+"");rn pw.println(" "+rs.getString(4)+"");rn pw.println(" "+rs.getInt(5)+"");rn pw.println("");rn rn pw.println(" ");rn pw.println("上一页");rn for(int i=1; i<5; i++)rn pw.println("i");rn rn pw.println("下一页");rn pw.println(""); rn catch(Exception e)rn e.printStackTrace();rn finallyrn try rn if(rs!=null) rs.close();rn if(ps!=null) ps.close();rn if(con!=null) con.close();rn catch(Exception e)rn e.printStackTrace();rn rn rn rn rn rn public void doPost(HttpServletRequest req,HttpServletResponse res)rn this.doGet(req,res);rn rnrnsqlserver2005的驱动已经放在正确的目录下了,应该不是驱动的问题...rn网上也搜了很多,但没找到解决的方案~求大神rnrn以下是控制台信息java.sql.SQLException:[Microsoft][SQLServer 2000 Driver for JDBC] Connection resetrnat com.microsoft.jdbc.base.BaseExceptions.createExceptionrnat com.microsoft.jdbc.base.BaseExceptions.getExceptionrn.....rnat com.onelove.Wel.doGet 说的是53行出现错误了,编译是通过了的= =!
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
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池