Details
Description
Thanks to Tony Fonager....
When cbtransfer is invoked incorrectly against the wrong port (11211 rather than 8091), the tool should give a more polite, useful error message rather than an ugly stack trace.
[root@cbnode05 bin]# ./cbtransfer /root/Backup/cbtransfer http://192.168.0.75:11211 -b quizmo -B quizmo -u username -p password
Traceback (most recent call last):
File "/opt/couchbase/lib/python/cbtransfer", line 33, in <module>
pump_transfer.exit_handler(pump_transfer.Transfer().main(sys.argv))
File "/opt/couchbase/lib/python/pump_transfer.py", line 85, in main
sink_class, sink).run()
File "/opt/couchbase/lib/python/pump.py", line 100, in run
rv, source_map, sink_map = self.check_endpoints()
File "/opt/couchbase/lib/python/pump.py", line 150, in check_endpoints
rv, sink_map = self.sink_class.check(self.opts, self.sink_spec, source_map)
File "/opt/couchbase/lib/python/pump_cb.py", line 71, in check
rv, sink_map = pump.rest_couchbase(opts, spec)
File "/opt/couchbase/lib/python/pump.py", line 879, in rest_couchbase
rest_request_json(host, int(port), user, pswd, path)
File "/opt/couchbase/lib/python/pump.py", line 856, in rest_request_json
reason=reason)
File "/opt/couchbase/lib/python/pump.py", line 829, in rest_request
resp = conn.getresponse()
File "/usr/lib64/python2.6/httplib.py", line 990, in getresponse
response.begin()
File "/usr/lib64/python2.6/httplib.py", line 391, in begin
version, status, reason = self._read_status()
File "/usr/lib64/python2.6/httplib.py", line 355, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine