java关于ServerSocket.accept()的问题

我在写一个利用socket通信的程序,我在Server类(服务器类)中写一个start方法,此方法中用ServerSocket.accept()方法来监听客户机后,调用线程进入等待阶段,直到服务器响应。
现在,我在mian方法中实例化一个服务器类,调用start方法监听客户机,我想在客户机响应之前关掉socket,但由于调用start后调用线程进入了等待状态,因此在mian方法中无法继续操作。

1个回答

 把ServerSocket.accept()放到一个线程中就不堵塞主线程(main)了。
guoguo2234
guoguo2234 回复HCodeRunner: 请问是怎么解决啊,遇到了一样的问题
大约一年之前 回复
HCodeRunner
HCodeRunner 问题已经解决了,谢谢你
大约 4 年之前 回复
HCodeRunner
HCodeRunner 非常感谢,我试一下
大约 4 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
java 关于sock通信问题 serverSocket.accept()阻塞

大神们怎么能让 serverSocket.accept()等待一段时间如果没人连接就退出啊 ```public List<Socket> socketAccept(ServerSocket server){ try { long time=System.currentTimeMillis(); while (System.currentTimeMillis()-time<2000) {//10毫秒后退出 Socket socket = server.accept(); sockets.add(socket);//得到socket连接数 } } catch (IOException e) { e.printStackTrace(); try { server.close(); } catch (IOException e1) { e1.printStackTrace(); } } return sockets; } ``` 如果没有连接Socket socket = server.accept();会一直在这等着,有什么办法跳出循环吗

关于ServerSocket.accept()的疑问

![图片说明](https://img-ask.csdn.net/upload/201507/16/1437024784_326632.png) 在死循环中使用Socket s = ss.accept()初始化socket,那么,是客户端第一次发送数据时初始化一个socket,还是每次客户端发送数据的时候都为客户端初始化一个socket?

Java ServerSocket accept运行一段时间不再接受新的连接了,这是为什么

java 的ServeSocket类中,使用accept方法循环取出请求到的Socket对象,但是运行一段时间后,不再请求了,找不到原因,目前能够提供的信息整理如下,请高人指点原因或排查思路: 1.关键代码: ``` //接待 private boolean receiveStatus = false; class ReceiveThread implements Runnable{ @Override public void run() { while(receiveStatus){ try{ Socket client = serverSocket.accept(); checkClient(client); }catch(Exception e){ //Log.write("接待线程发生异常。"); } } } } private void checkClient(Socket s){ //Log.write("新的客户接入"); ThreadPool.getPool().submit(new CheckClient(s)); } ``` 思路:首先开启一个接待线程,循环accept接收新的Socket对象,然后立即将该对象转到另一个线程(线程由线程池产生),进行进一步的交互处理。 2.问题的发现 以上代码开始运行时并没有什么异常,应用各项功能均正常。在服务器运行10天左右时,问题发生,客户端(Socket)无法与该应用建立连接,查看数据发现,客户端数据正常发出,但未收到来自服务器端的任何回应。 此时检查服务器应用进程依然存在,内存空闲量充足,于是使用 netstat -aptn 命令查看相关网络服务的连接状态发现问题。 ``` tcp6 51 0 :::443 :::* LISTEN 8322/java ``` 可以 51 指的是 Qecv-Q 指的是接收队列,也就是来自客户端的请求,可以看到队列已经积累了很多但是没有将数据取出。 端口监听正常。

java中把Socket.accept放入多线程中 如果一个客户端连入 那么会接入哪一个线程中呢

如题 自己测试出来是连接不到 不明白 。。。。。。。。。。。。。。。。。。。 。。。。。。。。。。。。。。。。。。。。

tomcat 无法启动,log如下。

2010-4-5 15:05:57 org.apache.jk.common.ChannelSocket acceptConnections 警告: Exception executing accept java.net.SocketException: select failed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:307) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:661) at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:872) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Unknown Source) 2010-4-5 15:05:57 org.apache.tomcat.util.net.JIoEndpoint$Acceptor run 严重: Socket accept failed java.net.SocketException: select failed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:317) at java.lang.Thread.run(Unknown Source) 2010-4-5 15:05:57 org.apache.jk.common.ChannelSocket acceptConnections 警告: Exception executing accept java.net.SocketException: select failed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:307) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:661) at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:872) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Unknown Source) 2010-4-5 15:05:57 org.apache.tomcat.util.net.JIoEndpoint$Acceptor run 严重: Socket accept failed java.net.SocketException: select failed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:317) at java.lang.Thread.run(Unknown Source) 2010-4-5 15:05:57 org.apache.jk.common.ChannelSocket acceptConnections 警告: Exception executing accept java.net.SocketException: select failed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.jk.common.ChannelSocket.accept(ChannelSocket.java:307) at org.apache.jk.common.ChannelSocket.acceptConnections(ChannelSocket.java:661) at org.apache.jk.common.ChannelSocket$SocketAcceptor.runIt(ChannelSocket.java:872) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) at java.lang.Thread.run(Unknown Source) 2010-4-5 15:05:57 org.apache.tomcat.util.net.JIoEndpoint$Acceptor run 严重: Socket accept failed java.net.SocketException: select failed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:317) at java.lang.Thread.run(Unknown Source) 2010-4-5 15:05:57 org.apache.tomcat.util.net.JIoEndpoint$Acceptor run 严重: Socket accept failed java.net.SocketException: select failed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61) at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:317) at java.lang.Thread.run(Unknown Source) 2010-4-5 15:05:57 org.apache.jk.common.ChannelSocket acceptConnections 昨天都还是好好的,今天已启动就不行了,一直不停地循环出现上面的错误信息,小弟我看着头晕呀,百度谷歌都找不到解决方案,还请各位javaEye上的高手给指点指点,小弟我这先谢谢了。

