Reputation: 103
I have built my server using simple server socket code. It works perfect when I run a remote client sending a user input string but it gives the error below when I am trying to run the client code via an android app on android studio. Please help!
Eclipse DDMS Message
[2015-05-01 18:39:52 - ddmlib] An established connection was aborted by the software in your host machine
java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(Unknown Source)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source)
at sun.nio.ch.IOUtil.write(Unknown Source)
at sun.nio.ch.SocketChannelImpl.write(Unknown Source)
at com.android.ddmlib.JdwpPacket.writeAndConsume(JdwpPacket.java:213)
at com.android.ddmlib.Client.sendAndConsume(Client.java:675)
at com.android.ddmlib.HandleHeap.sendREAQ(HandleHeap.java:342)
at com.android.ddmlib.Client.requestAllocationStatus(Client.java:521)
at com.android.ddmlib.DeviceMonitor.createClient(DeviceMonitor.java:831)
at com.android.ddmlib.DeviceMonitor.openClient(DeviceMonitor.java:799)
at com.android.ddmlib.DeviceMonitor.processIncomingJdwpData(DeviceMonitor.java:759)
at com.android.ddmlib.DeviceMonitor.deviceClientMonitorLoop(DeviceMonitor.java:648)
at com.android.ddmlib.DeviceMonitor.access$100(DeviceMonitor.java:44)
at com.android.ddmlib.DeviceMonitor$3.run(DeviceMonitor.java:576)
Then when I close android studio I get this in Eclipse
2015-05-01 19:24:06 - DeviceMonitor Adb connection Error:An existing connection was forcibly closed by the remote host
2015-05-01 19:24:07 - DeviceMonitor Connection attempts: 1
2015-05-01 19:24:09 - DeviceMonitor Connection attempts: 2
2015-05-01 19:24:11 - DeviceMonitor Connection attempts: 3
Upvotes: 3
Views: 3004
Reputation: 2534
The connection was being dropped by some switch because the machine bandwidth was too high (above the limit).
Use this tool to find out what the machine bandwidth is.
Upvotes: 1