Travel-Sample Web Backend install problems with Python

I’m having trouble installing the Mobile Travel-Sample Web Backend app. I’ve followed all the steps listed here:

and I’m getting an error after running: python
here is the output:

Connecting to: couchbase://cb-server/travel-sample?username=Administrator
Traceback (most recent call last):
File “”, line 299, in
db = connect_db()
File “”, line 296, in connect_db
return Bucket(CONNSTR, password=PASSWORD)
File “/Users/anilgupta/Documents/Developer/Couchbase_Travel_Sample_App/try-cb-python/lib/python2.7/site-packages/couchbase/”, line 245, in init
File “/Users/anilgupta/Documents/Developer/Couchbase_Travel_Sample_App/try-cb-python/lib/python2.7/site-packages/couchbase/”, line 254, in _do_ctor_connect
couchbase.exceptions._UnknownHostError_0x15 (generated, catch UnknownHostError): <RC=0x15[DNS/Hostname lookup failed], There was a problem while trying to send/receive your request over the network. This may be a result of a bad network or a misconfigured client or server, C Source=(src/bucket.c,785)>
(try-cb-python) Anils-MacBook-Pro:try-cb-python anilgupta$


Did you alter the code? It appears it is trying to connect to ‘cb-server’ instead of localhost, and the system DNS resolution is failing to find it… Unless cb-server is an alias for localhost. By default the CONNSTR will be ‘couchbase://localhost/travel-sample’, because the example is designed for running on the same machine as Couchbase Server.

If cb-server is indeed another machine, are you able to ping cb-server or cb-server.local, or the respective IP address?



Hi, I didn’t originally change the file but now I just tried putting localhost instead of cb-server and that fixed it! Thank you

1 Like

Thanks - glad that fixed it. Will pass this on to the maintainer.

I have fixed the issue on branch 5.0. It should be “localhost” and an unintentional push had changed it to “cb-server”. Please pull 5.0 and ensure it works as expected

1 Like