IOException doesn't give enough information
<p>My android program isn't working. I am using normal client-server sockets. I have tested my server with telnet and it works fine, but when I try it with my android program, it doesn't work (more details in a second). Here's my code:</p>

<pre><code> Socket s = null;
 try
 {
    String SocketServerAddress = db.getPhSsServerAddress();
    Integer SocketServerPort = db.getPhSsServerPort();
    s = new Socket(SocketServerAddress, SocketServerPort);
    Log.d(MY_DEBUG_TAG, "Setting up Socket: " + SocketServerAddress + ":" + SocketServerPort);
    DataOutputStream out = new DataOutputStream(s.getOutputStream());
    DataInputStream in = new DataInputStream(s.getInputStream());
    Log.d(MY_DEBUG_TAG, "Connected to: " + s.getInetAddress() + " on port " + s.getPort());

    out.writeUTF("Helo, Server");
    out.flush();
    Log.d(MY_DEBUG_TAG, "Bytes written: " + out.size());
    String st = in.readUTF();

    Log.d(MY_DEBUG_TAG, "SocketServerResponse: " + st);
 }
 catch (UnknownHostException e) 
 {
    Log.e(MY_ERROR_TAG, "UnknownHostException: " + e.getMessage() + "; " + e.getCause());
   } 
 catch (IOException e) 
   {
    Log.e(MY_ERROR_TAG, "IOException: " + e.getMessage() + "; " + e.getCause() + "; " + e.getLocalizedMessage());
   }
 finally
 {
    try {
            s.close();
        } catch (IOException e) {
        Log.e(MY_ERROR_TAG, "IOException on socket.close(): " + e.getMessage() + "; " + e.getCause());
        }
 }
</code></pre>

<p>All I ever get here is a thrown IOException with no message or cause attached. The specific line causing the error is the String st = in.readUTF().  If I comment out that line, my code runs fine (no exceptions thrown), but my server does not acknowledge that any data has been sent to it. And of course I don't get any data back since that line is commented out.</p>

<p>So, how can I figure out what the problem is? Tonight I am going to try and see what is being passed with wireshark to see if that gives any insight.</p>
