leap test succeeds even though couchdb is not accessible
I get this cronmail from leech.demo.b.n:
From root@leech.demo.bitmask.net
To root@leech.demo.bitmask.net
Subject Cron <root@leech> (/bin/date; /srv/leap/couchdb/scripts/cleanup-user-dbs) >> /var/log/leap/couchdb-cleanup.log
/usr/lib/ruby/2.1.0/net/http.rb:879:in `initialize': Connection refused - connect(2) for "localhost" port 5984 (Errno::ECONNREFUSED)
from /usr/lib/ruby/2.1.0/net/http.rb:879:in `open'
from /usr/lib/ruby/2.1.0/net/http.rb:879:in `block in connect'
from /usr/lib/ruby/2.1.0/timeout.rb:76:in `timeout'
from /usr/lib/ruby/2.1.0/net/http.rb:878:in `connect'
from /usr/lib/ruby/2.1.0/net/http.rb:863:in `do_start'
from /usr/lib/ruby/2.1.0/net/http.rb:852:in `start'
from /var/lib/gems/2.1.0/gems/rest-client-1.6.9/lib/restclient/request.rb:206:in `transmit'
from /var/lib/gems/2.1.0/gems/rest-client-1.6.9/lib/restclient/request.rb:68:in `execute'
from /var/lib/gems/2.1.0/gems/rest-client-1.6.9/lib/restclient/request.rb:35:in `execute'
from /var/lib/gems/2.1.0/gems/couchrest-1.2.0/lib/couchrest/rest_api.rb:94:in `execute'
from /var/lib/gems/2.1.0/gems/couchrest-1.2.0/lib/couchrest/rest_api.rb:45:in `get'
from /var/lib/gems/2.1.0/gems/couchrest-1.2.0/lib/couchrest/database.rb:265:in `view'
from /var/lib/gems/2.1.0/gems/couchrest-1.2.0/lib/couchrest/database.rb:281:in `all_docs'
from /srv/leap/couchdb/scripts/lib/leap/users.rb:33:in `all_ids'
from /srv/leap/couchdb/scripts/cleanup-user-dbs:17:in `<main>'
Then I run leap test leech
but it tells me everything is fine:
~/leap/git/bitmask leap test leech
= [leech] PASS: Network > Can connect to internet?
= [leech] PASS: Network > Is stunnel running?
= [leech] PASS: Network > Is shorewall running?
= [leech] PASS: Network > Are server certificates valid?
= [leech] PASS: Webapp > Can contact couchdb?
= [leech] PASS: Webapp > Are daemons running?
= [leech] PASS: Webapp > Can access webapp?
= [leech] PASS: Webapp > Can create and authenticate and delete user via API?
= [leech] 9 tests: 8 passes, 0 skips, 0 warnings, 0 failures, 0 errors
However, when I test on leech itself, I get:
root@leech:~# nc -v localhost 5984
localhost [127.0.0.1] 5984 (?) : Connection refused