关于java的socket通信问题

我的项目在自己的电脑上时,可以正常建立连接,接收客户端的消息和主动下发消息到客户端,但是程序部署到服务器后,只能接收客户端发来的消息,而且查看tomcat日志时如下: 2016-07-29 15:18:21 Commons Daemon procrun stdout initialized log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. socket start log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. SocketThread创建socket服务出错 java.net.SocketException: socket closed at java.net.DualStackPlainSocketImpl.accept0(Native Method) at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source) at java.net.AbstractPlainSocketImpl.accept(Unknown Source) at java.net.PlainSocketImpl.accept(Unknown Source) at java.net.ServerSocket.implAccept(Unknown Source) at java.net.ServerSocket.accept(Unknown Source) at com.deposit.websocket.SocketThread.run(SocketThread.java:39) log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository. log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository. log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.

socket多线程的问题

java当中socket多线程是怎样写可以将所有客户发来的消息数记录下来并显示给客户,客户当前跟服务器说的是第几句话,比如第一个客户:0:0:aa 服务器回复aa 第一个客户:1:1:bb 服务器回复bb 第二个客户:2:0:aa 服务器回复aa 第二个客户:3:1:bb 第一个数是总行数,第二个是当前客户行数第三个就是内容了现在这个程序已经完成了后两个,第一个总行数咋实现 谁给发个代码啥的谢谢最好能在这里加 package DemoServer; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.logging.Level; import java.util.logging.Logger; import java.util.logging.SocketHandler; import org.w3c.dom.css.Counter; public class Server { public static void main(String[] args) throws IOException { int port = 8821; ServerSocket serverSocket = new ServerSocket(port); ExecutorService exe = Executors.newFixedThreadPool( //只有一个ExecutorService,执行 Runtime.getRuntime().availableProcessors()*10); while(true) { Socket socket = serverSocket.accept(); exe.execute(getTask(socket)); //开启多个线程 } } public static Runnable getTask(final Socket s) { // Map<OutputStream, Integer> lines = new HashMap<OutputStream, Integer>(); return new Runnable(){ private BufferedReader br = null; private PrintWriter pw = null; private Socket socket = null; private int number = 0; // private int count; public void run() { try { this.socket = s; //socket可以传递 System.out.println("接收到客户端的数据"); br = getReader(socket); pw = getWriter(socket); //从客户端读 String msg = null; while (( msg = br.readLine()) != null) { System.out.println(msg); number++; pw.println(count +":" + number +":"+ msg); if(msg.equals("bye")) //注意,没有这句不能退出while break; } //向客户端写 pw.println("数据正确"); } catch (IOException ex) { Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex); } finally { try { if(socket!=null) socket.close(); } catch (IOException ex) { Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex); } } } //从客户端读数据 private BufferedReader getReader(Socket socket) throws IOException { InputStream input = socket.getInputStream(); return new BufferedReader(new InputStreamReader(input)); } //向客户端写数据 private PrintWriter getWriter(Socket socket) throws IOException { OutputStream output = socket.getOutputStream(); return new PrintWriter(new OutputStreamWriter(output),true);//注意true是提醒刷新 } }; } }

java中使用ServerSocket的问题

![![图片说明](https://img-ask.csdn.net/upload/201509/17/1442498147_628872.png)图片说明](https://img-ask.csdn.net/upload/201509/17/1442498137_401768.png) 服务端代码 和 问题如图,但我查了API文档后 ![图片说明](https://img-ask.csdn.net/upload/201509/17/1442498373_494574.png) serverSocket是有这个构造方法的,找了整整一天也没找到解决方法,跪求大神解决

java.net.socketTimeoutException: Accept timed out

用applet +ftp 实现下载文件一半时 出现java.net.socketTimeoutException: Accept timed out异常,请教各位到底怎么回事?

socket C Java java.io.EOFException

问题是这样的 socket server 是Java实现的 socket 客户端是C语言实现的 当客户端发请求时,server端input.readUTF()时报java.io.EOFException,网上查了,说是读取输入流末尾还读 会报这个错,try{...} catch{java.io.EOFException e}就可以了。但是我添加了后,日志不报错,对方说还是没有响应。说明还是有问题。 不知该怎么解决了。请各位看看。 请求报文为xml格式的String 我本地自己Java写的客户端测试是可以的。 代码如下: public class SocketServer extends Thread implements Runnable { private ServletConfig sce; private WebApplicationContext appConent; //构造函数 public SocketServer(ServletConfig sce,WebApplicationContext appConent){ this.sce=sce; this.appConent=appConent; } public void run() { try{ ServerSocket listener=new ServerSocket(5555); Socket server; while(true){ //开始监听 server=listener.accept() ; NetWorkServer nwServer=new NetWorkServer(server,sce,appConent); nwServer.start(); } } catch (Exception e){ e.printStackTrace(); } } } protected Socket socket; private static final Log log = LogFactory.getLog(NetWorkServer.class); private ServletConfig sce; private WebApplicationContext appConent; public NetWorkServer(Socket sThread,ServletConfig sce,WebApplicationContext appConent){ this.socket =sThread; this.sce=sce; this.appConent=appConent; } public void run() { try{ DataInputStream input = new DataInputStream(socket.getInputStream()); DataOutputStream output = new DataOutputStream(socket.getOutputStream()); //客户端请求传过来的String(这里是可以的,能收到客户端请求的String) String paraInfoXML = input.readUTF(); /*返回结果*/ String result = "" ; SAXReader reader=new SAXReader(); StringReader sr=new StringReader(paraInfoXML); org.xml.sax.InputSource is=new org.xml.sax.InputSource(sr); try { /*业务逻辑*/ Document doc=reader.read(is); } catch (DocumentException e) { e.printStackTrace(); } output.writeUTF(result); output.flush(); output.close(); input.close(); //关闭连接 socket.close(); } catch (IOException e){ e.printStackTrace(); } }

服务器端accept访问阻塞,导致两个客户端无法同时访问服务器

package server; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; public class Server { public static void main(String[] args){ ServerSocket serverSocket = null; try { serverSocket = new ServerSocket(8888); System.out.println("服务器端准备就绪"); while(true){ Socket recieve = serverSocket.accept(); ThreadInServer TS = new ThreadInServer(recieve); TS.start(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } 其中ThreadInServer是新开的线程,用来进行文件传输 当两个客户端同时访问时,会显示“正在等待可用的套接字” 如果我想两个及以上客户端同时访问这个服务器,这里的代码如何改进?

为什么serversocket每次收到的消息都是一样的

请大家帮忙看看,为什么每次serversocket收到的信息都是一致的,如何解决。谢谢。 用户名1101密码1111 详细代码 package client; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.net.Socket; import java.util.List; import java.util.Scanner; import cash.Cashier; import warehouse.StoreKeeper; import datas.Datas; import datas.Goods; import datas.User; public class ClientDemo { public static void main(String[] args) throws IOException { Scanner input = new Scanner(System.in); Socket socket = null; InputStream is = null; OutputStream os = null; ObjectOutputStream oos = null; ObjectInputStream ois = null; User user=null; // 登陆界面 System.out.println("***********欢迎使用超市管理系统***********"); System.out.println("1.登陆"); System.out.println("2.退出系统"); System.out.println("*****************请选择数字1/2*****************"); int n = input.nextInt(); if (n == 1) { do { socket = new Socket("localhost", 8800); is = socket.getInputStream(); os = socket.getOutputStream(); oos = new ObjectOutputStream(os); ois = new ObjectInputStream(is); try { /* * 给用户赋值,用户名和密码 */ user = new User(); System.out.print("请输入用户名:"); user.setName(input.next()); System.out.print("请输入密码:"); user.setPassword(input.next()); // 写出对象 oos.writeObject(user); /* * 读取服务器返回的对象数据 */ Datas datas = (Datas) ois.readObject(); String msg = datas.getMsg(); if (msg != null) { System.out.println(msg); } user = datas.getUser(); /* * 判断是否是仓库管理员 */ if (user != null) { if (user.isAdmin()) { StoreKeeper storeKeeper = new StoreKeeper(); System.out.println("*****欢迎登陆超市库存管理系统*****"); do { storeKeeper.showMenu(); //Goods good=new Goods(); String choise=input.next(); datas.setChoose(choise); oos.writeObject(datas); } while(true); } else { Cashier cashier = new Cashier(); System.out.println("*****欢迎登陆超市收银系统*****"); cashier.showMenu(); } } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { ois.close(); oos.close(); is.close(); os.close(); socket.close(); } } while (user == null); } else { System.exit(1); } } package server; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; public class ServerDemo { public static void main(String[] args) throws IOException { //服务端 ServerSocket ss=new ServerSocket(8800); while(true){ Socket socket=ss.accept(); ServerThread st=new ServerThread(socket); st.start(); } } } package server; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.net.Socket; import datas.Datas; import datas.Goods; import datas.User; public class ServerThread extends Thread{ private Socket socket; //利用构造方法进行初始化 public ServerThread(Socket socket) { this.socket = socket; } public void run() { InputStream is = null; OutputStream os = null; ObjectInputStream ois = null; ObjectOutputStream oos = null; try { ServerBiz biz = new ServerBiz(); is = socket.getInputStream(); os = socket.getOutputStream(); ois = new ObjectInputStream(is); oos = new ObjectOutputStream(os); User user = (User) ois.readObject(); Datas datas = new Datas(); //Goods good=null; user = biz.login(user); if (user != null) { datas.setUser(user); // datas.setMsg("登陆成功"); } else { datas.setMsg("用户名或密码输入错误!登陆失败!"); } oos.writeObject(datas); while(user!=null){ datas=(Datas)ois.readObject(); System.out.println(datas.getChoose()); //System.out.println(datas.getGood().getGoodId()); //oos.writeObject(datas); oos.flush(); } } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { try { oos.close(); ois.close(); os.close(); is.close(); socket.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }

【新手】socket服务器获取浏览器请求时inputstream.read()返回值出问题

通过socket练习手写服务器,希望在服务器接收浏览器提交请求时通过循环执行inputstream.read()获取数据放入byte[1024]中,转成字符串最后输出至控制台,但在测试时虽然浏览器提交的测试数据不到1024字节,在第一次循环时inputsrteam.read()的返回值既不是-1也不是1024,而是接受到的数据实际大小(大约400多字节),导致第二次进入while循环,程序就阻塞在第二次inputstream.read()中,此时浏览器再次提交表单时服务器这边就直接报错了,报错点仍然指向while循环判断中的inputstream.read(),这明显不合理啊,向各位大佬求解。。。 源码: ``` package test; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.ServerSocket; import java.net.Socket; public class Server { ServerSocket server; public static void main(String[] args) { Server server = new Server(); server.start(); } public void start() { try { server = new ServerSocket(8888); receive(); } catch (IOException e) { System.out.println("开启数据库失败"); e.printStackTrace(); } } private void receive() { try { Socket client = server.accept(); byte[] buff = new byte[1024]; StringBuilder sb = new StringBuilder(); BufferedInputStream bis = new BufferedInputStream(client.getInputStream()); while (-1 != bis.read(buff)) { sb.append(new String(buff, 0, buff.length)); } String requestInfo = sb.toString().trim(); System.out.println(requestInfo); } catch (IOException e) { e.printStackTrace(); System.out.println("开启客户端socket失败"); } } public void stop() { } } ``` 浏览器第二次提交表单时,服务器这边的报错信息,(浏览器第一次提交表单时程序处于阻塞状态): ``` java.net.SocketException: Connection reset 开启客户端socket失败 at java.net.SocketInputStream.read(SocketInputStream.java:210) at java.net.SocketInputStream.read(SocketInputStream.java:141) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) at java.io.BufferedInputStream.read(BufferedInputStream.java:345) at java.io.FilterInputStream.read(FilterInputStream.java:107) at test.Server.receive(Server.java:48) at test.Server.start(Server.java:24) at test.Server.main(Server.java:17) ```

accept在while(true)里面变成了非阻塞的

while(cnt<244444){ SOCKET nSock=accept(server,&ClientAddr,&len); cnt++; 如果这样写,就是非阻塞的,会一直返回一个INVALID_SOCKET,但是如果 把accept写在while的外面,就是阻塞的,(这个while是在子线程里面的,如果是在主线程就不会有这个问题)求大神解答一下!

Springboot刚启动就报内存溢出?

1.问题描述: 本地系统是Ubuntu,jdk1.8,工具是eclipse,新创建的最简单的springboot项目,其中只导入了web、config的包。 只写了一个controller,启动就会报错。 Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.201-b09 mixed mode): "DestroyJavaVM" #39 prio=5 os_prio=0 tid=0x00007f0ae800f000 nid=0x697c waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "http-nio-8080-Acceptor-0" #37 daemon prio=5 os_prio=0 tid=0x00007f0ae8224800 nid=0x69ae runnable [0x00007f0ac26ed000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method) at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422) at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250) - locked <0x000000076f448c40> (a java.lang.Object) at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:448) at org.apache.tomcat.util.net.NioEndpoint.serverSocketAccept(NioEndpoint.java:70) at org.apache.tomcat.util.net.Acceptor.run(Acceptor.java:95) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-ClientPoller-1" #36 daemon prio=5 os_prio=0 tid=0x00007f0ae821f000 nid=0x69ad runnable [0x00007f0ac27ee000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked <0x000000076f5c05c0> (a sun.nio.ch.Util$3) - locked <0x000000076f5c05b0> (a java.util.Collections$UnmodifiableSet) - locked <0x000000076f5c0498> (a sun.nio.ch.EPollSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:743) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-ClientPoller-0" #35 daemon prio=5 os_prio=0 tid=0x00007f0ae821d000 nid=0x69ac runnable [0x00007f0ac28ef000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked <0x000000076f5afb78> (a sun.nio.ch.Util$3) - locked <0x000000076f5afb68> (a java.util.Collections$UnmodifiableSet) - locked <0x000000076f5afa50> (a sun.nio.ch.EPollSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:743) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-10" #34 daemon prio=5 os_prio=0 tid=0x00007f0ae82b5800 nid=0x69ab waiting on condition [0x00007f0ac29f0000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-9" #33 daemon prio=5 os_prio=0 tid=0x00007f0ae82b4000 nid=0x69aa waiting on condition [0x00007f0ac2af1000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-8" #32 daemon prio=5 os_prio=0 tid=0x00007f0ae82b2000 nid=0x69a9 waiting on condition [0x00007f0ac2bf2000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-7" #31 daemon prio=5 os_prio=0 tid=0x00007f0ae82b0000 nid=0x69a8 waiting on condition [0x00007f0ac2cf3000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-6" #30 daemon prio=5 os_prio=0 tid=0x00007f0ae82ae000 nid=0x69a7 waiting on condition [0x00007f0ac2df4000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-5" #29 daemon prio=5 os_prio=0 tid=0x00007f0ae8256800 nid=0x69a6 waiting on condition [0x00007f0ac2ef5000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-4" #28 daemon prio=5 os_prio=0 tid=0x00007f0ae8254800 nid=0x69a5 waiting on condition [0x00007f0ac2ff6000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-3" #27 daemon prio=5 os_prio=0 tid=0x00007f0ae8252800 nid=0x69a4 waiting on condition [0x00007f0ac30f7000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-2" #26 daemon prio=5 os_prio=0 tid=0x00007f0ae8251000 nid=0x69a3 waiting on condition [0x00007f0ac31f8000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "http-nio-8080-exec-1" #25 daemon prio=5 os_prio=0 tid=0x00007f0ae824f800 nid=0x69a2 waiting on condition [0x00007f0ac32f9000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076f59e010> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:107) at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:33) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "NioBlockingSelector.BlockPoller-1" #24 daemon prio=5 os_prio=0 tid=0x00007f0ae82e3800 nid=0x69a1 runnable [0x00007f0ac33fa000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked <0x000000076f44a298> (a sun.nio.ch.Util$3) - locked <0x000000076f44a210> (a java.util.Collections$UnmodifiableSet) - locked <0x000000076f44a090> (a sun.nio.ch.EPollSelectorImpl) at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97) at org.apache.tomcat.util.net.NioBlockingSelector$BlockPoller.run(NioBlockingSelector.java:304) "spring.cloud.inetutils" #23 daemon prio=5 os_prio=0 tid=0x00007f0ae82fb800 nid=0x69a0 waiting on condition [0x00007f0ac34fb000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x000000076e593b10> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) "SimplePauseDetectorThread_0" #22 daemon prio=9 os_prio=0 tid=0x00007f0a84015000 nid=0x699f waiting on condition [0x00007f0ac37fc000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at java.lang.Thread.sleep(Thread.java:340) at java.util.concurrent.TimeUnit.sleep(TimeUnit.java:386) at org.LatencyUtils.TimeServices.sleepNanos(TimeServices.java:62) at org.LatencyUtils.SimplePauseDetector$SimplePauseDetectorThread.run(SimplePauseDetector.java:116) "Thread-4" #21 daemon prio=9 os_prio=0 tid=0x00007f0a84011800 nid=0x699e waiting on condition [0x00007f0ac38fd000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000006c7b7a928> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442) at org.LatencyUtils.PauseDetector$PauseDetectorThread.run(PauseDetector.java:85) "container-0" #20 prio=5 os_prio=0 tid=0x00007f0ae8c72800 nid=0x699d waiting on condition [0x00007f0ac39fe000] java.lang.Thread.State: TIMED_WAITING (sleeping) at java.lang.Thread.sleep(Native Method) at org.apache.catalina.core.StandardServer.await(StandardServer.java:568) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer$1.run(TomcatWebServer.java:181) "Catalina-utility-2" #19 prio=1 os_prio=0 tid=0x00007f0a68314800 nid=0x699c waiting on condition [0x00007f0ac8dfd000] java.lang.Thread.State: WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000006c7ab4300> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1088) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "Catalina-utility-1" #18 prio=1 os_prio=0 tid=0x00007f0ae8c6a800 nid=0x699b waiting on condition [0x00007f0ad0143000] java.lang.Thread.State: TIMED_WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000006c7ab4300> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:748) "RMI TCP Accept-0" #13 daemon prio=5 os_prio=0 tid=0x00007f0ae850a000 nid=0x6995 runnable [0x00007f0ad056d000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409) at java.net.ServerSocket.implAccept(ServerSocket.java:545) at java.net.ServerSocket.accept(ServerSocket.java:513) at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:52) at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:405) at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:377) at java.lang.Thread.run(Thread.java:748) "RMI TCP Accept-43459" #12 daemon prio=5 os_prio=0 tid=0x00007f0ae84ca000 nid=0x6994 runnable [0x00007f0ad0694000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409) at java.net.ServerSocket.implAccept(ServerSocket.java:545) at java.net.ServerSocket.accept(ServerSocket.java:513) at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:405) at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:377) at java.lang.Thread.run(Thread.java:748) "RMI TCP Accept-0" #11 daemon prio=5 os_prio=0 tid=0x00007f0ae84b5000 nid=0x6993 runnable [0x00007f0ad0795000] java.lang.Thread.State: RUNNABLE at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:409) at java.net.ServerSocket.implAccept(ServerSocket.java:545) at java.net.ServerSocket.accept(ServerSocket.java:513) at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:405) at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:377) at java.lang.Thread.run(Thread.java:748) "Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00007f0ae80d8000 nid=0x6992 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE "C1 CompilerThread3" #8 daemon prio=9 os_prio=0 tid=0x00007f0ae80cc800 nid=0x6991 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread2" #7 daemon prio=9 os_prio=0 tid=0x00007f0ae80ca800 nid=0x6990 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007f0ae80c9000 nid=0x698f waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007f0ae80c6000 nid=0x698e waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007f0ae80c4800 nid=0x698d waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE "Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f0ae8091800 nid=0x698c in Object.wait() [0x00007f0ad26de000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000006c701d718> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144) - locked <0x00000006c701d718> (a java.lang.ref.ReferenceQueue$Lock) at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165) at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216) "Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f0ae808f000 nid=0x698b in Object.wait() [0x00007f0ad27df000] java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) - waiting on <0x00000006c7034928> (a java.lang.ref.Reference$Lock) at java.lang.Object.wait(Object.java:502) at java.lang.ref.Reference.tryHandlePending(Reference.java:191) - locked <0x00000006c7034928> (a java.lang.ref.Reference$Lock) at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153) "VM Thread" os_prio=0 tid=0x00007f0ae8085800 nid=0x698a runnable "GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007f0ae8025000 nid=0x6980 runnable "GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007f0ae8026800 nid=0x6981 runnable "GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007f0ae8028800 nid=0x6982 runnable "GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007f0ae802a000 nid=0x6983 runnable "GC task thread#4 (ParallelGC)" os_prio=0 tid=0x00007f0ae802c000 nid=0x6984 runnable "GC task thread#5 (ParallelGC)" os_prio=0 tid=0x00007f0ae802d800 nid=0x6987 runnable "GC task thread#6 (ParallelGC)" os_prio=0 tid=0x00007f0ae802f800 nid=0x6988 runnable "GC task thread#7 (ParallelGC)" os_prio=0 tid=0x00007f0ae8031000 nid=0x6989 runnable "VM Periodic Task Thread" os_prio=0 tid=0x00007f0ae850c000 nid=0x6996 waiting on condition JNI global references: 1235 Heap PSYoungGen total 144384K, used 45005K [0x000000076d000000, 0x0000000777b00000, 0x00000007c0000000) eden space 126976K, 35% used [0x000000076d000000,0x000000076fbf3608,0x0000000774c00000) from space 17408K, 0% used [0x0000000775d00000,0x0000000775d00000,0x0000000776e00000) to space 17408K, 0% used [0x0000000774c00000,0x0000000774c00000,0x0000000775d00000) ParOldGen total 175616K, used 22110K [0x00000006c7000000, 0x00000006d1b80000, 0x000000076d000000) object space 175616K, 12% used [0x00000006c7000000,0x00000006c85978a8,0x00000006d1b80000) Metaspace used 35192K, capacity 37248K, committed 37504K, reserved 1081344K class space used 4819K, capacity 5214K, committed 5248K, reserved 1048576K 2019-04-01 14:22:57.992 INFO 27001 --- [on(2)-127.0.0.1] inMXBeanRegistrar$SpringApplicationAdmin : Application shutdown requested. 2019-04-01 14:22:57.994 INFO 27001 --- [on(2)-127.0.0.1] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' 2019-04-01 14:22:58.004 INFO 27001 --- [on(2)-127.0.0.1] o.apache.catalina.core.StandardService : Stopping service [Tomcat] ``` ```

Socket编程java.net.BindException: Address already in use: JVM_Bind

本人最近想学Socket编程:无奈遇到个问题.不知道是啥原因,还请各位不吝赐教. 问题是这样的:我想用Socket在服务端读取文本文件,第一次运行的时候,什么都没数出来,(不停止第一次开启的服务)第二次输出了文本内容,却报了个地址被占用的错.这是为什么呢? Socket客户端: package socket; import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.PrintWriter; import java.net.InetAddress; import java.net.Socket; import java.net.UnknownHostException; import java.nio.channels.SocketChannel; public class socketClient { private String ip; public socketClient() { // TODO Auto-generated constructor stub } public socketClient(String ip){ this.ip=ip; } public void client(){ PrintWriter print=null; BufferedReader read=null; File file=null; try { Socket ket=new Socket(ip,9000);//与服务器取得链接. file=new File("e:\\我的地址.txt"); read=new BufferedReader(new InputStreamReader(new FileInputStream(file))); String readLine=null; print=new PrintWriter(ket.getOutputStream(),true); while((readLine=read.readLine())!=null){ print.print(readLine); } } catch (Exception e) { e.printStackTrace(); }finally{ try { read.close(); print.close(); } catch (IOException e) { e.printStackTrace(); } } } } Socket服务器: package socket; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.UnknownHostException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class SocketRemot { private Map map=new HashMap(); public void reMoteRun(){ BufferedReader read=null; PrintWriter write=null; try { while(true){ ServerSocket soc=new ServerSocket(9000);//为服务器Socket指定端口 Socket socket=soc.accept();//服务器端阻塞,一直等待客户端来访问. map.put(socket.getPort()+"",socket); System.out.println("我在等待......."); //读取客户端文件. //得到socket读取文件的流//字节流 /* * InputStream是用于读取二进制文件的流,而服务器端读取的文件很有可能是文本形式的.所以要转换为字符流 * 字节流和字符流之间的转换通过InputStreamReader,和OutputStreamWrite来转换. */ read=new BufferedReader(new InputStreamReader(socket.getInputStream()));//获取读文件的字符流 write=new PrintWriter(socket.getOutputStream(),true);//通过现有的output流来创建新的printWrite流 System.out.println(read.readLine()); // String str=null; // while((str=read.readLine())!=null){ // System.out.println(read.readLine());//边读边写. // } // write.close(); // read.close(); // socket.close(); } } catch (IOException e) { e.printStackTrace(); }finally{ try { if(read!=null){ read.close(); } if(write!=null){ write.close(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } public void closeSocket(){ Iterator tor=map.values().iterator(); while(tor.hasNext()){ Socket soc=(Socket)tor.next(); if(!soc.isClosed()){ try { soc.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } } } Test: package socket; import java.net.InetAddress; import java.net.UnknownHostException; public class Test { public static void main(String[] args) { SocketRemot remot=new SocketRemot(); socketClient ket=new socketClient(getAddIp()); remot.reMoteRun(); ket.client(); remot.closeSocket(); } public static String getAddIp(){ String serverIp=null; try { serverIp = InetAddress.getLocalHost().toString(); serverIp = serverIp.substring(serverIp.indexOf("/")+1); System.out.println(serverIp); } catch (UnknownHostException e) { e.printStackTrace(); } return serverIp; } } error: java.net.BindException: Address already in use: JVM_Bind at java.net.DualStackPlainSocketImpl.bind0(Native Method) at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source) at java.net.AbstractPlainSocketImpl.bind(Unknown Source) at java.net.PlainSocketImpl.bind(Unknown Source) at java.net.ServerSocket.bind(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at java.net.ServerSocket.<init>(Unknown Source) at socket.SocketRemot.reMoteRun(SocketRemot.java:25) at socket.Test.main(Test.java:10)

ServerSocket正在使用ip / ::

<div class="post-text" itemprop="text"> <p>I'm making a chat application for android and currently testing with 2 emulators and a phone connected via usb. I have not been able to get a Socket to connect to a ServerSocket for pretty much the last 24 hours. Each host is using a ServerSocket in order to listen to other hosts "talk" via their client Sockets.</p> <p>For both emulators, the following 2 lines of code print out: <code>The server socket is using ip: /::</code></p> <pre><code>serverSocket = new ServerSocket(portNo); Log.i("MY_TAG", "The server socket is using ip: " + serverSocket.getInetAddress() ); </code></pre> <p>Using the following line of code, I get a ConnectionException saying it can't connect to the specified ip and port and that the connection timed out:</p> <pre><code>socket = new Socket(addr, portNo); </code></pre> <p>The way I'm obtaining the ip is by querying a server about every 20 seconds, and in a php script, I use <code>$_SERVER['REMOTE_ADDR']</code> which is indeed returning my ip address.</p> <p>When using the phone to send a message to an emulator, I get a slightly different error. I get a ConnectionException just like with the emulators, except it also says "Connection refused".</p> <p>When sending a message from an emulator to the phone, I get a ConnectionException due to timing out.</p> <p>The phone's ServerSocket is using ip 0.0.0.0 which I know is fine because that means it's just listening on all interfaces.</p> <p>In all cases, the Server Socket's accept() method never returns. </p> <p>Using <code>netstat -an</code> (I'm using Windows as my OS), I did not see any of the ports that my ServerSockets were supposedly listening on listed in the output.</p> <p>Using telnet, I get a connection refused message when attempted on the emulators (using php's <code>$_SERVER['REMOTE_ADDR']</code> to get the ip).<br> And I get a connection timeout when using telnet on the phone's ip and listening port.</p> <p>That said, please help me figure out how to get these sockets connected.</p> </div>

【小白求教】JAVA多线程跑ServerSocket内存逐渐爆满死机

第一个是教材上正确的代码,可以正常多线程运行的 主程序: package com.server; import java.io.*; import java.util.*; import java.net.*; import com.bean.*; import com.biz.ServerBiz; public class MainServer { private ServerSocket serverSocket; private Socket socket; private InputStream in; private OutputStream out; public MainServer() { //创建服务器的套接字 try { serverSocket=new ServerSocket(8888); System.out.println("服务器已经启动....."); while(true){ socket=serverSocket.accept();//监听并且接收客户端请求 ServerBiz serverBiz=new ServerBiz(socket); Thread td=new Thread(serverBiz);//将serverBiz设置到线程中,每开一个客户端,会创建一个新的线程处理客户端的数据 td.start();//开始 } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } /** * @param args */ public static void main(String[] args) { new MainServer(); } } ===================================== package com.biz; import java.io.*; import java.util.*; import java.net.*; import com.bean.*; public class ServerBiz implements Runnable { private Socket socket; private InputStream in; private OutputStream out; public ServerBiz(Socket socket) { this.socket=socket; try { in=socket.getInputStream(); out=socket.getOutputStream(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @Override public void run() { try { /************接收***************************************/ in=socket.getInputStream(); ObjectInputStream objin=new ObjectInputStream(in); Users us=(Users) objin.readObject(); int code=0;//状态码 if(us!=null){ if(us.getUname()!=null&&!us.getUname().trim().equals("") &&us.getPasswd()!=null&&!us.getPasswd().trim().equals("")){ System.out.println("账号:"+us.getUname()); System.out.println("密码:"+us.getPasswd()); code=1;//登陆成功! } } socket.shutdownInput();//结束接收 /******************************************************/ /*****向客户端发送响应***************************************/ out=socket.getOutputStream(); out.write(code);//向客户端发送状态码 out.flush(); socket.shutdownOutput();//结束输出 /******************************************************/ } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } ================================== 以上是教材正确的代码, 我奇怪为什么不能将 socket=serverSocket.accept() 写在runnable中的run方法中,于是我修改成了下面的代码,可是这个是不能正常运行的。 先打开任务管理器,再运行这个程序,可以看到内存在很短的时间内逐渐爆满,从而导致电脑无法使用 主程序: package com.server; import java.net.*; import java.io.*; import com.bean.Users; import com.biz.ServerBiz; public class MainServer { private ServerSocket ss; public MainServer() { try { ss = new ServerSocket(8888); System.out.println("服务器已经启动......"); /************************ 客户端发送来的消息 **************************/ while (true) { ServerBiz sb=new ServerBiz(ss); Thread t=new Thread(sb); t.start(); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public static void main(String[] args) { new MainServer(); } } =============================== 下面是设置的Runnable package com.biz; import java.net.*; import java.io.*; import com.bean.Users; public class ServerBiz implements Runnable { private ServerSocket ss; public ServerBiz(ServerSocket ss) { this.ss = ss; } @Override public void run() { try { Socket sk = ss.accept(); InputStream ips = sk.getInputStream(); ObjectInputStream objectin = new ObjectInputStream(ips); Users user = new Users(); user = (Users) objectin.readObject(); int code = 0; if (user != null && user.getPassword() != null && user.getUname() != null && !user.getPassword().trim().equals("") &&!user.getUname().trim().equals("")) { System.out.println("用户名:" + user.getUname()); System.out.println("密码:" + user.getPassword()); code = 1; } sk.shutdownInput(); /**************************************************************/ /************************ 向客户端发送的消息 **************************/ OutputStream ops = sk.getOutputStream(); ops.write(code); ops.flush(); sk.shutdownOutput(); /**************************************************************/ } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (ClassNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } ========================= (本来还有个client端,这里忽略) 求大神指点什么将 socket=serverSocket.accept() 写在Runnable中 ,运行后就死机啊,非常感谢啊!

Java对象流读取时出错

import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.OutputStream; import java.io.Serializable; import java.net.ServerSocket; import java.net.Socket; public class sever { public static void main(String[] args) throws ClassNotFoundException { Socket socket; InputStream is; ObjectInputStream ois; FileOutputStream fos; File file; Object object; User user=null; try { ServerSocket ss=new ServerSocket(9999); socket=ss.accept();System.out.print("hh"); is=socket.getInputStream(); ois=new ObjectInputStream(is); user=(User)ois.readObject(); 这一行有错误。 file=new File("C:/Users/lenovo/Desktop/gg1/a.mp4"); fos=new FileOutputStream(file); while(true){ fos.write(user.getBytes(), 0,user.getBytes().length); fos.flush(); } } catch (IOException e) { } } } class User implements Serializable{ private static final long serialVersionUID = 1L; private byte[] bytes=new byte[1024]; public byte[] getBytes() { return bytes; } public void setBytes(byte[] bytes) { this.bytes = bytes; } } 这个是服务器端,在从对象流中读取对象的时候报错了(错误的地方上面有标识) 错误提示: java.lang.ClassNotFoundException 请求路过的各位大神解答一下

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

点沙成金:英特尔芯片制造全过程揭密

“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

外包程序员的幸福生活

今天给你们讲述一个外包程序员的幸福生活。男主是Z哥,不是在外包公司上班的那种,是一名自由职业者,接外包项目自己干。接下来讲的都是真人真事。 先给大家介绍一下男主,Z哥,老程序员,是我十多年前的老同事,技术大牛,当过CTO,也创过业。因为我俩都爱好喝酒、踢球,再加上住的距离不算远,所以一直也断断续续的联系着,我对Z哥的状况也有大概了解。 Z哥几年前创业失败,后来他开始干起了外包,利用自己的技术能...

C++11:一些微小的变化(新的数据类型、template表达式内的空格、nullptr、std::nullptr_t)

本文介绍一些C++的两个新特性,它们虽然微小,但对你的编程十分重要 一、Template表达式内的空格 C++11标准之前建议在“在两个template表达式的闭符之间放一个空格”的要求已经过时了 例如: vector&lt;list&lt;int&gt; &gt;; //C++11之前 vector&lt;list&lt;int&gt;&gt;; //C++11 二、nullptr ...

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

深入剖析Springboot启动原理的底层源码,再也不怕面试官问了!

大家现在应该都对Springboot很熟悉,但是你对他的启动原理了解吗?

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

【阿里P6面经】二本,curd两年,疯狂复习,拿下阿里offer

二本的读者,在老东家不断学习,最后逆袭

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

面试官:你连SSO都不懂,就别来面试了

大厂竟然要考我SSO,卧槽。

微软为一人收购一公司?破解索尼程序、写黑客小说,看他彪悍的程序人生!...

作者 | 伍杏玲出品 | CSDN(ID:CSDNnews)格子衬衫、常掉发、双肩包、修电脑、加班多……这些似乎成了大众给程序员的固定标签。近几年流行的“跨界风”开始刷新人们对程序员的...

终于,月薪过5万了!

来看几个问题想不想月薪超过5万?想不想进入公司架构组?想不想成为项目组的负责人?想不想成为spring的高手,超越99%的对手?那么本文内容是你必须要掌握的。本文主要详解bean的生命...

我说我懂多线程,面试官立马给我发了offer

不小心拿了几个offer,有点烦

自从喜欢上了B站这12个UP主,我越来越觉得自己是个废柴了!

不怕告诉你,我自从喜欢上了这12个UP主,哔哩哔哩成为了我手机上最耗电的软件,几乎每天都会看,可是吧,看的越多,我就越觉得自己是个废柴,唉,老天不公啊,不信你看看…… 间接性踌躇满志,持续性混吃等死,都是因为你们……但是,自己的学习力在慢慢变强,这是不容忽视的,推荐给你们! 都说B站是个宝,可是有人不会挖啊,没事,今天咱挖好的送你一箩筐,首先啊,我在B站上最喜欢看这个家伙的视频了,为啥 ,咱撇...

立即提问
相关内容推荐