3

I've installed Acralyzer using this tutorial and got following parameters for integrating Acra into my Android app:

httpMethod = Method.PUT,
reportType = Type.JSON,
formUri = "http://localhost:5984/acra-myap/_design/acra-storage/_update/report",
formUriBasicAuthLogin = "myap-reporter",
formUriBasicAuthPassword = "a11youneedisl0v3"

Before installing Acralyzer, I ran

ssh -L5984:127.0.0.1:5984 user@AAA.BBB.CCC.DDD

(establishes a tunnel to CouchDB running at AAA.BBB.CCC.DDD) where AAA.BBB.CCC.DDD is the address of my instance at DigitalOcean.

Smart as I am, after installing Acralyzer, I killed the ssh process and tried to open the URL http://AAA.BBB.CCC.DDD:5984/acra-myap/_design/acra-storage/_update/report.

I could not connect to it from my browser, which means that the the Android app will not be able to send crash reports to Acralyzer.

What can I do in order for the Acralyzer's URL (http://AAA.BBB.CCC.DDD:5984/acra-myap/_design/acra-storage/_update/report) to become available without ssh tunnel?

enrico.bacis
  • 30,497
  • 10
  • 86
  • 115
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325

2 Answers2

2

It seems that the port you are trying to contact is not open. You should inform iptables (the linux firewall), to accept the incoming traffic on port 5984:

sudo iptables -A INPUT -p tcp --dport 5984 -j ACCEPT

You can find more information on how to create iptables rules and how to save them here.

Digital Ocean could have a firewall that will block you before reaching your server, but to open the port on your instance worth a try.

enrico.bacis
  • 30,497
  • 10
  • 86
  • 115
1

By default the firewall on DigitalOcean machines is setup to accept all traffic, so the iptables rule shouldn't be necessary. The problem is more likely to be that the couchdb bind_address is still set to the default "127.0.0.1" -- i.e. localhost. After defining an admin user account, you can set bind_address to "0.0.0.0" under configuration in the Futon control panel, which will make it listen to all ip addresses, or another specific address.

Community
  • 1
  • 1
Tim Rae
  • 3,167
  • 2
  • 28
  • 35