title: Android: Sending error reports to server using acra (couchDB)
body: <p>I am new to Android Development. I install CouchDB on the server and created a user. I use following code in my app.</p>
  
  <p>@ReportsCrashes (</p>
  
  <pre><code> formKey = "",
   reportType = org.acra.sender.HttpSender.Type.JSON,
   httpMethod = org.acra.sender.HttpSender.Method.PUT,
   formUri = "localhost:5984/acra-myapp/_design/acra-storage/_update/report",
   formUriBasicAuthLogin = "admin",
   formUriBasicAuthPassword = "admin"        
  </code></pre>
  
  <p>)</p>
  
  <p>when i run my app from android device it give me following error:</p>
  
  <pre><code>02-04 12:46:26.606: E/ACRA(348): Failed to send crash report for 1391497913000-approved.stacktrace
  02-04 12:46:26.606: E/ACRA(348): org.acra.sender.ReportSenderException: Error while sending JSON report via Http PUT
  02-04 12:46:26.606: E/ACRA(348):    at org.acra.sender.HttpSender.send(HttpSender.java:228)
  02-04 12:46:26.606: E/ACRA(348):    at org.acra.SendWorker.sendCrashReport(SendWorker.java:179)
  02-04 12:46:26.606: E/ACRA(348):    at org.acra.SendWorker.checkAndSendReports(SendWorker.java:141)
  02-04 12:46:26.606: E/ACRA(348):    at org.acra.SendWorker.run(SendWorker.java:77)
  02-04 12:46:26.606: E/ACRA(348): Caused by: org.apache.http.conn.HttpHostConnectException: Connection to `*` refused
  02-04 12:46:26.606: E/ACRA(348):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
  02-04 12:46:26.606: E/ACRA(348):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
  02-04 12:46:26.606: E/ACRA(348):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
  02-04 12:46:26.606: E/ACRA(348):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:365)
  02-04 12:46:26.606: E/ACRA(348):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
  02-04 12:46:26.606: E/ACRA(348):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
  02-04 12:46:26.606: E/ACRA(348):    at org.acra.util.HttpRequest.send(HttpRequest.java:152)
  02-04 12:46:26.606: E/ACRA(348):    at org.acra.sender.HttpSender.send(HttpSender.java:225)
  02-04 12:46:26.606: E/ACRA(348):    ... 3 more
  02-04 12:46:26.606: E/ACRA(348): Caused by: java.net.ConnectException: failed to connect to  after 3000ms: isConnected failed: ECONNREFUSED (Connection refused)
  02-04 12:46:26.606: E/ACRA(348):    at libcore.io.IoBridge.isConnected(IoBridge.java:250)
  02-04 12:46:26.606: E/ACRA(348):    at libcore.io.IoBridge.connectErrno(IoBridge.java:178)
  02-04 12:46:26.606: E/ACRA(348):    at libcore.io.IoBridge.connect(IoBridge.java:112)
  02-04 12:46:26.606: E/ACRA(348):    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
  02-04 12:46:26.606: E/ACRA(348):    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
  02-04 12:46:26.606: E/ACRA(348):    at java.net.Socket.connect(Socket.java:859)
  02-04 12:46:26.606: E/ACRA(348):    at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
  02-04 12:46:26.606: E/ACRA(348):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
  02-04 12:46:26.606: E/ACRA(348):    ... 10 more
  02-04 12:46:26.606: E/ACRA(348): Caused by: libcore.io.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
  02-04 12:46:26.606: E/ACRA(348):    at libcore.io.IoBridge.isConnected(IoBridge.java:234)
  </code></pre>
  
  <p>Can't seem to figure out this error.Please help me.</p>